public abstract class AbstractWriter extends Object
ExecutionNodeWriter
and SymbolicLayoutWriter which encodes an object structure as XML.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_ENCODING
Attribute name to store encodings.
|
static String |
ATTRIBUTE_XML_ID
Attribute name to store the XML ID.
|
static String |
DEFAULT_ENCODING
The default enconding.
|
static String |
LEADING_WHITE_SPACE_PER_LEVEL
The used leading white space in each level.
|
static String |
NEW_LINE
New line.
|
| Constructor and Description |
|---|
AbstractWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendAttribute(String attributeName,
String value,
StringBuffer sb)
Adds an XML attribute to the given
StringBuffer. |
protected void |
appendEmptyTag(int level,
String tagName,
Map<String,String> attributeValues,
StringBuffer sb)
Appends an empty tag to the given
StringBuffer. |
protected void |
appendEndTag(int level,
String tagName,
StringBuffer sb)
Appends an end tag to the given
StringBuffer. |
protected void |
appendNewLine(StringBuffer sb)
Adds a line break to the given
StringBuffer. |
protected void |
appendStartTag(int level,
String tagName,
Map<String,String> attributeValues,
StringBuffer sb)
Appends a start tag to the given
StringBuffer. |
protected void |
appendWhiteSpace(int level,
StringBuffer sb)
Adds leading white space to the
StringBuffer. |
protected void |
appendXmlHeader(String encoding,
StringBuffer sb)
Adds an XML header to the given
StringBuffer. |
public static final String NEW_LINE
public static final String LEADING_WHITE_SPACE_PER_LEVEL
public static final String DEFAULT_ENCODING
public static final String ATTRIBUTE_ENCODING
public static final String ATTRIBUTE_XML_ID
protected void appendEmptyTag(int level,
String tagName,
Map<String,String> attributeValues,
StringBuffer sb)
StringBuffer.level - The level.tagName - The tag name.attributeValues - The attributes.sb - The StringBuffer to append to.protected void appendStartTag(int level,
String tagName,
Map<String,String> attributeValues,
StringBuffer sb)
StringBuffer.level - The level.tagName - The tag name.attributeValues - The attributes.sb - The StringBuffer to append to.protected void appendEndTag(int level,
String tagName,
StringBuffer sb)
StringBuffer.level - The level.tagName - The tag name.sb - The StringBuffer to append to.protected void appendWhiteSpace(int level,
StringBuffer sb)
StringBuffer.level - The level in the tree used for leading white space (formating).sb - The StringBuffer to write to.protected void appendAttribute(String attributeName, String value, StringBuffer sb)
StringBuffer.attributeName - The attribute name.value - The attribute value.sb - The StringBuffer to write to.protected void appendXmlHeader(String encoding, StringBuffer sb)
StringBuffer.encoding - The encoding to use.sb - The StringBuffer to write to.protected void appendNewLine(StringBuffer sb)
StringBuffer.sb - The StringBuffer to write to.