Package org.apache.axis2.schema
Class BeanWriterMetaInfoHolder
- java.lang.Object
-
- org.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
-
Constructor Summary
Constructors Constructor Description BeanWriterMetaInfoHolder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEnumFacet(String enumFacet)Adds the enumeration.voidaddMaxOccurs(QName qName, long maxOccurs)Adds the maxOccurs associated with a QName.voidaddMemberType(QName qname, String className)voidaddMinOccurs(QName qName, long minOccurs)Adds the minOccurs associated with a QName.voidaddtStatus(QName type, int mask)Adds a another status to a particular Qname.voidaddXmlNameJavaNameMapping(String xmlName, String javaName)voidclearTables()Clears the whole set of tables.booleangetAnyAttributeStatusForQName(QName qName)Gets whether a given QName has the any attribute status.booleangetAnyStatusForQName(QName qName)Gets whether a given QName represents a anyTypebooleangetArrayStatusForQName(QName qName)Gets whether a given QName refers to an array.booleangetAttributeStatusForQName(QName qName)Gets whether a given QName is an attributebooleangetBinaryStatusForQName(QName qName)Gets whether a given QName refers to binary.StringgetClassNameForQName(QName eltQName)Gets the class name for the QName.booleangetDefaultStatusForQName(QName qName)checks the element corresponds to the qName type is xsd:anyTypeStringgetDefaultValueForQName(QName qname)gets the default value for qnameIterator<QName>getElementQNameIterator()Deprecated.Use #getQNameArrayList<String>getEnumFacet()Gets the enumeration.StringgetExtensionClassName()Sets the extensions base class name.booleangetInnerChoiceStatusForQName(QName qName)StringgetItemTypeClassName()QNamegetItemTypeQName()StringgetJavaName(String xmlName)longgetLengthFacet()Gets the length facet.StringgetMaxExclusiveFacet()Gets the maxExclusive.StringgetMaxInclusiveFacet()Gets the maxInclusive.longgetMaxLengthFacet()Gets the maxLength.longgetMaxOccurs(QName qName)Gets the maxOccurs associated with a QName.Map<QName,String>getMemberTypes()List<QName>getMemberTypesKeys()StringgetMinExclusiveFacet()Gets the minExclusive.StringgetMinInclusiveFacet()Gets the minInclusive.longgetMinLengthFacet()Gets the minLength.longgetMinOccurs(QName qName)Adds the minOccurs associated with a QName.booleangetOptionalAttributeStatusForQName(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!intgetOrderStartPoint()Finds the starting count for the addition of new items to the orderStringgetOwnClassName()QNamegetOwnQname()BeanWriterMetaInfoHoldergetParent()Gets the parentbooleangetParticleTypeStatusForQName(QName qName)StringgetPatternFacet()Gets the pattern.QName[]getQNameArray()Gets the QName array - may not be ordered.QNamegetRestrictionBaseType()StringgetRestrictionClassName()QNamegetSchemaQNameForQName(QName eltQName)Gets the schema name for the given QName.booleangetSimpleStatusForQName(QName qName)Gets whether a given QName refers to Simple Type.StringgetTotalDigitsFacet()booleanisAnonymous()Gets the anonymous status.booleanisChoice()booleanisDefaultValueAvailable(QName qname)booleanisExtension()Gets the extension status.booleanisExtensionBaseType(QName extensionBaseType)Checks if it is a extension base type.booleanisFixed(QName eltQName)Returns whether a QName is fixed or notbooleanisHasParticleType()booleanisJavaNameMappingAvailable(String xmlName)booleanisList()booleanisNillable(QName eltQName)Returns whether a QName is nillable or notbooleanisOrdered()Gets the ordered status.booleanisParticleClass()booleanisRestriction()Gets the restriction status.booleanisRestrictionBaseType(QName restrictionBaseType)Checks if it is a restriction base type.booleanisSimple()booleanisUnion()voidregisterDefaultValue(QName qname, String value)this method registers the defult value agaist the element qname.voidregisterFixedQName(QName eltQName)Registers a Qname as fixed The qName better be of an elementvoidregisterMapping(QName qName, QName schemaName, String javaClassName)Registers a mapping.voidregisterMapping(QName qName, QName schemaName, String javaClassName, int type)Registers a mapping.voidregisterNillableQName(QName eltQName)Registers a Qname as nillable The qName better be of an elementvoidregisterQNameIndex(QName qName, int index)Registers a QName for the order.voidsetAnonymous(boolean anonymous)Sets the anonymous flag.voidsetAsParent(BeanWriterMetaInfoHolder metaInfo)Creates link to thvoidsetChoice(boolean choice)voidsetEnumFacet(ArrayList<String> enumFacet)Sets the enumeration.voidsetExtension(boolean extension)Sets the extension status.voidsetExtensionBaseType(QName extensionBaseType)Sets the extension basetype.voidsetExtensionClassName(String extensionClassName)Sets the extensions base class name.voidsetHasParticleType(boolean hasParticleType)voidsetItemTypeClassName(String itemTypeClassName)voidsetItemTypeQName(QName itemTypeQName)voidsetLengthFacet(long lengthFacet)Sets the length facet.voidsetList(boolean list)voidsetMaxExclusiveFacet(String maxExclusiveFacet)Sets the maxExclusive.voidsetMaxInclusiveFacet(String maxInclusiveFacet)Sets the maxInclusive.voidsetMaxLengthFacet(long maxLengthFacet)Sets the maxLength.voidsetMemberTypes(Map<QName,String> memberTypes)voidsetMemberTypesKeys(List<QName> memberTypesKeys)voidsetMinExclusiveFacet(String minExclusiveFacet)Sets the minExclusive.voidsetMinInclusiveFacet(String minInclusiveFacet)Sets the minInclusive.voidsetMinLengthFacet(long minLengthFacet)Sets the minLength.voidsetOrdered(boolean ordered)Sets the ordered flag.voidsetOwnClassName(String ownClassName)voidsetOwnQname(QName ownQname)voidsetParticleClass(boolean particleClass)voidsetPatternFacet(String patternFacet)Sets the pattern.voidsetRestriction(boolean restriction)Sets the restriction status.voidsetRestrictionBaseType(QName restrictionBaseType)Sets the restriction basetype.voidsetRestrictionClassName(String restrictionClassName)Sets the restriction base class name.voidsetSimple(boolean simple)voidsetTotalDigitsFacet(String totalDigitsFacet)Sets the totalDigitsvoidsetUnion(boolean union)StringtoString()
-
-
-
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
-
ownQname
protected QName ownQname
-
ownClassName
protected String ownClassName
-
lengthFacet
protected long lengthFacet
-
maxLengthFacet
protected long maxLengthFacet
-
minLengthFacet
protected long minLengthFacet
-
patternFacet
protected String patternFacet
-
totalDigitsFacet
protected String totalDigitsFacet
-
maxExclusiveFacet
protected String maxExclusiveFacet
-
minExclusiveFacet
protected String minExclusiveFacet
-
maxInclusiveFacet
protected String maxInclusiveFacet
-
minInclusiveFacet
protected String minInclusiveFacet
-
itemTypeQName
protected QName itemTypeQName
-
itemTypeClassName
protected String itemTypeClassName
-
isUnion
protected boolean isUnion
-
isList
protected boolean isList
-
isParticleClass
protected boolean isParticleClass
-
hasParticleType
protected boolean hasParticleType
-
parent
protected BeanWriterMetaInfoHolder parent
-
-
Method Detail
-
isChoice
public boolean isChoice()
-
setChoice
public void setChoice(boolean choice)
-
isSimple
public boolean isSimple()
-
setSimple
public void setSimple(boolean simple)
-
getOwnClassName
public String getOwnClassName()
-
setOwnClassName
public void setOwnClassName(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 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-
-
getRestrictionClassName
public String getRestrictionClassName()
-
setRestrictionClassName
public void setRestrictionClassName(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, 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-
-
registerFixedQName
public void registerFixedQName(QName eltQName)
Registers a Qname as fixed The qName better be of an element- Parameters:
eltQName-
-
isFixed
public boolean isFixed(QName eltQName)
Returns whether a QName is fixed or not- Parameters:
eltQName-
-
registerMapping
public void registerMapping(QName qName, QName schemaName, String javaClassName, int type)
Registers a mapping.- Parameters:
qName-schemaName-javaClassName-type-
-
registerDefaultValue
public void registerDefaultValue(QName qname, 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 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 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
trueif 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 Iterator<QName> 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.
-
setTotalDigitsFacet
public void setTotalDigitsFacet(String totalDigitsFacet)
Sets the totalDigits- Parameters:
totalDigitsFacet-
-
getTotalDigitsFacet
public String getTotalDigitsFacet()
- Returns:
- Returns the totalDigits
-
setMaxExclusiveFacet
public void setMaxExclusiveFacet(String maxExclusiveFacet)
Sets the maxExclusive.- Parameters:
maxExclusiveFacet-
-
getMaxExclusiveFacet
public String getMaxExclusiveFacet()
Gets the maxExclusive.- Returns:
- Returns the maxExclusive.
-
setMinExclusiveFacet
public void setMinExclusiveFacet(String minExclusiveFacet)
Sets the minExclusive.- Parameters:
minExclusiveFacet-
-
getMinExclusiveFacet
public String getMinExclusiveFacet()
Gets the minExclusive.- Returns:
- Returns the minExclusive.
-
setMaxInclusiveFacet
public void setMaxInclusiveFacet(String maxInclusiveFacet)
Sets the maxInclusive.- Parameters:
maxInclusiveFacet-
-
getMaxInclusiveFacet
public String getMaxInclusiveFacet()
Gets the maxInclusive.- Returns:
- Returns the maxInclusive.
-
setMinInclusiveFacet
public void setMinInclusiveFacet(String minInclusiveFacet)
Sets the minInclusive.- Parameters:
minInclusiveFacet-
-
getMinInclusiveFacet
public 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(ArrayList<String> enumFacet)
Sets the enumeration.- Parameters:
enumFacet-
-
addEnumFacet
public void addEnumFacet(String enumFacet)
Adds the enumeration.- Parameters:
enumFacet-
-
setPatternFacet
public void setPatternFacet(String patternFacet)
Sets the pattern.- Parameters:
patternFacet-
-
getPatternFacet
public String getPatternFacet()
Gets the pattern.- Returns:
- Returns pattern.
-
isUnion
public boolean isUnion()
- Returns:
- Returns is union
-
setUnion
public void setUnion(boolean union)
-
isList
public boolean isList()
-
setList
public void setList(boolean list)
-
getItemTypeQName
public QName getItemTypeQName()
-
setItemTypeQName
public void setItemTypeQName(QName itemTypeQName)
-
getItemTypeClassName
public String getItemTypeClassName()
-
setItemTypeClassName
public void setItemTypeClassName(String itemTypeClassName)
-
isParticleClass
public boolean isParticleClass()
-
setParticleClass
public void setParticleClass(boolean particleClass)
-
isHasParticleType
public boolean isHasParticleType()
-
setHasParticleType
public void setHasParticleType(boolean hasParticleType)
-
isJavaNameMappingAvailable
public boolean isJavaNameMappingAvailable(String xmlName)
-
getRestrictionBaseType
public QName getRestrictionBaseType()
-
-