Class XmlMappingMetaData
- java.lang.Object
- 
- net.officefloor.plugin.xml.unmarshall.tree.XmlMappingMetaData
 
- 
 public class XmlMappingMetaData extends java.lang.ObjectMeta-data of theXmlContext.- Author:
- Daniel Sagenschneider
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringelementNameName of XML element/attribute which is the focus of this mapping.protected java.lang.StringformatFormat for loading a value.protected java.lang.StringidIdentifies this XML mapping for reuse (or if already configured to use the same configuration).protected java.lang.StringloadMethodNameName of method to load value/object to target object.protected java.lang.StringloadObjectClassNameShould this be an object loading mapping, then this should be specified and be the fully quanlified name of the class of the object to load.protected java.util.List<XmlMappingMetaData>loadObjectConfigurationThe mappings of the loaded object, should theloadObjectClassNamebe specified.protected java.lang.StringstaticValueStatic value to load to target object.protected XmlMappingTypetypeType of this mapping.
 - 
Constructor SummaryConstructors Constructor Description XmlMappingMetaData()Default constructor to allow theTreeXmlUnmarshallerto configure itself.XmlMappingMetaData(java.lang.Class<?> targetObjectType, java.lang.String rootElementName, XmlMappingMetaData[] targetObjectConfiguration)Convenience constructor for configuring the root of the mapping tree.XmlMappingMetaData(java.lang.String loadMethodName, java.lang.String id)Convenience constructor for configuring to load by reference.XmlMappingMetaData(java.lang.String elementName, java.lang.String loadMethodName, java.lang.Class<?> loadObjectClass, XmlMappingMetaData[] loadObjectConfiguration, java.lang.String id)Convenience constructor for configuring to load an object.XmlMappingMetaData(java.lang.String elementName, java.lang.String loadMethodName, java.lang.String format)Convenience constructor for configuring to load a value.XmlMappingMetaData(XmlMappingType type, java.lang.String loadMethodName, java.lang.String staticValue)Convenience constructor for configuring to load a static reference.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLoadObjectConfiguration(XmlMappingMetaData loadObjectMapping)Adds anotherXmlMappingMetaDataconfiguration for the object to load onto the target object.java.lang.StringgetElementName()Obtains the XML element/attribute name.java.lang.StringgetFormat()Obtains the format for loading the value.java.lang.StringgetId()Obtains the identifier of this XML mapping.java.lang.StringgetLoadMethodName()Obtains the name of the method on the target object to load the value/object.java.lang.StringgetLoadObjectClassName()Obtains the fully qualified name of the class of the object to be loaded to the target object.XmlMappingMetaData[]getLoadObjectConfiguration()Obtains the configuration for the object to load onto the target object.java.lang.StringgetStaticValue()Obtains the static value to load to target object.XmlMappingTypegetType()Obtains the type of this mapping.voidsetElementName(java.lang.String elementName)Specifies the XML element/attribute name.voidsetFormat(java.lang.String format)Specifies the format for loading the value.voidsetId(java.lang.String id)Specifies the identifier of the XML mapping.voidsetLoadMethodName(java.lang.String loadMethodName)Specifies the name of the method on the target object to load the value/object.voidsetLoadObjectClassName(java.lang.String loadObjectClassName)Specifies the fully qualified name of the class of the object to be loaded to the target object.voidsetStaticValue(java.lang.String staticValue)Specifies the static value to load to target object.voidsetType(java.lang.String typeName)Enables specifying the type name.
 
- 
- 
- 
Field Detail- 
idprotected java.lang.String id Identifies this XML mapping for reuse (or if already configured to use the same configuration).
 - 
elementNameprotected java.lang.String elementName Name of XML element/attribute which is the focus of this mapping.
 - 
loadMethodNameprotected java.lang.String loadMethodName Name of method to load value/object to target object.
 - 
loadObjectClassNameprotected java.lang.String loadObjectClassName Should this be an object loading mapping, then this should be specified and be the fully quanlified name of the class of the object to load.
 - 
formatprotected java.lang.String format Format for loading a value.
 - 
staticValueprotected java.lang.String staticValue Static value to load to target object.
 - 
loadObjectConfigurationprotected java.util.List<XmlMappingMetaData> loadObjectConfiguration The mappings of the loaded object, should theloadObjectClassNamebe specified.
 - 
typeprotected XmlMappingType type Type of this mapping.
 
- 
 - 
Constructor Detail- 
XmlMappingMetaDatapublic XmlMappingMetaData() Default constructor to allow theTreeXmlUnmarshallerto configure itself.
 - 
XmlMappingMetaDatapublic XmlMappingMetaData(java.lang.Class<?> targetObjectType, java.lang.String rootElementName, XmlMappingMetaData[] targetObjectConfiguration)Convenience constructor for configuring the root of the mapping tree.- Parameters:
- targetObjectType- Class of the target object.
- rootElementName- Root XML element name.
- targetObjectConfiguration- Configuration of the target object.
 
 - 
XmlMappingMetaDatapublic XmlMappingMetaData(java.lang.String elementName, java.lang.String loadMethodName, java.lang.String format)Convenience constructor for configuring to load a value.- Parameters:
- elementName- XML element/attribute name containing the value.
- loadMethodName- Method by which to load the value onto the target object.
- format- Format of the value if required otherwise make pass- null.
 
 - 
XmlMappingMetaDatapublic XmlMappingMetaData(java.lang.String elementName, java.lang.String loadMethodName, java.lang.Class<?> loadObjectClass, XmlMappingMetaData[] loadObjectConfiguration, java.lang.String id)Convenience constructor for configuring to load an object.- Parameters:
- elementName- XML element name.
- loadMethodName- Method by which to load the object onto the target object.
- loadObjectClass- Class of the object to load onto the target object.
- loadObjectConfiguration- Configuration of load object.
- id- Identifier of the XML mapping. If not be re-used may be- null.
 
 - 
XmlMappingMetaDatapublic XmlMappingMetaData(java.lang.String loadMethodName, java.lang.String id)Convenience constructor for configuring to load by reference.- Parameters:
- loadMethodName- Method by which to begin reference loading to target object.
- id- Identifier of the XML mapping to re-use.
 
 - 
XmlMappingMetaDatapublic XmlMappingMetaData(XmlMappingType type, java.lang.String loadMethodName, java.lang.String staticValue) Convenience constructor for configuring to load a static reference.- Parameters:
- type- Type of this XML mapping.
- loadMethodName- Method by which to load the static value to target object.
- staticValue- Static value to load to target object.
 
 
- 
 - 
Method Detail- 
getTypepublic XmlMappingType getType() throws XmlMarshallException Obtains the type of this mapping.- Returns:
- Type of this mapping.
- Throws:
- XmlMarshallException- If no type has been specified.
 
 - 
setTypepublic void setType(java.lang.String typeName) Enables specifying the type name.- Parameters:
- typeName- Name of the type.
 
 - 
getIdpublic java.lang.String getId() Obtains the identifier of this XML mapping.- Returns:
- Identifier of XML mapping.
 
 - 
setIdpublic void setId(java.lang.String id) Specifies the identifier of the XML mapping.- Parameters:
- id- Identifier of the XML mapping.
 
 - 
getElementNamepublic java.lang.String getElementName() Obtains the XML element/attribute name.- Returns:
- XML element/attribute name.
 
 - 
setElementNamepublic void setElementName(java.lang.String elementName) Specifies the XML element/attribute name.- Parameters:
- elementName- XML element/attribute name.
 
 - 
getLoadMethodNamepublic java.lang.String getLoadMethodName() Obtains the name of the method on the target object to load the value/object.- Returns:
- Load method name.
 
 - 
setLoadMethodNamepublic void setLoadMethodName(java.lang.String loadMethodName) Specifies the name of the method on the target object to load the value/object.- Parameters:
- loadMethodName- Load method name.
 
 - 
getLoadObjectClassNamepublic java.lang.String getLoadObjectClassName() Obtains the fully qualified name of the class of the object to be loaded to the target object.- Returns:
- Load object class name.
 
 - 
setLoadObjectClassNamepublic void setLoadObjectClassName(java.lang.String loadObjectClassName) Specifies the fully qualified name of the class of the object to be loaded to the target object.- Parameters:
- loadObjectClassName- Load object class name.
 
 - 
getFormatpublic java.lang.String getFormat() Obtains the format for loading the value.- Returns:
- Format for loading the value.
 
 - 
setFormatpublic void setFormat(java.lang.String format) Specifies the format for loading the value.- Parameters:
- format- Format for loading the value.
 
 - 
getStaticValuepublic java.lang.String getStaticValue() Obtains the static value to load to target object.- Returns:
- Static value.
 
 - 
setStaticValuepublic void setStaticValue(java.lang.String staticValue) Specifies the static value to load to target object.- Parameters:
- staticValue- Static value.
 
 - 
getLoadObjectConfigurationpublic XmlMappingMetaData[] getLoadObjectConfiguration() Obtains the configuration for the object to load onto the target object.- Returns:
- Load object configuration.
 
 - 
addLoadObjectConfigurationpublic void addLoadObjectConfiguration(XmlMappingMetaData loadObjectMapping) Adds anotherXmlMappingMetaDataconfiguration for the object to load onto the target object.- Parameters:
- loadObjectMapping-- XmlMappingMetaDatafor the object to load onto the target object.
 
 
- 
 
-