To build a query, user successively add unit blocks grouped into five categories :
Each unit block could increment the query at different location called focus. The query contains a current focus which is moved each time a unit block is added. With some exceptions, the current focus is positioned on the last increment.
example
query.something()
.isA("peak_class:Compound")
.isSubjectOf("peak_prop:InChIKey")
This request can be translated as “Get something of type compound which are subject of the InChIKey predicate.”
var) : set the focus with named block varLiteral(value)URI(value)IRI(value)PropertyPath(value)Anonymous(value)QueryVariable(var)if there is no ambiguity, string conversion is automatic.
isObjectOf("<http://something/test>") isObjectOf(URI("<http://something/test>")) equivalent to .prefix("http://something/","s").isObjectOf("s:test") equivalent to .prefix("http://something/","s").isObjectOf(URI("s:test"))
A query always start this unit block.
var = null)short,long) : set prefix to avoid long uri during constructioniri) : set graph or graph namediri) : set graph or graph nameduri,var). the current focus is set as “subject of triple <focus> <uri> ?var “uri,var). the current focus is set as “object of triple ?var <uri> <focus> “uri,var). the current focus is set as “object of triple <uri> ?var <focus> “uri,var). the current focus is set as “subject of triple <focus> ?var <uri> “focus insensitive
uri) : the current focus is set as “subject of triple <focus> a <uri> “uri,var) : datatype is processed separately from the request. discovery retrieve datatype information at the last execution timesparqlDef) : set the focus with an uri/literal.sparqlDef1,sparqlDef2,..)literal|var, flags : literal|var )literal|var )literal|var )literal|var )literal|var )literal|var )literal|var )literal|var )literal|var )literal|var )var).subStr(startingLoc : SparqlDefinition,length : SparqlDefinition )var).replace(pattern : SparqlDefinition, replacement : SparqlDefinition, flags : SparqlDefinition=””)var).abs()var).ceil()var).floor()var).rand()