All Packages Class Hierarchy This Package Previous Next Index
Class org.ginf.helpers.RDFUtil
java.lang.Object
|
+----org.ginf.helpers.RDFUtil
- public class RDFUtil
- extends Object
Some useful utilities.
-
RDFUtil()
-
-
dumpModel(Model, PrintStream, RDFFactory)
- Dumps the model in a serialized form.
-
get1(Model)
- Returns the first triple of the model
-
getContainerProperties(Resource, Model)
- Collects ordinal properties into a vector
-
getName(String)
- Delivers the name out of the URI (without the namespace prefix).
-
getNS(String)
- Extracts the namespace prefix out of a URI.
-
getOrd(Resource)
- Converts an ordinal property to an integer.
-
getTripleVector(Model)
- Collects the triples of a model in a vector.
-
instanceOf(Resource, Resource, Model)
-
-
isQualified(String)
- Tests if the URI is qualified, i.e.
-
isRDF(Resource)
- Tests if the resource belongs to the RDF syntax/model namespace.
-
isRDF(String)
- Tests if the URI belongs to the RDF syntax/model namespace.
-
noname()
- Creates a new unique unnamed resource.
-
ord(int)
- Creates an ordinal property (rdf:li, rdf:_N)
-
printTriples(Model, PrintStream)
- Prints the triples of a model to the given PrintStream.
-
removeNamespace(String, Model)
- Removes all triples which have something to do with the given namespace
-
subPropertyOf(Resource, Resource, Model)
-
RDFUtil
public RDFUtil()
noname
public static Resource noname()
- Creates a new unique unnamed resource.
ord
public static Resource ord(int i)
- Creates an ordinal property (rdf:li, rdf:_N)
getContainerProperties
public static Vector getContainerProperties(Resource container,
Model m)
- Collects ordinal properties into a vector
getOrd
public static int getOrd(Resource r)
- Converts an ordinal property to an integer.
isQualified
public static boolean isQualified(String s)
- Tests if the URI is qualified, i.e. has a namespace prefix.
getNS
public static String getNS(String uri)
- Extracts the namespace prefix out of a URI.
getName
public static String getName(String uri)
- Delivers the name out of the URI (without the namespace prefix).
isRDF
public static boolean isRDF(String uri)
- Tests if the URI belongs to the RDF syntax/model namespace.
isRDF
public static boolean isRDF(Resource r)
- Tests if the resource belongs to the RDF syntax/model namespace.
instanceOf
public static boolean instanceOf(Resource r,
Resource cls,
Model model)
subPropertyOf
public static boolean subPropertyOf(Resource r,
Resource cls,
Model model)
get1
public static Triple get1(Model m)
- Returns the first triple of the model
printTriples
public static void printTriples(Model m,
PrintStream ps)
- Prints the triples of a model to the given PrintStream.
dumpModel
public static void dumpModel(Model m,
PrintStream ps,
RDFFactory f) throws Exception
- Dumps the model in a serialized form.
getTripleVector
public static Vector getTripleVector(Model m)
- Collects the triples of a model in a vector.
removeNamespace
public static Model removeNamespace(String ns,
Model m)
- Removes all triples which have something to do with the given namespace
All Packages Class Hierarchy This Package Previous Next Index