|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.rdf.util.RDFUtil
Useful utility methods.
Constructor Summary | |
RDFUtil()
|
Method Summary | |
static void |
dumpModel(Model m,
java.io.PrintStream ps,
RDFSerializer s)
Dumps the model in a serialized form. |
static java.lang.String |
dumpModel(Model m,
RDFSerializer s)
Dumps the model in a serialized form in a string |
static Statement |
get1(Model m)
Returns the first triple of the model |
static int |
getOrd(Resource r)
Converts an ordinal property to an integer. |
static Model |
getReachable(Resource r,
Model m)
returns a subgraph of "m" containing "r" and all nodes reachable from "r" via directed edges. |
static java.util.Vector |
getStatementVector(Model m)
Collects the triples of a model in a vector. |
static java.lang.String |
guessName(java.lang.String uri)
Delivers the name out of the URI (without the namespace prefix). |
static java.lang.String |
guessNamespace(java.lang.String uri)
Extracts the namespace prefix out of a URI. |
static boolean |
isQualified(java.lang.String s)
Tests if the URI is qualified, i.e. |
static boolean |
isRDF(Resource r)
Tests if the resource belongs to the RDF syntax/model namespace. |
static boolean |
isRDF(java.lang.String uri)
Tests if the URI belongs to the RDF syntax/model namespace. |
static Resource |
noname()
Creates a new unique unnamed resource. |
static java.lang.String |
normalizeURI(java.lang.String uri)
|
static Resource |
ord(int i)
Creates an ordinal property (rdf:li, rdf:_N) |
static void |
parse(java.lang.String fileNameOrURL,
RDFParser parser,
Model model)
|
static void |
printStatements(Model m,
java.io.PrintStream ps)
Prints the triples of a model to the given PrintStream. |
static Model |
removeNamespace(java.lang.String ns,
Model m)
Removes all triples which have something to do with the given namespace |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RDFUtil()
Method Detail |
public static Resource noname()
public static Resource ord(int i)
public static int getOrd(Resource r)
public static boolean isQualified(java.lang.String s)
public static java.lang.String guessNamespace(java.lang.String uri)
public static java.lang.String guessName(java.lang.String uri)
public static boolean isRDF(java.lang.String uri)
public static boolean isRDF(Resource r)
public static Statement get1(Model m)
public static void printStatements(Model m, java.io.PrintStream ps)
public static void dumpModel(Model m, java.io.PrintStream ps, RDFSerializer s) throws java.lang.Exception
public static java.lang.String dumpModel(Model m, RDFSerializer s) throws java.lang.Exception
public static java.util.Vector getStatementVector(Model m)
public static Model removeNamespace(java.lang.String ns, Model m)
public static Model getReachable(Resource r, Model m)
public static void parse(java.lang.String fileNameOrURL, RDFParser parser, Model model) throws java.io.IOException, SAXException, java.net.MalformedURLException
public static java.lang.String normalizeURI(java.lang.String uri)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |