Interface TypeMapper
- All Known Implementing Classes:
CDefaultTypeMapper,CTypeMapper,DefaultTypeMapper,JavaTypeMapper,TypeMappingAdapter
public interface TypeMapper
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTypeMappingName(QName qname, String value) Adds a type mapping name to the type mapper.voidaddTypeMappingObject(QName qname, Object value) Adds a type mapping object to the type mapper.voidaddTypeMappingStatus(QName qName, Object status) Allows the storage of a status object with a mapping to the qname.getParameterName(QName qname) Gets the parameter name.getQNameToMappingObject(QName qname) getTypeMappingName(QName qname) Gets the type mapping class name.getTypeMappingObject(QName qname) Gets the type mapping Object.getTypeMappingStatus(QName qName) Returns the relevant status object given the qName of the xml elementbooleanReturns whether the mapping is the object type or the normal class name typevoidsetDefaultMappingName(String defaultMapping) Sets the default type mapping - the databinders may change the default mapping to suit their default mapping
-
Method Details
-
isObjectMappingPresent
boolean isObjectMappingPresent()Returns whether the mapping is the object type or the normal class name type- Returns:
- Returns boolean.
-
getTypeMappingName
Gets the type mapping class name.- Parameters:
qname- name of the XML element to be mapped- Returns:
- Returns a string that represents the particular type.
-
getTypeMappingObject
Gets the type mapping Object.- Parameters:
qname- name of the XML element to be mapped- Returns:
- Returns an Object that represents the particular class in a pre specified form. It can be a specific format to the databinding framework used. This allows tight integrations with the databinding framework, allowing the emitter to write the databinding classes in its own way.
-
getQNameToMappingObject
-
getParameterName
Gets the parameter name.- Parameters:
qname- name of the XML element to get a parameter- Returns:
- Returns a unique parameter name.
-
addTypeMappingName
Adds a type mapping name to the type mapper.- Parameters:
qname-value-- See Also:
-
addTypeMappingObject
Adds a type mapping object to the type mapper.- Parameters:
qname- the xml Qname that this type refers tovalue- the type mapping object- See Also:
-
getAllMappedNames
Map getAllMappedNames()- Returns:
- Returns a map containing all type mapping names i.e. Qname to classname
-
getAllMappedObjects
Map getAllMappedObjects()- Returns:
- Returns a map containing all type mapping model objects i.e. Qname to model objects
-
getDefaultMappingName
String getDefaultMappingName()- Returns:
- the default mapping name for this type mapper
-
setDefaultMappingName
Sets the default type mapping - the databinders may change the default mapping to suit their default mapping- Parameters:
defaultMapping-
-
addTypeMappingStatus
Allows the storage of a status object with a mapping to the qname. This may be used to store certain status information that will be used by different type mappers. A given type mapper may choose not to implement this!- Parameters:
qname-status-
-
getTypeMappingStatus
Returns the relevant status object given the qName of the xml element- Parameters:
qName-- Returns:
- the status object
- See Also:
-