|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.output.AbstractXmlWriter
public abstract class AbstractXmlWriter
Abstract implementation of XmlWriter
.
Constructor Summary | |
---|---|
AbstractXmlWriter()
|
Method Summary | |
---|---|
protected abstract XmlNamespaceManager |
createNamespaceManager()
Create a new XmlNamespaceManager instance
that can be used by this writer instance |
XmlNamespaceManager |
getNamespaceManager()
Gets the XmlNamespaceManager manager associated with this writer. |
XmlWriter |
writeAttribute(GraphMLXmlAttribute attribute)
Write an XML attribute from the given attribute struct. |
XmlWriter |
writeAttribute(java.lang.String localName,
boolean value)
Convenience method to directly write a boolean valued XML attribute. |
XmlWriter |
writeAttribute(java.lang.String localName,
double value)
Convenience method to directly write a double valued XML attribute. |
XmlWriter |
writeAttribute(java.lang.String localName,
long value)
Convenience method to directly write a integer valued XML attribute. |
XmlWriter |
writeAttribute(java.lang.String localName,
java.lang.String value)
Write a XML attribute node. |
XmlWriter |
writeAttribute(java.lang.String prefix,
java.lang.String localName,
java.lang.String ns,
java.lang.String value)
Write a XML attribute node. |
protected abstract void |
writeAttributeCore(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespace,
java.lang.String value)
The core method that actually writes an attribute. |
XmlWriter |
writeEndElement()
Close a XML element previously opened with writeStartElement(String,String) or
writeStartElement(String,String,String) . |
protected abstract void |
writeEndElementCore()
The core method that actually writes the end element. |
XmlWriter |
writeStartElement(java.lang.String localName,
java.lang.String ns)
Begin a new XML element with given parameters. |
XmlWriter |
writeStartElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String ns)
Begin a new XML element with given parameters. |
protected abstract void |
writeStartElementCore(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespace)
The core method that actually writes the starting element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface y.io.graphml.output.XmlWriter |
---|
flushDocument, writeCData, writeComment, writeDocumentFragment, writeEndDocument, writeProcessingInstruction, writeStartDocument, writeText |
Constructor Detail |
---|
public AbstractXmlWriter()
Method Detail |
---|
public XmlWriter writeAttribute(java.lang.String localName, java.lang.String value)
writeStartElement(String,String)
or
writeStartElement(String,String,String)
.
writeAttribute
in interface XmlWriter
localName
- The local name of the attributevalue
- The value of this attribute
public XmlWriter writeStartElement(java.lang.String prefix, java.lang.String localName, java.lang.String ns)
writeEndElement()
has been called or a new
element has been started.
writeStartElement
in interface XmlWriter
prefix
- The namespace prefix to use for this elementlocalName
- The local name of this elementns
- The namespace of this element
public XmlWriter writeStartElement(java.lang.String localName, java.lang.String ns)
All subsequent output is attached to this element until
writeEndElement()
has been called or a new
element has been started.
The if the namespace is declared in an enclosing scope, the prefix is used from this declaration, otherwise the namespace is declared as default namespace for this element.
writeStartElement
in interface XmlWriter
localName
- The local name of this elementns
- The namespace of this element
protected abstract void writeStartElementCore(java.lang.String prefix, java.lang.String localName, java.lang.String namespace)
prefix
- The prefix or null
.localName
- The name of the element.namespace
- The namespace uri of the element.public XmlWriter writeAttribute(java.lang.String prefix, java.lang.String localName, java.lang.String ns, java.lang.String value)
writeStartElement(String,String)
or
writeStartElement(String,String,String)
.
writeAttribute
in interface XmlWriter
prefix
- The namespace prefix of the attributelocalName
- The local name of the attributens
- The namespace URI of this attributevalue
- The value of this attribute
protected abstract void writeAttributeCore(java.lang.String prefix, java.lang.String localName, java.lang.String namespace, java.lang.String value)
prefix
- The prefix or null
.localName
- The name of the element.namespace
- The namespace uri of the element.value
- The value of the attribute.public XmlWriter writeEndElement()
writeStartElement(String,String)
or
writeStartElement(String,String,String)
.
writeEndElement
in interface XmlWriter
protected abstract void writeEndElementCore()
public XmlNamespaceManager getNamespaceManager()
XmlNamespaceManager
manager associated with this writer.
getNamespaceManager
in interface XmlWriter
protected abstract XmlNamespaceManager createNamespaceManager()
XmlNamespaceManager
instance
that can be used by this writer instance
XmlNamespaceManager
implementation.public XmlWriter writeAttribute(GraphMLXmlAttribute attribute)
attribute
struct.
writeAttribute
in interface XmlWriter
attribute
- Encapsulates the current attribute values.
writer
for writer chaining.public XmlWriter writeAttribute(java.lang.String localName, double value)
writeAttribute
in interface XmlWriter
localName
- The local name of the attributevalue
- The value of this attribute
public XmlWriter writeAttribute(java.lang.String localName, long value)
writeAttribute
in interface XmlWriter
localName
- The local name of the attributevalue
- The value of this attribute
public XmlWriter writeAttribute(java.lang.String localName, boolean value)
writeAttribute
in interface XmlWriter
localName
- The local name of the attributevalue
- The value of this attribute
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |