{ :book1 dc:title|rdfs:label ?displayString }
.where([book1, [RDF::DC.title,"|",RDF::RDFS.label], :displayString])
{
?x foaf:mbox <mailto:alice@example> .
?x foaf:knows/foaf:name ?name .
}
.where([:x, RDF::FOAF.mbox, RDF::URI.new("mailto:alice@example")])
.where([:x,[RDF::FOAF.knows,"/",RDF::FOAF.name], :name])
{
?x foaf:mbox <mailto:alice@example> .
?x foaf:knows/foaf:knows/foaf:name ?name .
}
.where([:x, RDF::FOAF.mbox, RDF::URI.new("mailto:alice@example")])
.where([:x,[RDF::FOAF.knows,"/", RDF::FOAF.knows, "/", RDF::FOAF.name], :name])
{ <mailto:alice@example> ^foaf:mbox ?x }
.where([RDF::URI.new('mailto:alice@example'), ["^",RDF::FOAF.mbox], :x])
{
?x foaf:knows/^foaf:knows ?y .
FILTER(?x != ?y)
}
.where([RDF::URI.new('mailto:alice@example'), [RDF::FOAF.knows,"/","^",RDF::FOAF.mbox], :x])
.filter("?x != ?y")
{
?x foaf:mbox <mailto:alice@example> .
?x foaf:knows+/foaf:name ?name .
}
.where([:x, RDF::FOAF.mbox, RDF::URI.new('mailto@alice@example')])
.where([:x, [RDF::FOAF.knows,"+","/",RDF::FOAF.name], :name])
Alternative Arbitrary Length
{ ?ancestor (ex:motherOf|ex:fatherOf)+ <#me> }
.where([:ancestor, [[RDF::EX.motherOf,"|",RDF::EX.fatherOf],"+"], RDF::URI.new("#me")])
All Resources and their Inferred Types
{ ?x rdf:type/rdfs:subClassOf* ?type }
.where([:x, [RDF.type, "/", RDF::RDFS.subClassOf, "*"], :type])
{ ?x ?p ?v . ?p rdfs:subPropertyOf* :property }
.where([:x,:p,:v])
.where([:p, [RDF::RDFS.subPropertyOf,"*"], :property])
{ ?x !(rdf:type|^rdf:type) ?y }
.where([:x, ["!",[RDF.type,"|","^",RDF.type]], :y])