java.lang.Object
org.apache.jena.sparql.expr.nodevalue.NodeFunctions
Implementation of node-centric functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Node
checkAndGetStringLiteral
(String label, NodeValue nv) check and get a string (may be a simple literal, literal with language tag or an XSD string).static void
checkTwoArgumentStringLiterals
(String label, NodeValue arg1, NodeValue arg2) Check for string operations with primary first arg and second arg (e.g.static Node
static NodeValue
static Duration
duration
(int seconds) A duration, tidedstatic Node
Node to Node, skolemizing, and converting strings to URIs.static NodeValue
NodeValue to NodeValue, skolemizing, and converting strings to URIs.static boolean
static NodeValue
static boolean
static NodeValue
static boolean
static NodeValue
static boolean
static NodeValue
static String
static NodeValue
static boolean
langMatches
(String langStr, String langPattern) The algorithm for the SPARQL function "LANGMATCHES".static NodeValue
langMatches
(NodeValue nv, String langPattern) LANGMATCHESstatic NodeValue
langMatches
(NodeValue nv, NodeValue nvPattern) LANGMATCHESstatic boolean
rdfTermEquals
(Node n1, Node n2) static boolean
sameTerm(x,y)static NodeValue
static NodeValue
static String
static NodeValue
static NodeValue
strDatatype
(NodeValue v1, NodeValue v2) static NodeValue
static NodeValue
struuid()
static NodeValue
uuid()
-
Constructor Details
-
NodeFunctions
public NodeFunctions()
-
-
Method Details
-
checkAndGetStringLiteral
check and get a string (may be a simple literal, literal with language tag or an XSD string). -
checkTwoArgumentStringLiterals
Check for string operations with primary first arg and second arg (e.g. CONTAINS). The arguments are not used in the same way and the check operation is not symmetric.- "abc"@en is compatible with "abc"
- "abc" is NOT compatible with "abc"@en
-
sameTerm
-
sameTerm
sameTerm(x,y) -
rdfTermEquals
-
str
-
str
-
sortKey
-
datatype
-
datatype
-
lang
-
lang
-
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
-
isURI
-
isURI
-
isBlank
-
isBlank
-
isLiteral
-
isLiteral
-
iri
NodeValue to NodeValue, skolemizing, and converting strings to URIs. -
iri
Node to Node, skolemizing, and converting strings to URIs. -
struuid
-
uuid
-
strDatatype
-
strLang
-
duration
A duration, tided
-