org.apache.axis2.schema
Class BeanWriterMetaInfoHolder

java.lang.Object
  extended byorg.apache.axis2.schema.BeanWriterMetaInfoHolder

public class BeanWriterMetaInfoHolder
extends 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  Map elementToJavaClassMap
           
protected  Map elementToSchemaQNameMap
           
protected  boolean extension
           
protected  List nillableQNameList
           
protected  boolean ordered
           
protected  BeanWriterMetaInfoHolder parent
           
protected  Map qNameMaxOccursCountMap
           
protected  Map qNameMinOccursCountMap
           
protected  Map qNameOrderMap
           
protected  Map specialTypeFlagMap
           
 
Constructor Summary
BeanWriterMetaInfoHolder()
           
 
Method Summary
 void addMaxOccurs(QName qName, long maxOccurs)
          Adds the maxOccurs associated with a QName.
 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 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 an array.
 String getClassNameForQName(QName eltQName)
          Gets the class name for the QName.
 Iterator getElementQNameIterator()
          Deprecated. Use #getQNameArray
 String getExtensionClassName()
          Sets the extensions base class name.
 long getMaxOccurs(QName qName)
          Gets the maxOccurs associated with a QName.
 long getMinOccurs(QName qName)
          Adds the minOccurs associated with a QName.
 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
 BeanWriterMetaInfoHolder getParent()
          Gets the parent
 QName[] getQNameArray()
          Gets the QName array - may not be ordered.
 QName getSchemaQNameForQName(QName eltQName)
          Gets the schema name for the given QName.
 boolean isAnonymous()
          Gets the anonymous status.
 boolean isChoice()
           
 boolean isExtension()
          Gets the extension status.
 boolean isNillable(QName eltQName)
          Returns whether a QName is nillable or not
 boolean isOrdered()
          Gets the ordered status.
 void registerMapping(QName qName, QName schemaName, String javaClassName)
          Registers a mapping.
 void registerMapping(QName qName, QName schemaName, String javaClassName, int type)
          Registers a mapping.
 void registerNillableQName(QName eltQName)
           
 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 setExtension(boolean extension)
          Sets the extension status.
 void setExtensionClassName(String extensionClassName)
          Sets the extensions base class name.
 void setOrdered(boolean ordered)
          Sets the ordered flag.
 
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

extension

protected boolean extension

elementToSchemaQNameMap

protected Map elementToSchemaQNameMap

elementToJavaClassMap

protected Map elementToJavaClassMap

specialTypeFlagMap

protected Map specialTypeFlagMap

qNameMaxOccursCountMap

protected Map qNameMaxOccursCountMap

qNameMinOccursCountMap

protected Map qNameMinOccursCountMap

qNameOrderMap

protected Map qNameOrderMap

nillableQNameList

protected List nillableQNameList

parent

protected BeanWriterMetaInfoHolder parent
Constructor Detail

BeanWriterMetaInfoHolder

public BeanWriterMetaInfoHolder()
Method Detail

isChoice

public boolean isChoice()

setChoice

public void setChoice(boolean choice)

getParent

public BeanWriterMetaInfoHolder getParent()
Gets the parent

Returns:

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 String getExtensionClassName()
Sets the extensions base class name. Valid only when the isExtension returns true.

Returns:
Returns String.

setExtensionClassName

public void setExtensionClassName(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 -

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,
                            String javaClassName)
Registers a mapping.

Parameters:
qName -
schemaName -
javaClassName -

registerNillableQName

public void registerNillableQName(QName eltQName)

isNillable

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

Parameters:
eltQName -
Returns:

registerMapping

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

Parameters:
qName -
schemaName -
javaClassName -
type -

getSchemaQNameForQName

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

Parameters:
eltQName -
Returns:
Returns QName.

getClassNameForQName

public 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.

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 an array.

Parameters:
qName -
Returns:
Returns boolean.

getAnyAttributeStatusForQName

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

Parameters:
qName -
Returns:
Returns boolean.

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 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 -