org.apache.axis2.schema
Class BeanWriterMetaInfoHolder

java.lang.Object
  extended byorg.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 elementToJavaClassMap
           
protected  java.util.Map elementToSchemaQNameMap
           
protected  java.util.ArrayList enumFacet
           
protected  boolean extension
           
protected  boolean isList
           
protected  boolean isUnion
           
protected  java.lang.String itemTypeClassName
           
protected  javax.xml.namespace.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.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  javax.xml.namespace.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
           
 
Constructor Summary
BeanWriterMetaInfoHolder()
           
 
Method Summary
 void addEnumFacet(java.lang.String enumFacet)
          Adds the enumeration.
 void addMaxOccurs(javax.xml.namespace.QName qName, long maxOccurs)
          Adds the maxOccurs associated with a QName.
 void addMemberType(javax.xml.namespace.QName qname, java.lang.String className)
           
 void addMinOccurs(javax.xml.namespace.QName qName, long minOccurs)
          Adds the minOccurs associated with a QName.
 void addtStatus(javax.xml.namespace.QName type, int mask)
          Adds a another status to a particular Qname.
 void clearTables()
          Clears the whole set of tables.
 boolean getAnyAttributeStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName has the any attribute status.
 boolean getAnyStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName represents a anyType
 boolean getArrayStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName refers to an array.
 boolean getAttributeStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName is an attribute
 boolean getBinaryStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName refers to binary.
 java.lang.String getClassNameForQName(javax.xml.namespace.QName eltQName)
          Gets the class name for the QName.
 boolean getDefaultStatusForQName(javax.xml.namespace.QName qName)
          checks the element corresponds to the qName type is xsd:anyType
 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(javax.xml.namespace.QName qName)
           
 java.lang.String getItemTypeClassName()
           
 javax.xml.namespace.QName getItemTypeQName()
           
 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(javax.xml.namespace.QName qName)
          Gets the maxOccurs associated with a QName.
 java.util.Map getMemberTypes()
           
 java.lang.String getMinExclusiveFacet()
          Gets the minExclusive.
 java.lang.String getMinInclusiveFacet()
          Gets the minInclusive.
 long getMinLengthFacet()
          Gets the minLength.
 long getMinOccurs(javax.xml.namespace.QName qName)
          Adds the minOccurs associated with a QName.
 boolean getOptionalAttributeStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName has the optional attribute status.
 javax.xml.namespace.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()
           
 javax.xml.namespace.QName getOwnQname()
           
 BeanWriterMetaInfoHolder getParent()
          Gets the parent
 java.lang.String getPatternFacet()
          Gets the pattern.
 javax.xml.namespace.QName[] getQNameArray()
          Gets the QName array - may not be ordered.
 java.lang.String getRestrictionClassName()
           
 javax.xml.namespace.QName getSchemaQNameForQName(javax.xml.namespace.QName eltQName)
          Gets the schema name for the given QName.
 boolean getSimpleStatusForQName(javax.xml.namespace.QName qName)
          Gets whether a given QName refers to Simple Type.
 boolean isAnonymous()
          Gets the anonymous status.
 boolean isChoice()
           
 boolean isExtension()
          Gets the extension status.
 boolean isExtensionBaseType(javax.xml.namespace.QName extensionBaseType)
          Checks if it is a extension base type.
 boolean isList()
           
 boolean isNillable(javax.xml.namespace.QName eltQName)
          Returns whether a QName is nillable or not
 boolean isOrdered()
          Gets the ordered status.
 boolean isRestriction()
          Gets the restriction status.
 boolean isRestrictionBaseType(javax.xml.namespace.QName restrictionBaseType)
          Checks if it is a restriction base type.
 boolean isSimple()
           
 boolean isUnion()
           
 void registerMapping(javax.xml.namespace.QName qName, javax.xml.namespace.QName schemaName, java.lang.String javaClassName)
          Registers a mapping.
 void registerMapping(javax.xml.namespace.QName qName, javax.xml.namespace.QName schemaName, java.lang.String javaClassName, int type)
          Registers a mapping.
 void registerNillableQName(javax.xml.namespace.QName eltQName)
          Registers a Qname as nillable The qName better be of an element
 void registerQNameIndex(javax.xml.namespace.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(javax.xml.namespace.QName extensionBaseType)
          Sets the extension basetype.
 void setExtensionClassName(java.lang.String extensionClassName)
          Sets the extensions base class name.
 void setItemTypeClassName(java.lang.String itemTypeClassName)
           
 void setItemTypeQName(javax.xml.namespace.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 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(javax.xml.namespace.QName ownQname)
           
 void setPatternFacet(java.lang.String patternFacet)
          Sets the pattern.
 void setRestriction(boolean restriction)
          Sets the restriction status.
 void setRestrictionBaseType(javax.xml.namespace.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 javax.xml.namespace.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

itemTypeQName

protected javax.xml.namespace.QName itemTypeQName

itemTypeClassName

protected java.lang.String itemTypeClassName

isUnion

protected boolean isUnion

isList

protected boolean isList

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 javax.xml.namespace.QName getOwnQname()

setOwnQname

public void setOwnQname(javax.xml.namespace.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(javax.xml.namespace.QName extensionBaseType)
Sets the extension basetype.

Parameters:
extensionBaseType -

isExtensionBaseType

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

Parameters:
extensionBaseType -

setRestrictionBaseType

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

Parameters:
restrictionBaseType -

isRestrictionBaseType

public boolean isRestrictionBaseType(javax.xml.namespace.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(javax.xml.namespace.QName qName,
                            javax.xml.namespace.QName schemaName,
                            java.lang.String javaClassName)
Registers a mapping.

Parameters:
qName -
schemaName -
javaClassName -

registerNillableQName

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


isNillable

public boolean isNillable(javax.xml.namespace.QName eltQName)
Returns whether a QName is nillable or not

Parameters:
eltQName -

registerMapping

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

Parameters:
qName -
schemaName -
javaClassName -
type -

getSchemaQNameForQName

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

Parameters:
eltQName -
Returns:
Returns QName.

getClassNameForQName

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

Parameters:
eltQName -
Returns:
Returns String.

getAttributeStatusForQName

public boolean getAttributeStatusForQName(javax.xml.namespace.QName qName)
Gets whether a given QName is an attribute

Parameters:
qName -
Returns:
Returns boolean.

getDefaultStatusForQName

public boolean getDefaultStatusForQName(javax.xml.namespace.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(javax.xml.namespace.QName qName)
Gets whether a given QName represents a anyType

Parameters:
qName -
Returns:
Returns boolean.

getArrayStatusForQName

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

Parameters:
qName -
Returns:
Returns boolean.

getBinaryStatusForQName

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

Parameters:
qName -
Returns:
Returns boolean.

getInnerChoiceStatusForQName

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

getSimpleStatusForQName

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

Parameters:
qName -
Returns:
Returns boolean.

getAnyAttributeStatusForQName

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

Parameters:
qName -
Returns:
Returns boolean.

getOptionalAttributeStatusForQName

public boolean getOptionalAttributeStatusForQName(javax.xml.namespace.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(javax.xml.namespace.QName qName,
                         long minOccurs)
Adds the minOccurs associated with a QName.

Parameters:
qName -
minOccurs -

registerQNameIndex

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

Parameters:
qName -
index -

getMinOccurs

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

Parameters:
qName -
Returns:
Returns long.

getMaxOccurs

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

Parameters:
qName -
Returns:
Returns long.

addMaxOccurs

public void addMaxOccurs(javax.xml.namespace.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 javax.xml.namespace.QName[] getQNameArray()
Gets the QName array - may not be ordered.

Returns:
Returns QName[].

getOrderedQNameArray

public javax.xml.namespace.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(javax.xml.namespace.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)

addMemberType

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

isList

public boolean isList()

setList

public void setList(boolean list)

getItemTypeQName

public javax.xml.namespace.QName getItemTypeQName()

setItemTypeQName

public void setItemTypeQName(javax.xml.namespace.QName itemTypeQName)

getItemTypeClassName

public java.lang.String getItemTypeClassName()

setItemTypeClassName

public void setItemTypeClassName(java.lang.String itemTypeClassName)


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