public class RDFXMLWriter extends Object implements RDFWriter
| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultNamespace |
protected boolean |
headerWritten |
protected Resource |
lastWrittenSubject |
protected Map<String,String> |
namespaceTable |
protected Writer |
writer |
protected boolean |
writingStarted |
| Constructor and Description |
|---|
RDFXMLWriter(OutputStream out)
Creates a new RDFXMLWriter that will write to the supplied OutputStream.
|
RDFXMLWriter(Writer writer)
Creates a new RDFXMLWriter that will write to the supplied Writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
endRDF() |
protected void |
flushPendingStatements() |
RDFFormat |
getRDFFormat() |
void |
handleComment(String comment) |
void |
handleNamespace(String prefix,
String name) |
void |
handleStatement(Statement st) |
protected void |
setNamespace(String prefix,
String name) |
void |
startRDF() |
protected void |
writeAttribute(String attName,
String value) |
protected void |
writeAttribute(String namespace,
String attName,
String value) |
protected void |
writeCharacterData(String chars) |
protected void |
writeEndOfEmptyTag() |
protected void |
writeEndOfStartTag() |
protected void |
writeEndTag(String namespace,
String localName) |
protected void |
writeHeader() |
protected void |
writeIndent() |
protected void |
writeNewLine() |
protected void |
writeStartOfStartTag(String namespace,
String localName) |
protected Writer writer
protected String defaultNamespace
protected boolean writingStarted
protected boolean headerWritten
protected Resource lastWrittenSubject
public RDFXMLWriter(OutputStream out)
out - The OutputStream to write the RDF/XML document to.public RDFXMLWriter(Writer writer)
writer - The Writer to write the RDF/XML document to.public RDFFormat getRDFFormat()
getRDFFormat in interface RDFWriterpublic void startRDF()
startRDF in interface RDFHandlerprotected void writeHeader()
throws IOException
IOExceptionpublic void endRDF()
throws RDFHandlerException
endRDF in interface RDFHandlerRDFHandlerExceptionpublic void handleNamespace(String prefix, String name)
handleNamespace in interface RDFHandlerpublic void handleStatement(Statement st) throws RDFHandlerException
handleStatement in interface RDFHandlerRDFHandlerExceptionpublic void handleComment(String comment) throws RDFHandlerException
handleComment in interface RDFHandlerRDFHandlerExceptionprotected void flushPendingStatements()
throws IOException,
RDFHandlerException
IOExceptionRDFHandlerExceptionprotected void writeStartOfStartTag(String namespace, String localName) throws IOException
IOExceptionprotected void writeAttribute(String attName, String value) throws IOException
IOExceptionprotected void writeAttribute(String namespace, String attName, String value) throws IOException, RDFHandlerException
IOExceptionRDFHandlerExceptionprotected void writeEndOfStartTag()
throws IOException
IOExceptionprotected void writeEndOfEmptyTag()
throws IOException
IOExceptionprotected void writeEndTag(String namespace, String localName) throws IOException
IOExceptionprotected void writeCharacterData(String chars) throws IOException
IOExceptionprotected void writeIndent()
throws IOException
IOExceptionprotected void writeNewLine()
throws IOException
IOExceptionCopyright © 2001-2013 Aduna. All Rights Reserved.