|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.xml.XMLMetaData
Class defining the 'rules' for converting data to and from XML. Generally an application will create one instance of this class and reuse it throughout the application. This can be achieved by customising the default obtained from getDefault.
Constructor Summary | |
XMLMetaData()
Constructor |
Method Summary | |
void |
addXMLConvertor(XMLConvertor convertor)
Add an xml convertor used to convert to and from xml at the end of the list of convertors. |
void |
addXMLFilter(XMLFilter filter)
Add an xml convertor used to convert to and from xml at the end of the list of convertors. |
boolean |
getBasicTypeAsAttribute()
Gets whether basic types should be output as attributes (true) or elements (false). |
static XMLMetaData |
getDefault()
Constructor |
XMLName |
getIDAttributeName()
Gets the id attribute name used for object identification. |
XMLName |
getIDREFAttributeName()
Gets the idref attribute name used for object identification. |
XMLName |
getKeyAttributeName()
Gets the key attribute name used for Map keys. |
XMLName |
getNullAttributeName()
Gets the null attribute name used to indicate a null value. |
boolean |
getPrettyPrint()
Gets whether to pretty print or not. |
XMLName |
getTypeAttributeName()
Gets the type attribute name used for object type identification. |
boolean |
getUseCollectionsElement()
Gets whether collections should have their own element wrapping the contents of the collection (true) or the contents should be directly under the bean's element (false). |
boolean |
getUseCollectionsElementWhenEmpty()
Gets whether a collection element should be output (true) if a collection has zero size and no attributes. |
boolean |
getUseIdrefAttributeOnRecursionOnly()
Gets whether the idref attribute should be only be used to block recursion (true) or whenever the same bean is encountered (false) Default is to send whenever the bean is encountered twice (false). |
boolean |
getUseNullAttribute()
Gets whether nulls should be output (true) or ignored (false). |
boolean |
getUseTypeAttribute()
Gets whether the type attribute should be output (true) or not (false). |
boolean |
getUseTypeAttributeAlways()
Gets whether the type attribute should be always be output (true) or only when required (false). |
java.util.List |
getXMLConvertorList()
Get the list of xml convertors used to convert to and from xml. |
java.util.List |
getXMLFilterList()
Get the list of xml convertors used to convert to and from xml. |
void |
insertXMLConvertor(XMLConvertor convertor)
Add an xml convertor used to convert to and from xml at the start of the list of convertors. |
void |
insertXMLFilter(XMLFilter filter)
Add an xml convertor used to convert to and from xml at the start of the list of convertors. |
void |
setBasicTypeAsAttribute(boolean basicTypeAsAttribute)
Sets whether basic types should be output as attributes (true) or elements (false). |
void |
setIDAttributeName(XMLName idAttributeName)
Sets the id attribute name used for object identification. |
void |
setIDREFAttributeName(XMLName idrefAttributeName)
Sets the idref attribute name used for object identification. |
void |
setKeyAttributeName(XMLName keyAttributeName)
Sets the key attribute name used for Map keys. |
void |
setNullAttributeName(XMLName nullAttributeName)
Sets the null attribute name used to indicate a null value. |
void |
setPrettyPrint(boolean prettyPrint)
Sets whether to pretty print or not. |
void |
setTypeAttributeName(XMLName typeAttributeName)
Sets the type attribute name used for object type identification. |
void |
setUseCollectionsElement(boolean collections)
Sets whether collections should have their own element wrapping the contents of the collection (true) or the contents should be directly under the bean's element (false). |
void |
setUseCollectionsElementWhenEmpty(boolean outputEmptyCollections)
Sets whether a collection element should be output (true) if a collection has zero size and no attributes. |
void |
setUseIdrefAttributeOnRecursionOnly(boolean outputIDREF)
Sets whether the idref attribute should be only be used to block recursion (true) or whenever the same bean is encountered (false) Default is to send whenever the bean is encountered twice (false). |
void |
setUseNullAttribute(boolean outputNulls)
Sets whether nulls should be output (true) or ignored (false). |
void |
setUseTypeAttribute(boolean outputType)
Sets whether the type attribute should be output (true) or not (false). |
void |
setUseTypeAttributeAlways(boolean outputTypeAlways)
Sets whether the type attribute should be always be output (true) or only when required (false). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLMetaData()
Method Detail |
public static XMLMetaData getDefault()
public XMLName getKeyAttributeName()
public void setKeyAttributeName(XMLName keyAttributeName)
keyAttributeName
- The key namepublic XMLName getIDAttributeName()
public void setIDAttributeName(XMLName idAttributeName)
idAttributeName
- The id namepublic XMLName getIDREFAttributeName()
public void setIDREFAttributeName(XMLName idrefAttributeName)
idrefAttributeName
- The idref namepublic XMLName getTypeAttributeName()
public void setTypeAttributeName(XMLName typeAttributeName)
typeAttributeName
- The type namepublic XMLName getNullAttributeName()
public void setNullAttributeName(XMLName nullAttributeName)
nullAttributeName
- The null namepublic boolean getBasicTypeAsAttribute()
public void setBasicTypeAsAttribute(boolean basicTypeAsAttribute)
basicTypeAsAttribute
- true to output basic types as attributespublic boolean getUseNullAttribute()
public void setUseNullAttribute(boolean outputNulls)
outputNulls
- true to output nulls, false to ignorepublic boolean getUseTypeAttribute()
public void setUseTypeAttribute(boolean outputType)
outputType
- true to output type attributespublic boolean getUseTypeAttributeAlways()
public void setUseTypeAttributeAlways(boolean outputTypeAlways)
outputTypeAlways
- true to output type always, false to only send when requiredpublic boolean getUseIdrefAttributeOnRecursionOnly()
public void setUseIdrefAttributeOnRecursionOnly(boolean outputIDREF)
public boolean getUseCollectionsElement()
public void setUseCollectionsElement(boolean collections)
public boolean getUseCollectionsElementWhenEmpty()
public void setUseCollectionsElementWhenEmpty(boolean outputEmptyCollections)
outputEmptyCollections
- true to output empty collections, false to ignorepublic boolean getPrettyPrint()
public void setPrettyPrint(boolean prettyPrint)
prettyPrint
- pretty print flagpublic void addXMLConvertor(XMLConvertor convertor)
convertor
- the convertorpublic void insertXMLConvertor(XMLConvertor convertor)
convertor
- the convertorpublic java.util.List getXMLConvertorList()
public void addXMLFilter(XMLFilter filter)
public void insertXMLFilter(XMLFilter filter)
public java.util.List getXMLFilterList()
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |