org.tm4j.panckoucke.impl.renderer .AbstractSAXRenderer
Description
Abstract class that implements functions that can be used by XML-Renderers The class uses SAX to create the XML-Data. A JAXP-compatible parser and transformer are neccessary (e.g. j2sdk 1.4)
Inheritance Hierarchy
- java.lang.Object
- AbstractSAXRenderer
Interfaces
Field Summary | |
---|---|
handler |
Method Summary | |
---|---|
void |
addAttribute(org.xml.sax.helpers.AttributesImpl att,java.lang.String name,java.lang.String type,java.lang.String value)
Adds a attribute to the attribute list and uses the default namespace
|
void |
addAttribute(org.xml.sax.helpers.AttributesImpl att,java.lang.String ns,java.lang.String name,java.lang.String type,java.lang.String value)
Adds a attribute declaration to the attribute list
|
void |
addNamespace(java.lang.String nsshort,java.lang.String ns)
Adds a new namespace to the list of namespaces
Namespaces are represented by a short name and a URI
|
void |
addParserFeature(java.lang.String feature,boolean set)
Adds a new parser feature
|
void |
addText(java.lang.String txt)
Adds text to the output
|
void |
buildXML(org.tm4j.panckoucke.model.AMNode center,java.lang.Object streamObject)
This method transfers the abstract model to xml
The method is called recursively in order to process the
complete abstractModel.
|
void |
closeDocument(org.tm4j.panckoucke.model.AMNode center)
Closes the document
|
void |
endTag(java.lang.String namespace,java.lang.String tag)
Writes a end tag to the output stream
|
void |
endTag(java.lang.String tag)
Writes a end tag to the output stream and uses the default namespace
|
java.util.Map |
getNamespaces()
Returns all known Namespaces
|
java.lang.Object |
getOutputStream()
Returns the defined Output stream object
|
java.util.Map |
getParserFeatures()
Returns a map with all parser features
|
void |
init()
Initializes the maps and the namespaces
|
void |
openDocument(org.tm4j.panckoucke.model.AMNode center,java.lang.Object streamObject)
Initializes the transformer that writes the XML-Content
A SAX Transformer is used that starts a identy transformation
to write the new content in a file.
|
void |
renderModel(org.tm4j.panckoucke.model.AModel model)
Serializes the model to xml-notation.
|
void |
serializeNodes(java.util.Set nodes,java.util.Set arcs)
Adds a Tag for every node,
contained in the set
|
void |
setCurrentNamespace(java.lang.String ns)
Sets the namespace for the next startTag, endTag commands
|
void |
setDefaultNamespace(java.lang.String ns)
Sets the default namespace for the XML document
|
void |
setOutputStream(java.lang.Object streamingObject)
Sets the object for the output stream
It can be either a OutputStreamer- or a Writer-Object or
a file URL where a file is written to.
|
void |
setParserFeatures(java.util.Map features)
Sets the parser features
|
void |
startRootTag(java.lang.String tag,org.xml.sax.helpers.AttributesImpl att)
Creates the starting root tag of the xml file.
|
void |
startTag(java.lang.String namespace,java.lang.String tag,org.xml.sax.Attributes attributes)
Prints a start tag
|
void |
startTag(java.lang.String tag,org.xml.sax.Attributes attributes)
Prints a start tag and uses the default namespace
|
void |
traverseGraph(org.tm4j.panckoucke.model.AMNode center,java.util.Set nodes,java.util.Set arcset)
traverses the graph, seruializes the arcs.
|
Meta Data (3)
@author
:
Christoph Froehlich, c_froehlich at users.sourceforge.net
@author
:
Martin Stockhammer, m.stockhammer@web.de