http://franz.com/ns/allegrograph/6.5.0/fn#lookupRdfList
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
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 .
\}
http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLSet
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:
- fti - <http://franz.com/ns/allegrograph/2.2/textindex/>
- geo - <http://franz.com/ns/allegrograph/3.0/geospatial/>
- geofn - <http://franz.com/ns/allegrograph/3.0/geospatial/fn/>
- nd - <http://franz.com/ns/allegrograph/5.0/geo/nd#>
- ndfn - <http://franz.com/ns/allegrograph/5.0/geo/nd/fn#>
- sna - <http://franz.com/ns/allegrograph/4.11/sna/>
The SPARQL magic properties reference has additional information on using AllegroGraph magic properties and functions.