public class NodeUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
NodeUtils.EqualityTest |
Modifier and Type | Field and Description |
---|---|
static NodeUtils.EqualityTest |
sameTerm |
static NodeUtils.EqualityTest |
sameValue |
Constructor and Description |
---|
NodeUtils() |
Modifier and Type | Method and Description |
---|---|
static Node |
asNode(org.apache.jena.iri.IRI iri)
IRI to Node
|
static Node |
asNode(String iri)
IRI string to Node
|
static int |
compareRDFTerms(Node node1,
Node node2)
Compare two Nodes, based on their RDF terms forms, not value
|
static Set<Node> |
convertToNodes(Collection<String> uris)
Convert IRI String to Node
|
static boolean |
hasLang(Node node)
Return true if the node is a literal and has a language tag
|
static boolean |
isLangString(Node n)
A Node is a language string if it has a language tag.
|
static boolean |
isSimpleString(Node n)
A Node is a simple string if:
(RDF 1.0) No datatype and no language tag
(RDF 1.1) xsd:string
|
static Iterator<String> |
nodesToURIs(Iterator<Node> iter)
Convert IRI Nodes to strings.
|
static String |
stringLiteral(Node literal)
Get lexical for of anything that looks like a string literal.
|
public static NodeUtils.EqualityTest sameTerm
public static NodeUtils.EqualityTest sameValue
public static Node asNode(org.apache.jena.iri.IRI iri)
public static boolean hasLang(Node node)
public static String stringLiteral(Node literal)
public static Iterator<String> nodesToURIs(Iterator<Node> iter)
public static Set<Node> convertToNodes(Collection<String> uris)
public static int compareRDFTerms(Node node1, Node node2)
public static boolean isSimpleString(Node n)
public static boolean isLangString(Node n)
Licenced under the Apache License, Version 2.0