Modifier and Type | Class | Description |
---|---|---|
class |
XMLWriterImpl.XMLElement |
xml element
|
Constructor | Description |
---|---|
XMLWriterImpl(Writer writer,
XMLWriterNamespaceManager xmlWriterNamespaceManager,
String xmlBase,
XMLWriterPreferences preferences) |
Modifier and Type | Method | Description |
---|---|---|
void |
endDocument() |
Causes all open elements, including the document root element, to be
closed.
|
String |
getDefaultNamespace() |
|
XMLWriterNamespaceManager |
getNamespacePrefixes() |
Gets the Writer's namespace manager.
|
String |
getXMLBase() |
|
void |
setEncoding(String encoding) |
Sets the encoding for the document that the rdfwriter produces.
|
void |
setWrapAttributes(boolean b) |
Causes the current element's attributes to be wrapped in the output.
|
void |
startDocument(org.semanticweb.owlapi.model.IRI rootElement) |
Starts writing the document.
|
void |
writeAttribute(String attr,
String val) |
Writes an attribute of the last element to be started (that has not been
closed).
|
void |
writeAttribute(org.semanticweb.owlapi.model.IRI attr,
String val) |
Writes an attribute of the last element to be started (that has not been
closed).
|
void |
writeComment(String commentText) |
|
void |
writeEndElement() |
Writes the closing tag of the last element to be started.
|
void |
writeStartElement(org.semanticweb.owlapi.model.IRI name) |
Writes the start of an element.
|
void |
writeTextContent(String text) |
Writes a text element
|
public XMLWriterImpl(@Nonnull Writer writer, @Nonnull XMLWriterNamespaceManager xmlWriterNamespaceManager, @Nonnull String xmlBase, @Nonnull XMLWriterPreferences preferences)
writer
- writerxmlWriterNamespaceManager
- xmlWriterNamespaceManagerxmlBase
- xmlBasepreferences
- xml writer preferences instancepublic String getDefaultNamespace()
public String getXMLBase()
getXMLBase
in interface XMLWriter
public XMLWriterNamespaceManager getNamespacePrefixes()
XMLWriter
getNamespacePrefixes
in interface XMLWriter
public void setEncoding(String encoding)
XMLWriter
setEncoding
in interface XMLWriter
encoding
- The encoding.public void setWrapAttributes(boolean b)
XMLWriter
setWrapAttributes
in interface XMLWriter
b
- If true
then the attributes will be wrapped if they are
long. If false
then no attribute wrapping will occur.public void writeStartElement(org.semanticweb.owlapi.model.IRI name) throws IOException
XMLWriter
writeStartElement
in interface XMLWriter
name
- The tag name of the element to be written. This must be a valid
QName.IOException
- if there was an IO problempublic void writeEndElement() throws IOException
XMLWriter
writeEndElement
in interface XMLWriter
IOException
- if there was an IO problempublic void writeAttribute(String attr, String val)
XMLWriter
writeAttribute
in interface XMLWriter
attr
- The name of the attributeval
- The value of the attributepublic void writeAttribute(@Nonnull org.semanticweb.owlapi.model.IRI attr, String val)
XMLWriter
writeAttribute
in interface XMLWriter
attr
- The name of the attributeval
- The value of the attributepublic void writeTextContent(String text)
XMLWriter
writeTextContent
in interface XMLWriter
text
- The text to be writtenpublic void writeComment(String commentText) throws IOException
writeComment
in interface XMLWriter
commentText
- commentTextIOException
- if there was an IO problempublic void startDocument(@Nonnull org.semanticweb.owlapi.model.IRI rootElement) throws IOException
XMLWriter
startDocument
in interface XMLWriter
rootElement
- The iri of the root element.IOException
- if there was an IO problempublic void endDocument() throws IOException
XMLWriter
endDocument
in interface XMLWriter
IOException
- if there was an IO problemCopyright © 2018 The University of Manchester. All rights reserved.