|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 XMLWriterpublic java.net.URI getXMLBaseAsURI()
public XMLWriterNamespaceManager getNamespacePrefixes()
XMLWriter
getNamespacePrefixes in interface XMLWriterpublic void setEncoding(java.lang.String encoding)
XMLWriter
setEncoding in interface XMLWriterencoding - The encoding.public void setWrapAttributes(boolean b)
XMLWriter
setWrapAttributes 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(java.lang.String name)
throws java.io.IOException
XMLWriter
writeStartElement in interface XMLWritername - The tag name of the element to be written. This must be a valid QName.
java.io.IOException - if there was an IO problem
public void writeEndElement()
throws java.io.IOException
XMLWriter
writeEndElement in interface XMLWriterjava.io.IOException - if there was an IO problem
public void writeAttribute(java.lang.String attr,
java.lang.String val)
XMLWriter
writeAttribute in interface XMLWriterattr - The name of the attributeval - The value of the attributepublic void writeTextContent(java.lang.String text)
XMLWriter
writeTextContent in interface XMLWritertext - The text to be written
public void writeComment(java.lang.String commentText)
throws java.io.IOException
writeComment in interface XMLWriterjava.io.IOException
public void startDocument(java.lang.String rootElementName)
throws java.io.IOException
XMLWriter
startDocument in interface XMLWriterrootElementName - The name of the root element.
java.io.IOException - if there was an IO problem
public void endDocument()
throws java.io.IOException
XMLWriter
endDocument in interface XMLWriterjava.io.IOException - if there was an IO problem
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||