|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.coode.xml.XMLWriterImpl
public class XMLWriterImpl
Author: Matthew Horridge
The University Of Manchester
Medical Informatics Group
Date: 30-May-2006
Nested Class Summary | |
---|---|
class |
XMLWriterImpl.XMLElement
|
Constructor Summary | |
---|---|
XMLWriterImpl(java.io.Writer writer,
XMLWriterNamespaceManager xmlWriterNamespaceManager)
|
|
XMLWriterImpl(java.io.Writer writer,
XMLWriterNamespaceManager xmlWriterNamespaceManager,
java.lang.String xmlBase)
|
Method Summary | |
---|---|
void |
endDocument()
Causes all open elements, including the document root element, to be closed. |
java.lang.String |
getDefaultNamespace()
|
XMLWriterNamespaceManager |
getNamespacePrefixes()
Gets the Writer's namespace manager. |
java.lang.String |
getXMLBase()
|
java.net.URI |
getXMLBaseAsURI()
|
void |
setEncoding(java.lang.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(java.lang.String rootElementName)
Starts writing the document. |
void |
writeAttribute(java.lang.String attr,
java.lang.String val)
Writes an attribute of the last element to be started (that has not been closed). |
void |
writeComment(java.lang.String commentText)
|
void |
writeEndElement()
Writes the closing tag of the last element to be started. |
void |
writeStartElement(java.lang.String name)
Writes the start of an element. |
void |
writeTextContent(java.lang.String text)
Writes a text element |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLWriterImpl(java.io.Writer writer, XMLWriterNamespaceManager xmlWriterNamespaceManager)
public XMLWriterImpl(java.io.Writer writer, XMLWriterNamespaceManager xmlWriterNamespaceManager, java.lang.String xmlBase)
Method Detail |
---|
public java.lang.String getDefaultNamespace()
public java.lang.String getXMLBase()
getXMLBase
in interface XMLWriter
public java.net.URI getXMLBaseAsURI()
public XMLWriterNamespaceManager getNamespacePrefixes()
XMLWriter
getNamespacePrefixes
in interface XMLWriter
public void setEncoding(java.lang.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(java.lang.String name) throws java.io.IOException
XMLWriter
writeStartElement
in interface XMLWriter
name
- The tag name of the element to be written. This must be a valid QName.
java.io.IOException
- if there was an IO problempublic void writeEndElement() throws java.io.IOException
XMLWriter
writeEndElement
in interface XMLWriter
java.io.IOException
- if there was an IO problempublic void writeAttribute(java.lang.String attr, java.lang.String val)
XMLWriter
writeAttribute
in interface XMLWriter
attr
- The name of the attributeval
- The value of the attributepublic void writeTextContent(java.lang.String text)
XMLWriter
writeTextContent
in interface XMLWriter
text
- The text to be writtenpublic void writeComment(java.lang.String commentText) throws java.io.IOException
writeComment
in interface XMLWriter
java.io.IOException
public void startDocument(java.lang.String rootElementName) throws java.io.IOException
XMLWriter
startDocument
in interface XMLWriter
rootElementName
- The name of the root element.
java.io.IOException
- if there was an IO problempublic void endDocument() throws java.io.IOException
XMLWriter
endDocument
in interface XMLWriter
java.io.IOException
- if there was an IO problem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |