|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rootdev.javardfa.output.RDFXMLSink
public class RDFXMLSink
A pretty ropey RDF/XML serialiser. Advantages: streams, no dependencies.
Constructor Summary | |
---|---|
RDFXMLSink(OutputStream os,
String... comments)
|
Method Summary | |
---|---|
void |
addLiteral(String subject,
String predicate,
String lex,
String lang,
String datatype)
Add statement with a literal object. |
void |
addObject(String subject,
String predicate,
String object)
Add statement with non-literal object. |
void |
addPrefix(String prefix,
String uri)
Add a prefix mapping. |
void |
end()
Complete parsing |
void |
setBase(String base)
|
protected String[] |
split(String predicate)
|
void |
start()
Begin parsing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RDFXMLSink(OutputStream os, String... comments)
Method Detail |
---|
public void start()
StatementSink
start
in interface StatementSink
public void end()
StatementSink
end
in interface StatementSink
public void addObject(String subject, String predicate, String object)
StatementSink
addObject
in interface StatementSink
subject
- Subject of triplepredicate
- Predicateobject
- Objectpublic void addLiteral(String subject, String predicate, String lex, String lang, String datatype)
StatementSink
addLiteral
in interface StatementSink
subject
- Subject of triplepredicate
- Predicatelex
- Lexical formlang
- Language (may be null)datatype
- Datatype IRI (may be null)public void addPrefix(String prefix, String uri)
StatementSink
addPrefix
in interface StatementSink
protected String[] split(String predicate)
public void setBase(String base)
setBase
in interface StatementSink
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |