org.apache.axis2.wsdl.databinding
Class TypeMappingAdapter

java.lang.Object
  extended byorg.apache.axis2.wsdl.databinding.TypeMappingAdapter
All Implemented Interfaces:
TypeMapper
Direct Known Subclasses:
CDefaultTypeMapper, CSharpTypeMapper, CTypeMapper, DefaultTypeMapper, JavaTypeMapper

public abstract class TypeMappingAdapter
extends java.lang.Object
implements TypeMapper


Field Summary
protected  int counter
           
protected  java.lang.String defaultClassName
          Default class name is the OMElement or the default case However the extensions can override the default class to suit the databinding framework!
protected  boolean isObject
           
protected  java.util.List parameterNameList
           
protected  java.util.HashMap qName2NameMap
           
protected  java.util.HashMap qName2ObjectMap
           
protected  java.util.HashMap qName2StatusMap
           
protected static int UPPER_PARAM_LIMIT
           
protected static java.lang.String XSD_SCHEMA_URL
           
 
Constructor Summary
TypeMappingAdapter()
           
 
Method Summary
 void addTypeMappingName(javax.xml.namespace.QName qname, java.lang.String value)
          Adds a type mapping name to the type mapper.
 void addTypeMappingObject(javax.xml.namespace.QName qname, java.lang.Object value)
          Adds a type mapping object to the type mapper.
 void addTypeMappingStatus(javax.xml.namespace.QName qName, java.lang.Object status)
          Allows the storage of a status object with a mapping to the qname.
 java.util.Map getAllMappedNames()
           
 java.util.Map getAllMappedObjects()
           
 java.lang.String getDefaultMappingName()
           
 java.lang.String getParameterName(javax.xml.namespace.QName qname)
          Gets the parameter name.
 java.lang.String getTypeMappingName(javax.xml.namespace.QName qname)
          Gets the type mapping name.
 java.lang.Object getTypeMappingObject(javax.xml.namespace.QName qname)
          Gets the type mapping Object.
 java.lang.Object getTypeMappingStatus(javax.xml.namespace.QName qName)
          Returns the relevant status object given the qName of the xml element
 boolean isObjectMappingPresent()
          Returns whether the mapping is the object type or the normal class name type
 void setDefaultMappingName(java.lang.String defaultMapping)
          Sets the default type mapping - the databinders may change the default mapping to suit their default mapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultClassName

protected java.lang.String defaultClassName
Default class name is the OMElement or the default case However the extensions can override the default class to suit the databinding framework!


XSD_SCHEMA_URL

protected static final java.lang.String XSD_SCHEMA_URL
See Also:
Constant Field Values

qName2NameMap

protected java.util.HashMap qName2NameMap

qName2ObjectMap

protected java.util.HashMap qName2ObjectMap

qName2StatusMap

protected java.util.HashMap qName2StatusMap

counter

protected int counter

parameterNameList

protected java.util.List parameterNameList

isObject

protected boolean isObject

UPPER_PARAM_LIMIT

protected static final int UPPER_PARAM_LIMIT
See Also:
Constant Field Values
Constructor Detail

TypeMappingAdapter

public TypeMappingAdapter()
Method Detail

getTypeMappingName

public java.lang.String getTypeMappingName(javax.xml.namespace.QName qname)
Gets the type mapping name. If type mapping is not found, returns default.

Specified by:
getTypeMappingName in interface TypeMapper
Parameters:
qname - name of the XML element to be mapped
Returns:
Returns a string that represents the particular type.
See Also:
TypeMapper.getTypeMappingName(javax.xml.namespace.QName)

getParameterName

public java.lang.String getParameterName(javax.xml.namespace.QName qname)
Description copied from interface: TypeMapper
Gets the parameter name.

Specified by:
getParameterName in interface TypeMapper
Parameters:
qname - name of the XML element to get a parameter
Returns:
Returns a unique parameter name.
See Also:
TypeMapper.getParameterName(javax.xml.namespace.QName)

addTypeMappingName

public void addTypeMappingName(javax.xml.namespace.QName qname,
                               java.lang.String value)
Description copied from interface: TypeMapper
Adds a type mapping name to the type mapper.

Specified by:
addTypeMappingName in interface TypeMapper
Parameters:
qname -
value -
See Also:
TypeMapper.addTypeMappingName(javax.xml.namespace.QName,String)

getTypeMappingObject

public java.lang.Object getTypeMappingObject(javax.xml.namespace.QName qname)
Description copied from interface: TypeMapper
Gets the type mapping Object.

Specified by:
getTypeMappingObject in interface TypeMapper
Parameters:
qname -
Returns:
Returns object representing a specific form of the XSD compilation.
See Also:
TypeMapper.getTypeMappingObject(javax.xml.namespace.QName)

addTypeMappingObject

public void addTypeMappingObject(javax.xml.namespace.QName qname,
                                 java.lang.Object value)
Description copied from interface: TypeMapper
Adds a type mapping object to the type mapper.

Specified by:
addTypeMappingObject in interface TypeMapper
Parameters:
qname -
value -
See Also:
TypeMapper.addTypeMappingObject(javax.xml.namespace.QName, Object)

isObjectMappingPresent

public boolean isObjectMappingPresent()
Description copied from interface: TypeMapper
Returns whether the mapping is the object type or the normal class name type

Specified by:
isObjectMappingPresent in interface TypeMapper
Returns:
Returns boolean.
See Also:
TypeMapper.isObjectMappingPresent()

getAllMappedNames

public java.util.Map getAllMappedNames()
Specified by:
getAllMappedNames in interface TypeMapper
Returns:
Returns a map containing all type mapping names i.e. Qname to classname
See Also:
TypeMapper.getAllMappedNames()

getAllMappedObjects

public java.util.Map getAllMappedObjects()
Specified by:
getAllMappedObjects in interface TypeMapper
Returns:
Returns a map containing all type mapping model objects i.e. Qname to model objects
See Also:
TypeMapper.getAllMappedObjects()

getDefaultMappingName

public java.lang.String getDefaultMappingName()
Specified by:
getDefaultMappingName in interface TypeMapper
Returns:
the default mapping name for this type mapper
See Also:
TypeMapper.getDefaultMappingName()

setDefaultMappingName

public void setDefaultMappingName(java.lang.String defaultMapping)
Description copied from interface: TypeMapper
Sets the default type mapping - the databinders may change the default mapping to suit their default mapping

Specified by:
setDefaultMappingName in interface TypeMapper
Parameters:
defaultMapping -
See Also:
TypeMapper.setDefaultMappingName(String)

addTypeMappingStatus

public void addTypeMappingStatus(javax.xml.namespace.QName qName,
                                 java.lang.Object status)
Description copied from interface: TypeMapper
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!

Specified by:
addTypeMappingStatus in interface TypeMapper
Parameters:
qName -
status -
See Also:
TypeMapper.addTypeMappingStatus(javax.xml.namespace.QName, Object)

getTypeMappingStatus

public java.lang.Object getTypeMappingStatus(javax.xml.namespace.QName qName)
Description copied from interface: TypeMapper
Returns the relevant status object given the qName of the xml element

Specified by:
getTypeMappingStatus in interface TypeMapper
Parameters:
qName -
Returns:
the status object
See Also:
TypeMapper.getTypeMappingStatus(javax.xml.namespace.QName)


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.