public interface Function
extends com.complexible.stardog.plan.filter.Expression
This is the extension point for 17.6 (Extensible Value Testing) of the SPARQL spec.
For implementations of Function to be visible to the query parser and engine, they must be registered
via the JDK ServiceLoader
. Create a file called
com.complexible.stardog.plan.filter.functions.Function
in the META-INF/services
directory.
The contents of this file should be all of the *fully-qualified* class names for the custom Functions. Then
if a jar containing the META-INF/services
directory and the implementations for the Functions is
included on the classpath, Stardog will pick up the implementations on startup.
aGeo:distance(?axLoc, ?ayLoc, ?bxLoc, ?byLoc)
, its signature is as follows:
{code xsd:double aGeo:distance (numeric x1, numeric y1, numeric x2, numeric y2) }When
evaluate
is called, it will be provided four values
via the ValueSolution
,
which are the current values for the parameters, x1
, y1
, x2
, and y2
.FunctionRegistry
,
Extension FunctionsModifier and Type | Method and Description |
---|---|
Function |
copy()
Create a deep copy of the object which does not share any references with the original.
|
String |
getName()
Return the string that uniquely identifies this
Expression , which should be a fully qualified URI. |
List<String> |
getNames()
Return all the strings that uniquely identifies this
Function . |
default void |
initialize()
Initialize this function.
|
String getName()
Expression
, which should be a fully qualified URI. This
URI is what is used to reference this Expression
in a SPARQL query.List<String> getNames()
Function
. A function may have different names
in different namespaces.Function
getName()
default void initialize()
initialize
should prepare the function for
execution by either clearing or otherwise preparing it's state for (re)execution.Copyright © 2010-2016 Stardog Union. All Rights Reserved.