public class HyphenStyle extends Object implements Style
HyphenStyle is used to represent an XML style
that can be applied to a serialized object. A style can be used to
modify the element and attribute names for the generated document.
This styles can be used to generate hyphenated XML.
<example-element>
<child-element example-attribute='example'>
<inner-element>example</inner-element>
</child-element>
</example-element>
Above the hyphenated XML elements and attributes can be generated
from a style implementation. Styles enable the same objects to be
serialized in different ways, generating different styles of XML
without having to modify the class schema for that object.| Constructor and Description |
|---|
HyphenStyle()
Constructor for the
HyphenStyle object. |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(String name)
This is used to generate the XML attribute representation of
the specified name.
|
String |
getElement(String name)
This is used to generate the XML element representation of
the specified name.
|
void |
setAttribute(String name,
String value)
This is used to set the attribute values within this builder.
|
void |
setElement(String name,
String value)
This is used to set the element values within this builder.
|
public HyphenStyle()
HyphenStyle object. This is
used to create a style that will hyphenate XML attributes
and elements allowing a consistent format for generated XML.public String getAttribute(String name)
getAttribute in interface Stylename - this is the attribute name that is to be styledpublic void setAttribute(String name, String value)
name - the name of the XML attribute to be overriddenvalue - the value that is to be used for that attributepublic String getElement(String name)
getElement in interface Stylename - this is the element name that is to be styledpublic void setElement(String name, String value)
name - the name of the XML element to be overriddenvalue - the value that is to be used for that element