org.apache.axis2.schema
Class BeanWriterMetaInfoHolder

java.lang.Object
  extended by org.apache.axis2.schema.BeanWriterMetaInfoHolder

public class BeanWriterMetaInfoHolder
extends java.lang.Object

This class is used as a holder to pass on the meta information to the bean writer. This meta information is used by the writer to write the databinding conversion code. Note - Metainfholders are not meant to be reused!!!. They are per-class basis and are strictly not thread safe!!!!


Field Summary
protected  boolean anonymous
           
protected  boolean choice
           
protected  java.util.Map elementQNameToDefulatValueMap
           
protected  java.util.Map elementToJavaClassMap
           
protected  java.util.Map elementToSchemaQNameMap
           
protected  java.util.ArrayList enumFacet
           
protected  boolean extension
           
protected  boolean hasParticleType
           
protected  boolean isList
           
protected  boolean isParticleClass
           
protected  boolean isUnion
           
protected  java.lang.String itemTypeClassName
           
protected  QName itemTypeQName
           
protected  long lengthFacet
           
protected  java.lang.String maxExclusiveFacet
           
protected  java.lang.String maxInclusiveFacet
           
protected  long maxLengthFacet
           
protected  java.util.Map memberTypes
           
protected  java.util.List memberTypesKeys
           
protected  java.lang.String minExclusiveFacet
           
protected  java.lang.String minInclusiveFacet
           
protected  long minLengthFacet
           
protected  java.util.List nillableQNameList
           
protected  boolean ordered
           
protected  java.lang.String ownClassName
           
protected  QName ownQname
           
protected  BeanWriterMetaInfoHolder parent
           
protected  java.lang.String patternFacet
           
protected  java.util.Map qNameMaxOccursCountMap
           
protected  java.util.Map qNameMinOccursCountMap
           
protected  java.util.Map qNameOrderMap
           
protected  boolean restriction
           
protected  boolean simple
           
protected  java.util.Map specialTypeFlagMap
           
protected  java.util.Map xmlNameJavaNameMap
           
 
Constructor Summary
BeanWriterMetaInfoHolder()
           
 
Method Summary
 void addEnumFacet(java.lang.String enumFacet)
          Adds the enumeration.
 void addMaxOccurs(QName qName, long maxOccurs)
          Adds the maxOccurs associated with a QName.
 void addMemberType(QName qname, java.lang.String className)
           
 void addMinOccurs(QName qName, long minOccurs)
          Adds the minOccurs associated with a QName.
 void addtStatus(QName type, int mask)
          Adds a another status to a particular Qname.
 void addXmlNameJavaNameMapping(java.lang.String xmlName, java.lang.String javaName)
           
 void clearTables()
          Clears the whole set of tables.
 boolean getAnyAttributeStatusForQName(QName qName)
          Gets whether a given QName has the any attribute status.
 boolean getAnyStatusForQName(QName qName)
          Gets whether a given QName represents a anyType
 boolean getArrayStatusForQName(QName qName)
          Gets whether a given QName refers to an array.
 boolean getAttributeStatusForQName(QName qName)
          Gets whether a given QName is an attribute
 boolean getBinaryStatusForQName(QName qName)
          Gets whether a given QName refers to binary.
 java.lang.String getClassNameForQName(QName eltQName)
          Gets the class name for the QName.
 boolean getDefaultStatusForQName(QName qName)
          checks the element corresponds to the qName type is xsd:anyType
 java.lang.String getDefaultValueForQName(QName qname)
          gets the default value for qname
 java.util.Iterator getElementQNameIterator()
          Deprecated. Use #getQNameArray
 java.util.List getEnumFacet()
          Gets the enumeration.
 java.lang.String getExtensionClassName()
          Sets the extensions base class name.
 boolean getInnerChoiceStatusForQName(QName qName)
           
 java.lang.String getItemTypeClassName()
           
 QName getItemTypeQName()
           
 java.lang.String getJavaName(java.lang.String xmlName)
           
 long getLengthFacet()
          Gets the length facet.
 java.lang.String getMaxExclusiveFacet()
          Gets the maxExclusive.
 java.lang.String getMaxInclusiveFacet()
          Gets the maxInclusive.
 long getMaxLengthFacet()
          Gets the maxLength.
 long getMaxOccurs(QName qName)
          Gets the maxOccurs associated with a QName.
 java.util.Map getMemberTypes()
           
 java.util.List getMemberTypesKeys()
           
 java.lang.String getMinExclusiveFacet()
          Gets the minExclusive.
 java.lang.String getMinInclusiveFacet()
          Gets the minInclusive.
 long getMinLengthFacet()
          Gets the minLength.
 long getMinOccurs(QName qName)
          Adds the minOccurs associated with a QName.
 boolean getOptionalAttributeStatusForQName(QName qName)
          Gets whether a given QName has the optional attribute status.
 QName[] getOrderedQNameArray()
          Gets the ordered QName array - useful in sequences where the order needs to be preserved Note - #registerQNameIndex needs to be called if this is to work properly!
 int getOrderStartPoint()
          Finds the starting count for the addition of new items to the order
 java.lang.String getOwnClassName()
           
 QName getOwnQname()
           
 BeanWriterMetaInfoHolder getParent()
          Gets the parent
 boolean getParticleTypeStatusForQName(QName qName)
           
 java.lang.String getPatternFacet()
          Gets the pattern.
 QName[] getQNameArray()
          Gets the QName array - may not be ordered.
 java.lang.String getRestrictionClassName()
           
 QName getSchemaQNameForQName(QName eltQName)
          Gets the schema name for the given QName.
 boolean getSimpleStatusForQName(QName qName)
          Gets whether a given QName refers to Simple Type.
 boolean isAnonymous()
          Gets the anonymous status.
 boolean isChoice()
           
 boolean isDefaultValueAvailable(QName qname)
           
 boolean isExtension()
          Gets the extension status.
 boolean isExtensionBaseType(QName extensionBaseType)
          Checks if it is a extension base type.
 boolean isHasParticleType()
           
 boolean isJavaNameMappingAvailable(java.lang.String xmlName)
           
 boolean isList()
           
 boolean isNillable(QName eltQName)
          Returns whether a QName is nillable or not
 boolean isOrdered()
          Gets the ordered status.
 boolean isParticleClass()
           
 boolean isRestriction()
          Gets the restriction status.
 boolean isRestrictionBaseType(QName restrictionBaseType)
          Checks if it is a restriction base type.
 boolean isSimple()
           
 boolean isUnion()
           
 void registerDefaultValue(QName qname, java.lang.String value)
          this method registers the defult value agaist the element qname.
 void registerMapping(QName qName, QName schemaName, java.lang.String javaClassName)
          Registers a mapping.
 void registerMapping(QName qName, QName schemaName, java.lang.String javaClassName, int type)
          Registers a mapping.
 void registerNillableQName(QName eltQName)
          Registers a Qname as nillable The qName better be of an element
 void registerQNameIndex(QName qName, int index)
          Registers a QName for the order.
 void setAnonymous(boolean anonymous)
          Sets the anonymous flag.
 void setAsParent(BeanWriterMetaInfoHolder metaInfo)
          Creates link to th
 void setChoice(boolean choice)
           
 void setEnumFacet(java.util.ArrayList enumFacet)
          Sets the enumeration.
 void setExtension(boolean extension)
          Sets the extension status.
 void setExtensionBaseType(QName extensionBaseType)
          Sets the extension basetype.
 void setExtensionClassName(java.lang.String extensionClassName)
          Sets the extensions base class name.
 void setHasParticleType(boolean hasParticleType)
           
 void setItemTypeClassName(java.lang.String itemTypeClassName)
           
 void setItemTypeQName(QName itemTypeQName)
           
 void setLengthFacet(long lengthFacet)
          Sets the length facet.
 void setList(boolean list)
           
 void setMaxExclusiveFacet(java.lang.String maxExclusiveFacet)
          Sets the maxExclusive.
 void setMaxInclusiveFacet(java.lang.String maxInclusiveFacet)
          Sets the maxInclusive.
 void setMaxLengthFacet(long maxLengthFacet)
          Sets the maxLength.
 void setMemberTypes(java.util.Map memberTypes)
           
 void setMemberTypesKeys(java.util.List memberTypesKeys)
           
 void setMinExclusiveFacet(java.lang.String minExclusiveFacet)
          Sets the minExclusive.
 void setMinInclusiveFacet(java.lang.String minInclusiveFacet)
          Sets the minInclusive.
 void setMinLengthFacet(long minLengthFacet)
          Sets the minLength.
 void setOrdered(boolean ordered)
          Sets the ordered flag.
 void setOwnClassName(java.lang.String ownClassName)
           
 void setOwnQname(QName ownQname)
           
 void setParticleClass(boolean particleClass)
           
 void setPatternFacet(java.lang.String patternFacet)
          Sets the pattern.
 void setRestriction(boolean restriction)
          Sets the restriction status.
 void setRestrictionBaseType(QName restrictionBaseType)
          Sets the restriction basetype.
 void setRestrictionClassName(java.lang.String restrictionClassName)
          Sets the restriction base class name.
 void setSimple(boolean simple)
           
 void setUnion(boolean union)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ordered

protected boolean ordered

anonymous

protected boolean anonymous

choice

protected boolean choice

simple

protected boolean simple

extension

protected boolean extension

restriction

protected boolean restriction

elementToSchemaQNameMap

protected java.util.Map elementToSchemaQNameMap

elementToJavaClassMap

protected java.util.Map elementToJavaClassMap

specialTypeFlagMap

protected java.util.Map specialTypeFlagMap

qNameMaxOccursCountMap

protected java.util.Map qNameMaxOccursCountMap

qNameMinOccursCountMap

protected java.util.Map qNameMinOccursCountMap

qNameOrderMap

protected java.util.Map qNameOrderMap

ownQname

protected QName ownQname

ownClassName

protected java.lang.String ownClassName

lengthFacet

protected long lengthFacet

maxLengthFacet

protected long maxLengthFacet

minLengthFacet

protected long minLengthFacet

enumFacet

protected java.util.ArrayList enumFacet

patternFacet

protected java.lang.String patternFacet

maxExclusiveFacet

protected java.lang.String maxExclusiveFacet

minExclusiveFacet

protected java.lang.String minExclusiveFacet

maxInclusiveFacet

protected java.lang.String maxInclusiveFacet

minInclusiveFacet

protected java.lang.String minInclusiveFacet

memberTypes

protected java.util.Map memberTypes

xmlNameJavaNameMap

protected java.util.Map xmlNameJavaNameMap

memberTypesKeys

protected java.util.List memberTypesKeys

elementQNameToDefulatValueMap

protected java.util.Map elementQNameToDefulatValueMap

itemTypeQName

protected QName itemTypeQName

itemTypeClassName

protected java.lang.String itemTypeClassName

isUnion

protected boolean isUnion

isList

protected boolean isList

isParticleClass

protected boolean isParticleClass

hasParticleType

protected boolean hasParticleType

nillableQNameList

protected java.util.List nillableQNameList

parent

protected BeanWriterMetaInfoHolder parent
Constructor Detail

BeanWriterMetaInfoHolder

public BeanWriterMetaInfoHolder()
Method Detail

isChoice

public boolean isChoice()

setChoice

public void setChoice(boolean choice)

isSimple

public boolean isSimple()

setSimple

public void setSimple(boolean simple)

getOwnClassName

public java.lang.String getOwnClassName()

setOwnClassName

public void setOwnClassName(java.lang.String ownClassName)

getOwnQname

public QName getOwnQname()

setOwnQname

public void setOwnQname(QName ownQname)

getParent

public BeanWriterMetaInfoHolder getParent()
Gets the parent


isAnonymous

public boolean isAnonymous()
Gets the anonymous status.

Returns:
Returns boolean.

setAnonymous

public void setAnonymous(boolean anonymous)
Sets the anonymous flag.

Parameters:
anonymous -

getExtensionClassName

public java.lang.String getExtensionClassName()
Sets the extensions base class name. Valid only when the isExtension returns true.

Returns:
Returns String.

setExtensionClassName

public void setExtensionClassName(java.lang.String extensionClassName)
Sets the extensions base class name. Valid only when the isExtension returns true.

Parameters:
extensionClassName -

isExtension

public boolean isExtension()
Gets the extension status.

Returns:
Returns boolean.

setExtension

public void setExtension(boolean extension)
Sets the extension status.

Parameters:
extension -

getRestrictionClassName

public java.lang.String getRestrictionClassName()

setRestrictionClassName

public void setRestrictionClassName(java.lang.String restrictionClassName)
Sets the restriction base class name. Valid only when the isRestriction returns true.

Parameters:
restrictionClassName -

isRestriction

public boolean isRestriction()
Gets the restriction status.

Returns:
Returns boolean.

setRestriction

public void setRestriction(boolean restriction)
Sets the restriction status.

Parameters:
restriction -

setExtensionBaseType

public void setExtensionBaseType(QName extensionBaseType)
Sets the extension basetype.

Parameters:
extensionBaseType -

isExtensionBaseType

public boolean isExtensionBaseType(QName extensionBaseType)
Checks if it is a extension base type.

Parameters:
extensionBaseType -

setRestrictionBaseType

public void setRestrictionBaseType(QName restrictionBaseType)
Sets the restriction basetype.

Parameters:
restrictionBaseType -

isRestrictionBaseType

public boolean isRestrictionBaseType(QName restrictionBaseType)
Checks if it is a restriction base type.

Parameters:
restrictionBaseType -

isOrdered

public boolean isOrdered()
Gets the ordered status.

Returns:
Returns boolean.

setOrdered

public void setOrdered(boolean ordered)
Sets the ordered flag.

Parameters:
ordered -

registerMapping

public void registerMapping(QName qName,
                            QName schemaName,
                            java.lang.String javaClassName)
Registers a mapping.

Parameters:
qName -
schemaName -
javaClassName -

registerNillableQName

public void registerNillableQName(QName eltQName)
Registers a Qname as nillable The qName better be of an element

Parameters:
qName -
schemaName -
javaClassName -

isNillable

public boolean isNillable(QName eltQName)
Returns whether a QName is nillable or not

Parameters:
eltQName -

registerMapping

public void registerMapping(QName qName,
                            QName schemaName,
                            java.lang.String javaClassName,
                            int type)
Registers a mapping.

Parameters:
qName -
schemaName -
javaClassName -
type -

registerDefaultValue

public void registerDefaultValue(QName qname,
                                 java.lang.String value)
this method registers the defult value agaist the element qname.

Parameters:
qname -
value -

isDefaultValueAvailable

public boolean isDefaultValueAvailable(QName qname)
Parameters:
qname -
Returns:
is a default value available for this qname

getDefaultValueForQName

public java.lang.String getDefaultValueForQName(QName qname)
gets the default value for qname

Parameters:
qname -
Returns:
default value for this qname

getSchemaQNameForQName

public QName getSchemaQNameForQName(QName eltQName)
Gets the schema name for the given QName.

Parameters:
eltQName -
Returns:
Returns QName.

getClassNameForQName

public java.lang.String getClassNameForQName(QName eltQName)
Gets the class name for the QName.

Parameters:
eltQName -
Returns:
Returns String.

getAttributeStatusForQName

public boolean getAttributeStatusForQName(QName qName)
Gets whether a given QName is an attribute

Parameters:
qName -
Returns:
Returns boolean.

getDefaultStatusForQName

public boolean getDefaultStatusForQName(QName qName)
checks the element corresponds to the qName type is xsd:anyType

Parameters:
qName -
Returns:
is element corresponds to qName has xsd:anyType

getAnyStatusForQName

public boolean getAnyStatusForQName(QName qName)
Gets whether a given QName represents a anyType

Parameters:
qName -
Returns:
Returns boolean.

getArrayStatusForQName

public boolean getArrayStatusForQName(QName qName)
Gets whether a given QName refers to an array.

Parameters:
qName -
Returns:
Returns boolean.

getBinaryStatusForQName

public boolean getBinaryStatusForQName(QName qName)
Gets whether a given QName refers to binary.

Parameters:
qName -
Returns:
Returns boolean.

getInnerChoiceStatusForQName

public boolean getInnerChoiceStatusForQName(QName qName)
Parameters:
qName -
Returns:
is this a inner choice

getSimpleStatusForQName

public boolean getSimpleStatusForQName(QName qName)
Gets whether a given QName refers to Simple Type.

Parameters:
qName -
Returns:
Returns boolean.

getParticleTypeStatusForQName

public boolean getParticleTypeStatusForQName(QName qName)
Parameters:
qName -
Returns:
whether the attribute is a partical class or not

getAnyAttributeStatusForQName

public boolean getAnyAttributeStatusForQName(QName qName)
Gets whether a given QName has the any attribute status.

Parameters:
qName -
Returns:
Returns boolean.

getOptionalAttributeStatusForQName

public boolean getOptionalAttributeStatusForQName(QName qName)
Gets whether a given QName has the optional attribute status.

Parameters:
qName - QName of attribute
Returns:
Returns true if attribute has optional status

clearTables

public void clearTables()
Clears the whole set of tables.


addMinOccurs

public void addMinOccurs(QName qName,
                         long minOccurs)
Adds the minOccurs associated with a QName.

Parameters:
qName -
minOccurs -

registerQNameIndex

public void registerQNameIndex(QName qName,
                               int index)
Registers a QName for the order.

Parameters:
qName -
index -

getMinOccurs

public long getMinOccurs(QName qName)
Adds the minOccurs associated with a QName.

Parameters:
qName -
Returns:
Returns long.

getMaxOccurs

public long getMaxOccurs(QName qName)
Gets the maxOccurs associated with a QName.

Parameters:
qName -
Returns:
Returns long.

addMaxOccurs

public void addMaxOccurs(QName qName,
                         long maxOccurs)
Adds the maxOccurs associated with a QName.

Parameters:
qName -
maxOccurs -

getElementQNameIterator

public java.util.Iterator getElementQNameIterator()
Deprecated. Use #getQNameArray

Returns:
Returns Iterator.

getQNameArray

public QName[] getQNameArray()
Gets the QName array - may not be ordered.

Returns:
Returns QName[].

getOrderedQNameArray

public QName[] getOrderedQNameArray()
Gets the ordered QName array - useful in sequences where the order needs to be preserved Note - #registerQNameIndex needs to be called if this is to work properly!

Returns:
Returns QName[].

getOrderStartPoint

public int getOrderStartPoint()
Finds the starting count for the addition of new items to the order

Returns:
the starting number for the sequence

setAsParent

public void setAsParent(BeanWriterMetaInfoHolder metaInfo)
Creates link to th

Parameters:
metaInfo -

addtStatus

public void addtStatus(QName type,
                       int mask)
Adds a another status to a particular Qname. A Qname can be associated with multiple status flags and they all will be preserved

Parameters:
type -
mask -

setLengthFacet

public void setLengthFacet(long lengthFacet)
Sets the length facet.

Parameters:
lengthFacet -

getLengthFacet

public long getLengthFacet()
Gets the length facet.

Returns:
Returns length facet.

setMaxExclusiveFacet

public void setMaxExclusiveFacet(java.lang.String maxExclusiveFacet)
Sets the maxExclusive.

Parameters:
maxExclusiveFacet -

getMaxExclusiveFacet

public java.lang.String getMaxExclusiveFacet()
Gets the maxExclusive.

Returns:
Returns the maxExclusive.

setMinExclusiveFacet

public void setMinExclusiveFacet(java.lang.String minExclusiveFacet)
Sets the minExclusive.

Parameters:
minExclusiveFacet -

getMinExclusiveFacet

public java.lang.String getMinExclusiveFacet()
Gets the minExclusive.

Returns:
Returns the minExclusive.

setMaxInclusiveFacet

public void setMaxInclusiveFacet(java.lang.String maxInclusiveFacet)
Sets the maxInclusive.

Parameters:
maxInclusiveFacet -

getMaxInclusiveFacet

public java.lang.String getMaxInclusiveFacet()
Gets the maxInclusive.

Returns:
Returns the maxInclusive.

setMinInclusiveFacet

public void setMinInclusiveFacet(java.lang.String minInclusiveFacet)
Sets the minInclusive.

Parameters:
minInclusiveFacet -

getMinInclusiveFacet

public java.lang.String getMinInclusiveFacet()
Gets the minInclusive.

Returns:
Returns the minInclusive.

setMaxLengthFacet

public void setMaxLengthFacet(long maxLengthFacet)
Sets the maxLength.

Parameters:
maxLengthFacet -

getMaxLengthFacet

public long getMaxLengthFacet()
Gets the maxLength.

Returns:
Returns maxLength.

setMinLengthFacet

public void setMinLengthFacet(long minLengthFacet)
Sets the minLength.

Parameters:
minLengthFacet -

getMinLengthFacet

public long getMinLengthFacet()
Gets the minLength.

Returns:
Returns minLength.

setEnumFacet

public void setEnumFacet(java.util.ArrayList enumFacet)
Sets the enumeration.

Parameters:
enumFacet -

addEnumFacet

public void addEnumFacet(java.lang.String enumFacet)
Adds the enumeration.

Parameters:
enumFacet -

getEnumFacet

public java.util.List getEnumFacet()
Gets the enumeration.

Returns:
Returns enumeration.

setPatternFacet

public void setPatternFacet(java.lang.String patternFacet)
Sets the pattern.

Parameters:
patternFacet -

getPatternFacet

public java.lang.String getPatternFacet()
Gets the pattern.

Returns:
Returns pattern.

isUnion

public boolean isUnion()
Returns:
Returns is union

setUnion

public void setUnion(boolean union)

getMemberTypes

public java.util.Map getMemberTypes()
Returns:
Returns memeber type in a union

setMemberTypes

public void setMemberTypes(java.util.Map memberTypes)

getMemberTypesKeys

public java.util.List getMemberTypesKeys()

setMemberTypesKeys

public void setMemberTypesKeys(java.util.List memberTypesKeys)

addMemberType

public void addMemberType(QName qname,
                          java.lang.String className)

isList

public boolean isList()

setList

public void setList(boolean list)

getItemTypeQName

public QName getItemTypeQName()

setItemTypeQName

public void setItemTypeQName(QName itemTypeQName)

getItemTypeClassName

public java.lang.String getItemTypeClassName()

setItemTypeClassName

public void setItemTypeClassName(java.lang.String itemTypeClassName)

isParticleClass

public boolean isParticleClass()

setParticleClass

public void setParticleClass(boolean particleClass)

isHasParticleType

public boolean isHasParticleType()

setHasParticleType

public void setHasParticleType(boolean hasParticleType)

addXmlNameJavaNameMapping

public void addXmlNameJavaNameMapping(java.lang.String xmlName,
                                      java.lang.String javaName)

isJavaNameMappingAvailable

public boolean isJavaNameMappingAvailable(java.lang.String xmlName)

getJavaName

public java.lang.String getJavaName(java.lang.String xmlName)


Copyright © 2007 Apache Web Services Project. All Rights Reserved.