net.sf.jsefa.xml.mapping
Class XmlComplexTypeMapping

java.lang.Object
  extended by net.sf.jsefa.common.mapping.TypeMapping<N>
      extended by net.sf.jsefa.common.mapping.ComplexTypeMapping<QName,XmlNodeDescriptor,XmlNodeMapping<?>>
          extended by net.sf.jsefa.xml.mapping.XmlComplexTypeMapping

public final class XmlComplexTypeMapping
extends ComplexTypeMapping<QName,XmlNodeDescriptor,XmlNodeMapping<?>>

A mapping between a java object type and a XML complex data type.

Instances of this class are immutable and thread safe.

Author:
Norman Lahme-Huetig
See Also:
TypeMapping

Constructor Summary
XmlComplexTypeMapping(Class<?> objectType, QName dataTypeName, ObjectAccessor objectAccessor, Collection<XmlNodeMapping<?>> nodeMappings, Validator validator)
          Constructs a new XmlComplexTypeMapping.
 
Method Summary
protected  Map<XmlNodeDescriptor,XmlNodeMapping<?>> createNodeMappingsByNodeDescriptorMap(Collection<XmlNodeMapping<?>> nodeMappings)
          Creates a map of node mappings by node descriptors.
 boolean isTextContentAllowed()
           
 
Methods inherited from class net.sf.jsefa.common.mapping.ComplexTypeMapping
getFieldNames, getNodeMapping, getNodeMapping, getNodeMappings, getObjectAccessor, getValidator
 
Methods inherited from class net.sf.jsefa.common.mapping.TypeMapping
getDataTypeName, getObjectType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlComplexTypeMapping

public XmlComplexTypeMapping(Class<?> objectType,
                             QName dataTypeName,
                             ObjectAccessor objectAccessor,
                             Collection<XmlNodeMapping<?>> nodeMappings,
                             Validator validator)
Constructs a new XmlComplexTypeMapping.

Parameters:
objectType - the object type
dataTypeName - the data type name
objectAccessor - the object accessor
nodeMappings - the node mappings
validator - the validator; may be null
Method Detail

isTextContentAllowed

public boolean isTextContentAllowed()
Returns:
true, if a text content is allowed for this data type; false otherwise.

createNodeMappingsByNodeDescriptorMap

protected Map<XmlNodeDescriptor,XmlNodeMapping<?>> createNodeMappingsByNodeDescriptorMap(Collection<XmlNodeMapping<?>> nodeMappings)
Creates a map of node mappings by node descriptors.

Overrides:
createNodeMappingsByNodeDescriptorMap in class ComplexTypeMapping<QName,XmlNodeDescriptor,XmlNodeMapping<?>>
Parameters:
nodeMappings - the node mappings
Returns:
a map of node mappings by node descriptors


Copyright © 2014. All rights reserved.