| Modifier and Type | Class and Description |
|---|---|
class |
XMLWriterImpl.XMLElement
XML element.
|
| Constructor and Description |
|---|
XMLWriterImpl(PrintWriter writer,
XMLWriterNamespaceManager xmlWriterNamespaceManager,
String xmlBase,
OWLOntologyWriterConfiguration preferences) |
| Modifier and Type | Method and 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 RDF writer produces.
|
void |
setWrapAttributes(boolean b)
Causes the current element's attributes to be wrapped in the output.
|
void |
startDocument(IRI rootElement)
Starts writing the document.
|
void |
writeAttribute(IRI attr,
String val)
Writes an attribute of the last element to be started (that has not been closed).
|
void |
writeAttribute(String 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(IRI name)
Writes the start of an element.
|
void |
writeTextContent(String text)
Writes a text element.
|
public XMLWriterImpl(PrintWriter writer, XMLWriterNamespaceManager xmlWriterNamespaceManager, String xmlBase, OWLOntologyWriterConfiguration preferences)
writer - writerxmlWriterNamespaceManager - namespace managerxmlBase - XML basepreferences - XML writer preferences instancepublic String getDefaultNamespace()
public String getXMLBase()
getXMLBase in interface XMLWriterpublic XMLWriterNamespaceManager getNamespacePrefixes()
XMLWritergetNamespacePrefixes in interface XMLWriterpublic void setEncoding(String encoding)
XMLWriterUTF-8.setEncoding in interface XMLWriterencoding - The encoding.public void setWrapAttributes(boolean b)
XMLWritersetWrapAttributes in interface XMLWriterb - If true then the attributes will be wrapped if they are long. If false then no attribute wrapping will occur.public void writeStartElement(IRI name)
XMLWriterwriteStartElement in interface XMLWritername - The tag name of the element to be written. This must be a valid QName. @throws
IllegalElementNameException if the specified name is not a valid QNamepublic void writeEndElement()
XMLWriterwriteEndElement in interface XMLWriterpublic void writeAttribute(String attr, String val)
XMLWriterwriteAttribute in interface XMLWriterattr - The name of the attributeval - The value of the attributepublic void writeAttribute(IRI attr, String val)
XMLWriterwriteAttribute in interface XMLWriterattr - The name of the attributeval - The value of the attributepublic void writeTextContent(String text)
XMLWriterwriteTextContent in interface XMLWritertext - The text to be writtenpublic void writeComment(String commentText)
writeComment in interface XMLWritercommentText - comment textpublic void startDocument(IRI rootElement)
XMLWriterstartDocument in interface XMLWriterrootElement - The iri of the root element.public void endDocument()
XMLWriterendDocument in interface XMLWriterCopyright © 2021 The University of Manchester. All rights reserved.