Package com.epimorphics.rdfutil
Class NodeUtil
- java.lang.Object
-
- com.epimorphics.rdfutil.NodeUtil
-
public class NodeUtil extends Object
Collection of utilities to help working with RDF at Node/Graph level.- Author:
- Dave Reynolds
-
-
Constructor Summary
Constructors Constructor Description NodeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetLocalName(org.apache.jena.graph.Node root)Find the local name of the URI of a node.static org.apache.jena.graph.NodegetPropertyValue(org.apache.jena.graph.Node root, org.apache.jena.graph.Node prop, org.apache.jena.graph.Graph g)Find the first value of the given property of the root node.static List<String>literalValues(org.apache.jena.graph.Node root, org.apache.jena.graph.Node[] props, org.apache.jena.graph.Graph g)Scans the properties in props testing if root has a value for that property.
-
-
-
Method Detail
-
literalValues
public static List<String> literalValues(org.apache.jena.graph.Node root, org.apache.jena.graph.Node[] props, org.apache.jena.graph.Graph g)
Scans the properties in props testing if root has a value for that property. For the first such property it returns a list of all the lexical forms of that property.
-
getPropertyValue
public static org.apache.jena.graph.Node getPropertyValue(org.apache.jena.graph.Node root, org.apache.jena.graph.Node prop, org.apache.jena.graph.Graph g)Find the first value of the given property of the root node. Return null if there's no such property.
-
getLocalName
public static String getLocalName(org.apache.jena.graph.Node root)
Find the local name of the URI of a node. This is for labelling purposes rather than XML serialization so splits at last # or /, may not return an NC name
-
-