http://franz.com/ns/allegrograph/6.5.0/fn#lookupRdfList

<http://franz.com/ns/allegrograph/6.5.0/fn#lookupRdfList>
( subject-or-object &optional predicate )

Lookup an RDF list in the current data set, associate it with a blank node, and return it.

The list can be identified with either one or two arguments. If only one is given then the list found starts at that subject; if two arguments are given, then they are used to search for the object(s) that have the arguments with subject and predicate. If there are multiple lists that match the search criteria, then all of their elements will be collected. If there are no such lists, then the resulting list will be empty. Note that the search will take the current SPARQL dataset and any GRAPH clauses into account.

The blank node returned can be used with other functions and magic properties such as sna:members. For example with this data:

prefix : <ex://#>
:a :startsList ( 1 2 3 4 ) .
:b rdf:first :x ;
rdf:rest (:y :z) .

The following query:

select ?member {
bind(<http://franz.com/ns/allegrograph/6.5.0/fn#lookupRdfList>( :a, :startsList ) as ?list)
?member <http://franz.com/ns/allegrograph/4.11/sna/members> ?list .
}

Similarly,

select ?member {
bind(<http://franz.com/ns/allegrograph/6.5.0/fn#lookupRdfList>( :b ) as ?list)
?member <http://franz.com/ns/allegrograph/4.11/sna/members> ?list .
}

Would return :x, :y, and :z.

http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLList

<http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLList>
( &rest args )

Associate the arguments with a blank node as a list and return it.

The blank node can be used with other functions and magic properties such as sna:members. For example:

select ?member {
bind(<http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLList>(1, 2, 3, 4) as ?list)
?member <http://franz.com/ns/allegrograph/4.11/sna/members> ?list .
}

Would return 1, 2, 3, and 4.)

http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLSet

<http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLSet>
( &rest args )

Associate the arguments with a blank node as a set and return it.

The blank node can be used with other functions and magic properties such as sna:members. For example:

select ?member {
bind(<http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLSet>(1, 2, 4, 1, 2) as ?set)
?member <http://franz.com/ns/allegrograph/4.11/sna/members> ?set .
}

Would return 1, 2, and 4.)

Notes

The following namespace abbreviations are used:

The SPARQL magic properties reference has additional information on using AllegroGraph magic properties and functions.