com.marsching.flexiparse.xml2object.configuration
Interface MappingConfiguration

All Known Subinterfaces:
AttributeMappingConfiguration, ElementMappingConfiguration, TextMappingConfiguration

public interface MappingConfiguration

Common base interface for all mapping configurations.

Author:
Sebastian Marsching

Method Summary
 int getMaxOccurs()
          Returns the maximum number of times a node matched by this mapping can appear.
 int getMinOccurs()
          Returns the minimum number of times a node matched by this mapping has to appear.
 String getTargetAttribute()
          Returns the name of the attribute that should be set to the value represented by the data matching this mapping.
 String getTargetType()
          Returns the name of the type the data matched by this configuration is mapped to.
 ClassLoader getTargetTypeClassLoader()
          Returns the class loader that should be used in order to load the class of the target type or null if the context class loader should be used.
 

Method Detail

getTargetType

String getTargetType()
Returns the name of the type the data matched by this configuration is mapped to. This might be the fully qualified class name of an arbitrary Java type, one of the Java primitive types or the special type "!mapentry", which will create an instance of Map.Entry.

Returns:
name of the Java target type of this mapping

getTargetTypeClassLoader

ClassLoader getTargetTypeClassLoader()
Returns the class loader that should be used in order to load the class of the target type or null if the context class loader should be used.

Returns:
class loader for target type or null if context class loader should be used

getTargetAttribute

String getTargetAttribute()
Returns the name of the attribute that should be set to the value represented by the data matching this mapping. For global mappings (which have no parents and therefore no object with attributes that can be set) this method returns the empty string.

Returns:
name of the target attribute or empty string for global mappings

getMinOccurs

int getMinOccurs()
Returns the minimum number of times a node matched by this mapping has to appear. For global mappings this is always zero, as such elements are always optional.

Returns:
Minimum occurrences for the node match by this mapping

getMaxOccurs

int getMaxOccurs()
Returns the maximum number of times a node matched by this mapping can appear. For attribute mappings this is always one. A value of -1 specifies that the maximum is unlimited.

Returns:
Maximum occurrences for the node match by this mapping


Copyright © 2008-2009. All Rights Reserved.