Package org.aksw.jenax.arq.util.node
Class NodeCustom<T>
java.lang.Object
org.apache.jena.graph.Node
org.apache.jena.graph.Node_Ext<T>
org.aksw.jenax.arq.util.node.NodeCustom<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Serializable
public class NodeCustom<T>
extends org.apache.jena.graph.Node_Ext<T>
A
Node implementation that can hold an arbitrary object as its payload.
This class provides static utility methods to find NodeCustom instances in expressions and transform
those expressions into new ones.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.graph.Node
org.apache.jena.graph.Node.NotLiteral -
Field Summary
Fields inherited from class org.apache.jena.graph.Node
ANY, hashANY, hashBNode, hashExt, hashNodeTriple, hashURI, hashVariable, noLangTag, noTextDirection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.sparql.expr.ExprasExpr()static NodeCustom<?>Deprecated.static <T> org.apache.jena.sparql.graph.NodeTransformcreateNodeTransform(Class<?> payloadClass, Function<? super T, ? extends org.apache.jena.graph.Node> mapping) Create a NodeTransform for substituting NodeFacetPath instances with variablesstatic <T> TgetValue()Deprecated.static <I,O> org.apache.jena.sparql.graph.NodeTransform Create a NodeTransform that transforms the payload of NodeCustom instancesstatic <T> Set<T>mentionedValues(Class<?> payloadClass, org.apache.jena.sparql.expr.Expr expr) Scans all NodeCustom instances in the given expression and returns all payloads of type 'payloadClass' as instances of type 'T' You need to ensure yourself that 'payloadClass' is compatible with 'T'.static <T> NodeCustom<T>of(T value) static <T> org.apache.jena.sparql.expr.ExprresolveExpr(org.apache.jena.sparql.expr.Expr expr, Class<?> payloadClass, Function<T, ? extends org.apache.jena.graph.Node> mapping) Substitute all referenced paths in an expression w.r.t.static Stream<NodeCustom<?>>streamCustomNodes(org.apache.jena.sparql.expr.Expr expr) static Stream<?>streamMentionedValues(org.apache.jena.sparql.expr.Expr expr) toString()toString(org.apache.jena.shared.PrefixMapping pmap) visitWith(org.apache.jena.graph.NodeVisitor v) Methods inherited from class org.apache.jena.graph.Node_Ext
equals, get, hashCode, isConcrete, isExtMethods inherited from class org.apache.jena.graph.Node
getBlankNodeLabel, getGraph, getIndexingValue, getLiteral, getLiteralBaseDirection, getLiteralDatatype, getLiteralDatatypeURI, getLiteralLanguage, getLiteralLexicalForm, getLiteralValue, getLocalName, getName, getNameSpace, getTriple, getURI, hasURI, isBlank, isLiteral, isNodeGraph, isNodeTriple, isTripleTerm, isURI, isVariable, matches, sameTermAs, sameValueAs, writeReplace
-
Constructor Details
-
NodeCustom
-
-
Method Details
-
visitWith
- Overrides:
visitWithin classorg.apache.jena.graph.Node_Ext<T>
-
getValue
Deprecated.UseNode_Ext.get() -
asExpr
public org.apache.jena.sparql.expr.Expr asExpr() -
toString
- Specified by:
toStringin classorg.apache.jena.graph.Node
-
create
Deprecated. -
of
-
extract
-
streamCustomNodes
-
streamMentionedValues
-
mentionedValues
public static <T> Set<T> mentionedValues(Class<?> payloadClass, org.apache.jena.sparql.expr.Expr expr) Scans all NodeCustom instances in the given expression and returns all payloads of type 'payloadClass' as instances of type 'T' You need to ensure yourself that 'payloadClass' is compatible with 'T'. The reason is that the payloadClass may be a generic type. -
resolveExpr
public static <T> org.apache.jena.sparql.expr.Expr resolveExpr(org.apache.jena.sparql.expr.Expr expr, Class<?> payloadClass, Function<T, ? extends org.apache.jena.graph.Node> mapping) Substitute all referenced paths in an expression w.r.t. the given path mapping -
createNodeTransform
public static <T> org.apache.jena.sparql.graph.NodeTransform createNodeTransform(Class<?> payloadClass, Function<? super T, ? extends org.apache.jena.graph.Node> mapping) Create a NodeTransform for substituting NodeFacetPath instances with variables -
mapValue
public static <I,O> org.apache.jena.sparql.graph.NodeTransform mapValue(Class<?> payloadClass, Function<? super I, O> mapping) Create a NodeTransform that transforms the payload of NodeCustom instances
-