java.lang.Object
org.apache.jena.sparql.util.NodeUtils
Node utilities.
See
NodeCmp
for node comparison operations.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic EqualityTest
Both null or same node :Node.equals
static EqualityTest
Term comparison.static EqualityTest
sameValue by SPARQL rules -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Node
IRI string to Nodestatic Node
asNode
(org.apache.jena.iri.IRI iri) Deprecated.Do not use org.apache.jena.iri.IRI.static int
compareRDFTerms
(Node node1, Node node2) Deprecated.convertToListNodes
(String... namedGraphs) Convert strings to a List ofNodes
.convertToListNodes
(List<String> namedGraphs) Convert strings to a List ofNodes
.convertToSetNodes
(String... namedGraphs) Convert a collection of strings to a set ofNodes
.convertToSetNodes
(Collection<String> namedGraphs) Convert a collection of strings to a set ofNodes
.static boolean
Return true if the node is a literal and has a language tagstatic boolean
isLangString
(Node n) A Node is a language string if it has a language tag.static boolean
A Node is a simple string if: (RDF 1.0) No datatype and no language tag (RDF 1.1) xsd:stringstatic boolean
isXSDNumeric
(Node node) Return true if the node is a literal and has an XSD numeric datatype.nodesToURIs
(Iterator<Node> iter) Convert IRI Nodes to strings.static Node
static String
stringLiteral
(Node literal) Get lexical form of anything that looks like a string literal.
-
Field Details
-
sameNode
Both null or same node :Node.equals
-
sameRdfTerm
Term comparison. Node.equals or lang tags are case insensitive -
sameValue
sameValue by SPARQL rules
-
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
asNode
Deprecated.Do not use org.apache.jena.iri.IRI. UseIRIx
.IRI to Node -
asNode
IRI string to Node -
hasLang
Return true if the node is a literal and has a language tag -
stringLiteral
Get lexical form of anything that looks like a string literal. Returns the string value of plain literal (simple literal or lang string) or XSD string. -
nullToAny
-
nodesToURIs
Convert IRI Nodes to strings. Skip other kinds of Node -
convertToSetNodes
Convert a collection of strings to a set ofNodes
. -
convertToSetNodes
Convert a collection of strings to a set ofNodes
. -
convertToListNodes
Convert strings to a List ofNodes
. -
convertToListNodes
Convert strings to a List ofNodes
. -
compareRDFTerms
Deprecated. -
isXSDNumeric
Return true if the node is a literal and has an XSD numeric datatype. -
isSimpleString
A Node is a simple string if:- (RDF 1.0) No datatype and no language tag
- (RDF 1.1) xsd:string
-
isLangString
A Node is a language string if it has a language tag. (RDF 1.0 and RDF 1.1)
-