Class AbstractMultiFunction
java.lang.Object
org.topbraid.shacl.multifunctions.AbstractMultiFunction
- All Implemented Interfaces:
MultiFunction
- Direct Known Subclasses:
AbstractNativeMultiFunction,SPARQLMultiFunction
Abstract base class suitable for all MultiFunction implementations.
- Author:
- Holger Knublauch
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUse this constructor for natively implemented MultiFunctions.protectedAbstractMultiFunction(String uri, org.apache.jena.rdf.model.Resource declaration) Use this constructor for dynamically declared MultiFunctions from RDF graphs in the workspace. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.graph.NodeGets the API status.Gets human-readable documentation for the MultiFunction, e.g.Gets metadata about the declared parameters (based on sh:parameter).Gets metadata about the variables that will be produced for each solution (based on dash:resultVariable).getURI()Gets the URI of this MultiFunction, which can also be used for the SPARQL property function.voidinitFrom(org.apache.jena.rdf.model.Resource declaration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.topbraid.shacl.multifunctions.MultiFunction
execute
-
Constructor Details
-
AbstractMultiFunction
Use this constructor for dynamically declared MultiFunctions from RDF graphs in the workspace.- Parameters:
uri- the URI of the multi-functiondeclaration- the RDF resource with the declaration
-
AbstractMultiFunction
Use this constructor for natively implemented MultiFunctions. The main difference is that these are programmatically generated before the RDF declaration is processed. For (corner) cases in which a workspace is broken and those files are not found, we at least declare the variable names so that the function can still execute correctly.- Parameters:
uri- the URI of the multi-functionargVarNames- the names of the parametersresultVarNames- the names of the result variables
-
-
Method Details
-
getAPIStatus
public org.apache.jena.graph.Node getAPIStatus()Description copied from interface:MultiFunctionGets the API status.- Specified by:
getAPIStatusin interfaceMultiFunction- Returns:
- one of the instances of dash:APIStatus or null if this should not be used outside.
-
getDescription
Description copied from interface:MultiFunctionGets human-readable documentation for the MultiFunction, e.g. for code generation.- Specified by:
getDescriptionin interfaceMultiFunction- Returns:
- the description or null
-
getParameters
Description copied from interface:MultiFunctionGets metadata about the declared parameters (based on sh:parameter).- Specified by:
getParametersin interfaceMultiFunction- Returns:
- the parameters
-
getResultVars
Description copied from interface:MultiFunctionGets metadata about the variables that will be produced for each solution (based on dash:resultVariable).- Specified by:
getResultVarsin interfaceMultiFunction- Returns:
- the result variables
-
getURI
Description copied from interface:MultiFunctionGets the URI of this MultiFunction, which can also be used for the SPARQL property function.- Specified by:
getURIin interfaceMultiFunction- Returns:
- the URI string
-
initFrom
public void initFrom(org.apache.jena.rdf.model.Resource declaration)
-