|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.rio.rdfxml.RdfXmlWriter
An implementation of the RdfDocumentWriter interface that writes RDF documents in XML-serialized RDF format.
| Field Summary | |
protected Map |
_namespaceTable
|
protected Writer |
_out
|
protected Set |
_stylesheets
|
protected boolean |
_writingStarted
|
| Constructor Summary | |
RdfXmlWriter(OutputStream out)
Creates a new RdfXmlWriter that will write to the supplied OutputStream. |
|
RdfXmlWriter(Writer out)
Creates a new RdfXmlWriter that will write to the supplied Writer. |
|
| Method Summary | |
protected void |
_setNamespace(String prefix,
String name,
boolean fixedPrefix)
|
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 |
_writeIndent()
|
protected void |
_writeNewLine()
|
protected void |
_writeStartOfStartTag(String namespace,
String localName)
|
void |
addStyleSheet(String href,
String type)
|
void |
addStyleSheet(String href,
String type,
String title,
String media,
String charset,
boolean alternate)
Associate a stylesheet with this XML document. |
void |
endDocument()
Ends the document writing. |
void |
setNamespace(String prefix,
String name)
Sets a mapping from a namespace prefix to a namespace name. |
void |
startDocument()
Starts the document writing. |
void |
writeComment(String comment)
Writes a comment to the document. |
void |
writeStatement(Resource subj,
URI pred,
Value obj)
Writes a statement to the document. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Writer _out
protected Map _namespaceTable
protected Set _stylesheets
protected boolean _writingStarted
| Constructor Detail |
public RdfXmlWriter(OutputStream out)
out - The OutputStream to write the RDF/XML document to.public RdfXmlWriter(Writer out)
out - The Writer to write the RDF/XML document to.| Method Detail |
public void setNamespace(String prefix,
String name)
RdfDocumentWriter
setNamespace in interface RdfDocumentWriter
protected void _setNamespace(String prefix,
String name,
boolean fixedPrefix)
public void startDocument()
throws IOException
RdfDocumentWriter
startDocument in interface RdfDocumentWriterIOException
public void endDocument()
throws IOException
RdfDocumentWriter
endDocument in interface RdfDocumentWriterIOException
public void writeStatement(Resource subj,
URI pred,
Value obj)
throws IOException
RdfDocumentWriter
writeStatement in interface RdfDocumentWriterIOException
public void writeComment(String comment)
throws IOException
RdfDocumentWriter
writeComment in interface RdfDocumentWriterIOException
protected void _writeStartOfStartTag(String namespace,
String localName)
throws IOException
IOException
protected void _writeAttribute(String attName,
String value)
throws IOException
IOException
protected void _writeAttribute(String namespace,
String attName,
String value)
throws IOException
IOException
protected void _writeEndOfStartTag()
throws IOException
IOException
protected void _writeEndOfEmptyTag()
throws IOException
IOException
protected void _writeEndTag(String namespace,
String localName)
throws IOException
IOException
protected void _writeCharacterData(String chars)
throws IOException
IOException
protected void _writeIndent()
throws IOException
IOException
protected void _writeNewLine()
throws IOException
IOException
public void addStyleSheet(String href,
String type,
String title,
String media,
String charset,
boolean alternate)
href - Required stylesheet attributetype - Required stylesheet attributetitle - Optional stylesheet attributemedia - Optional stylesheet attributecharset - Optional stylesheet attributealternate - Optional stylesheet attribute
public void addStyleSheet(String href,
String type)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||