|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.simpleframework.xml.stream.CamelCaseStyle
public class CamelCaseStyle
The CamelCaseStyle 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 camel case XML.
<ExampleElement>
<ChildElement exampleAttribute='example'>
<InnerElement>example</InnerElement>
</ChildElement>
</ExampleElement>
Above the camel case 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 Summary | |
|---|---|
CamelCaseStyle()
Constructor for the CamelCaseStyle object. |
|
CamelCaseStyle(boolean element)
Constructor for the CamelCaseStyle object. |
|
CamelCaseStyle(boolean element,
boolean attribute)
Constructor for the CamelCaseStyle object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAttribute(java.lang.String name)
This is used to generate the XML attribute representation of the specified name. |
java.lang.String |
getElement(java.lang.String name)
This is used to generate the XML element representation of the specified name. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
This is used to set the attribute values within this builder. |
void |
setElement(java.lang.String name,
java.lang.String value)
This is used to set the element values within this builder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CamelCaseStyle()
CamelCaseStyle object. This
is used to create a style that will create camel case XML
attributes and elements allowing a consistent format for
generated XML. By default the elements have an upper case
initial character and a lower case attribute.
public CamelCaseStyle(boolean element)
CamelCaseStyle object. This
is used to create a style that will create camel case XML
attributes and elements allowing a consistent format for
generated XML. By default the attributes have a lower case
initial character and an configurable element.
element - if true the element will start as upper case
public CamelCaseStyle(boolean element,
boolean attribute)
CamelCaseStyle object. This
is used to create a style that will create camel case XML
attributes and elements allowing a consistent format for
generated XML. Both the attribute an elements are configurable.
element - if true the element will start as upper caseattribute - if true the attribute starts as upper case| Method Detail |
|---|
public java.lang.String getAttribute(java.lang.String name)
getAttribute in interface Stylename - this is the attribute name that is to be styled
public void setAttribute(java.lang.String name,
java.lang.String value)
name - the name of the XML attribute to be overriddenvalue - the value that is to be used for that attributepublic java.lang.String getElement(java.lang.String name)
getElement in interface Stylename - this is the element name that is to be styled
public void setElement(java.lang.String name,
java.lang.String value)
name - the name of the XML element to be overriddenvalue - the value that is to be used for that element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||