There are several ways to extend ARQ:
Functions are standard part of SPARQL. ARQ provides application-written functions and also provides a function library.
ARQ also provides the ability to write custom extensions. This not part of SPARQL; the application will need to use the ARQ query language (a superset of SPARQL). Unlike a value function, an extension can set variables and generate multiple solutions. An extensions can also query the dataset.
EXT q:name(?a, ?b, ?c)
Writing a an extension requires understanding of the ARQ query engine. See ARQ Query Engine Design.
@@ to be written. Extension is loaded like functions. Likely to change.
The DESCRIBE
result form in SPARQL does not define an exact form
of RDF to return. Instead, it allows the server or query processor to
return what it considers to be an appropriate description of the resources
located. This description will be specific to the domain, data modelling or
application.
ARQ comes with one built-in handler which calculates the blank node closure
of resources found. While suitable for many situations, it is not general (for
example, a FOAF file usually consists
of all blank nodes). ARQ allows the application to replace or add handlers for
producing DESCRIBE
result forms.
Application-specific handlers can be added to the
DescribeHandlerRegistry
. The handler will be called for each resource
(not literals) identified by the DESCRIBE
query.
URIs from with scheme name "_" (which is illegal) are created as blank node labels for directly accessing a blank node in the queried graph or dataset. This are constant terms in the query - not unnamed variables. Do not confuse these with the standard qname notation for blank nodes in queries. This is not portable - use with case.
<_:1234-5678-90> # A blank node in the data
_:b0 # A blank node in the query - a variable
@@to be written