Interface TypeMapper
-
- All Known Implementing Classes:
CDefaultTypeMapper
,CTypeMapper
,DefaultTypeMapper
,JavaTypeMapper
,TypeMappingAdapter
public interface TypeMapper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTypeMappingName(QName qname, String value)
Adds a type mapping name to the type mapper.void
addTypeMappingObject(QName qname, Object value)
Adds a type mapping object to the type mapper.void
addTypeMappingStatus(QName qName, Object status)
Allows the storage of a status object with a mapping to the qname.Map
getAllMappedNames()
Map
getAllMappedObjects()
String
getDefaultMappingName()
String
getParameterName(QName qname)
Gets the parameter name.Object
getQNameToMappingObject(QName qname)
String
getTypeMappingName(QName qname)
Gets the type mapping class name.Object
getTypeMappingObject(QName qname)
Gets the type mapping Object.Object
getTypeMappingStatus(QName qName)
Returns the relevant status object given the qName of the xml elementboolean
isObjectMappingPresent()
Returns whether the mapping is the object type or the normal class name typevoid
setDefaultMappingName(String defaultMapping)
Sets the default type mapping - the databinders may change the default mapping to suit their default mapping
-
-
-
Method Detail
-
isObjectMappingPresent
boolean isObjectMappingPresent()
Returns whether the mapping is the object type or the normal class name type- Returns:
- Returns boolean.
-
getTypeMappingName
String getTypeMappingName(QName qname)
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
Object getTypeMappingObject(QName qname)
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.
-
getParameterName
String getParameterName(QName qname)
Gets the parameter name.- Parameters:
qname
- name of the XML element to get a parameter- Returns:
- Returns a unique parameter name.
-
addTypeMappingName
void addTypeMappingName(QName qname, String value)
Adds a type mapping name to the type mapper.- Parameters:
qname
-value
-- See Also:
getTypeMappingName(javax.xml.namespace.QName)
-
addTypeMappingObject
void addTypeMappingObject(QName qname, Object value)
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:
getTypeMappingObject(javax.xml.namespace.QName)
-
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
void setDefaultMappingName(String defaultMapping)
Sets the default type mapping - the databinders may change the default mapping to suit their default mapping- Parameters:
defaultMapping
-
-
addTypeMappingStatus
void addTypeMappingStatus(QName qName, Object status)
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
Object getTypeMappingStatus(QName qName)
Returns the relevant status object given the qName of the xml element- Parameters:
qName
-- Returns:
- the status object
- See Also:
addTypeMappingStatus(javax.xml.namespace.QName, Object)
-
-