java.lang.Object
org.apache.jena.sparql.expr.nodevalue.NodeFunctions
Implementation of node-centric functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.graph.Nodedatatype(org.apache.jena.graph.Node node) static NodeValuestatic Durationduration(int seconds) A duration, tidedstatic booleanhasLang(org.apache.jena.graph.Node node) static NodeValuestatic booleanhasLangDir(org.apache.jena.graph.Node node) static NodeValuehasLangDir(NodeValue nv) static org.apache.jena.graph.NodeNode to Node, skolemizing, and converting strings to URIs.static NodeValueNodeValue to NodeValue, skolemizing, and converting strings to URIs.static booleanisBlank(org.apache.jena.graph.Node node) static NodeValuestatic booleanisDoubleNaN(NodeValue nv) Test whether the argument is NaN as a double : "NaN"^^xsd:double.static booleanisFloatNaN(NodeValue nv) Test whether the argument is NaN as a float : "NaN"^^xsd:float.static booleanisIRI(org.apache.jena.graph.Node node) static NodeValuestatic booleanisLiteral(org.apache.jena.graph.Node node) static NodeValuestatic booleanTest whether the argument is a NaN, either as a double or as a float.static NodeValuestatic booleanisURI(org.apache.jena.graph.Node node) static NodeValuestatic Stringlang(org.apache.jena.graph.Node node) static NodeValuestatic Stringlangdir(org.apache.jena.graph.Node node) static NodeValuestatic booleanlangMatches(String langStr, String langPattern) The algorithm for the SPARQL function "LANGMATCHES".static NodeValuelangMatches(NodeValue nv, String langPattern) LANGMATCHESstatic NodeValuelangMatches(NodeValue nv, NodeValue nvPattern) LANGMATCHESstatic booleannotSameValue(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2) notSameValue as "not value-equals"static booleannotSameValue(NodeValue nv1, NodeValue nv2) notSameValue as "not value-equals"static booleanrdfTermEqual11_legacy(org.apache.jena.graph.Node n1, org.apache.jena.graph.Node n2) Deprecated, for removal: This API element is subject to removal in a future version.static booleansameTerm(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2) sameTerm(x,y)static NodeValuestatic booleansameValue(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2) sameValue as equalitystatic booleansameValue as equalitystatic NodeValueThe sameValue function in SPARQL.static NodeValuestatic Stringstr(org.apache.jena.graph.Node node) static NodeValuestatic NodeValuestrDatatype(NodeValue v1, NodeValue v2) static NodeValuestatic NodeValuestrLangDir(NodeValue v1, NodeValue v2, NodeValue v3) static NodeValuestruuid()static NodeValueuuid()
-
Constructor Details
-
NodeFunctions
public NodeFunctions()
-
-
Method Details
-
sameTerm
-
sameTerm
public static boolean sameTerm(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2) sameTerm(x,y) -
sameValue
sameValue as equality -
sameValue
public static boolean sameValue(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2) sameValue as equality -
notSameValue
notSameValue as "not value-equals" -
notSameValue
public static boolean notSameValue(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2) notSameValue as "not value-equals" -
sameValueFunction
The sameValue function in SPARQL. NaN's do not follow value-equality. -
isNaN
Test whether the argument is a NaN, either as a double or as a float. -
isDoubleNaN
Test whether the argument is NaN as a double : "NaN"^^xsd:double. -
isFloatNaN
Test whether the argument is NaN as a float : "NaN"^^xsd:float. -
rdfTermEqual11_legacy
@Deprecated(forRemoval=true) public static boolean rdfTermEqual11_legacy(org.apache.jena.graph.Node n1, org.apache.jena.graph.Node n2) Deprecated, for removal: This API element is subject to removal in a future version. -
str
-
str
-
sortKey
-
datatype
-
datatype
public static org.apache.jena.graph.Node datatype(org.apache.jena.graph.Node node) -
isNumeric
-
hasLang
-
hasLang
public static boolean hasLang(org.apache.jena.graph.Node node) -
hasLangDir
-
hasLangDir
public static boolean hasLangDir(org.apache.jena.graph.Node node) -
lang
-
lang
-
langdir
-
langdir
-
langMatches
LANGMATCHES- Parameters:
nv- The language stringnvPattern- The pattern to match against- Returns:
- Boolean nodeValue
-
langMatches
LANGMATCHES- Parameters:
nv- The language stringlangPattern- The pattern to match against- Returns:
- Boolean nodeValue
-
langMatches
The algorithm for the SPARQL function "LANGMATCHES". Matching in SPARQL is defined to be the language tag matching of RFC 4647, part of BCP 47.SPARQL uses basic matching which is single "*" or a prefix of subtags.
This code does not implement extended matching correctly.
- Parameters:
langStr- The language stringlangPattern- The pattern to match against- Returns:
- Whether there is a match.
-
isIRI
-
isIRI
public static boolean isIRI(org.apache.jena.graph.Node node) -
isURI
-
isURI
public static boolean isURI(org.apache.jena.graph.Node node) -
isBlank
-
isBlank
public static boolean isBlank(org.apache.jena.graph.Node node) -
isLiteral
-
isLiteral
public static boolean isLiteral(org.apache.jena.graph.Node node) -
iri
NodeValue to NodeValue, skolemizing, and converting strings to URIs. -
iri
Node to Node, skolemizing, and converting strings to URIs. -
struuid
-
uuid
-
strDatatype
-
strLang
-
strLangDir
-
duration
A duration, tided
-