Package | org.spicefactory.lib.xml.mapper |
Class | public class AbstractXmlObjectMapper |
Inheritance | AbstractXmlObjectMapper ![]() |
Implements | XmlObjectMapper |
Subclasses | PropertyMapper, SimpleValueMapper |
Property | Defined By | ||
---|---|---|---|
elementName : QName [read-only]
The name of the elements the mapToXml method produces. | AbstractXmlObjectMapper | ||
objectType : ClassInfo [read-only]
The type of the objects the mapToObject method produces. | AbstractXmlObjectMapper |
Method | Defined By | ||
---|---|---|---|
AbstractXmlObjectMapper(objectType:ClassInfo, elementName:QName)
Creates a new instance. | AbstractXmlObjectMapper | ||
mapToObject(element:XML, context:XmlProcessorContext = null):Object
Maps from XML to object. | AbstractXmlObjectMapper | ||
mapToXml(object:Object, context:XmlProcessorContext = null):XML
Maps from object to XML. | AbstractXmlObjectMapper |
elementName | property |
elementName:QName
[read-only] The name of the elements the mapToXml method produces.
public function get elementName():QName
objectType | property |
objectType:ClassInfo
[read-only] The type of the objects the mapToObject method produces.
public function get objectType():ClassInfo
AbstractXmlObjectMapper | () | Constructor |
public function AbstractXmlObjectMapper(objectType:ClassInfo, elementName:QName)
Creates a new instance.
ParametersobjectType:ClassInfo — the type of the mapped object
| |
elementName:QName — the name of the mapped XML element
|
mapToObject | () | method |
public function mapToObject(element:XML, context:XmlProcessorContext = null):Object
Maps from XML to object. Should always return objects of the type the objectType
property was set to.
Parameters
element:XML — the XML element to be transformed to an object
| |
context:XmlProcessorContext (default = null ) — the processing context
|
Object — a new object that maps to the specified XML element
|
mapToXml | () | method |
public function mapToXml(object:Object, context:XmlProcessorContext = null):XML
Maps from object to XML. Should always return XML elements with the name the elementName
property was set to.
Parameters
object:Object — the object to be transformed to an XML element
| |
context:XmlProcessorContext (default = null ) — the processing context
|
XML — a new XML element that maps to the specified object
|