Package org.apache.axis2.schema
Class BeanWriterMetaInfoHolder
java.lang.Object
org.apache.axis2.schema.BeanWriterMetaInfoHolder
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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected QNameprotected longprotected Stringprotected Stringprotected longprotected Stringprotected Stringprotected longprotected booleanprotected Stringprotected QNameprotected BeanWriterMetaInfoHolderprotected Stringprotected booleanprotected booleanprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnumFacet(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) voidClears the whole set of tables.booleanGets 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.getClassNameForQName(QName eltQName) Gets the class name for the QName.booleangetDefaultStatusForQName(QName qName) checks the element corresponds to the qName type is xsd:anyTypegetDefaultValueForQName(QName qname) gets the default value for qnameDeprecated.Use #getQNameArrayGets the enumeration.Sets the extensions base class name.booleangetJavaName(String xmlName) longGets the length facet.Gets the maxExclusive.Gets the maxInclusive.longGets the maxLength.longgetMaxOccurs(QName qName) Gets the maxOccurs associated with a QName.Gets the minExclusive.Gets the minInclusive.longGets the minLength.longgetMinOccurs(QName qName) Adds the minOccurs associated with a QName.booleanGets whether a given QName has the optional attribute status.QName[]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!intFinds the starting count for the addition of new items to the orderGets the parentbooleanGets the pattern.QName[]Gets the QName array - may not be ordered.getSchemaQNameForQName(QName eltQName) Gets the schema name for the given QName.booleangetSimpleStatusForQName(QName qName) Gets whether a given QName refers to Simple Type.booleanGets the anonymous status.booleanisChoice()booleanisDefaultValueAvailable(QName qname) booleanGets the extension status.booleanisExtensionBaseType(QName extensionBaseType) Checks if it is a extension base type.booleanReturns whether a QName is fixed or notbooleanbooleanisJavaNameMappingAvailable(String xmlName) booleanisList()booleanisNillable(QName eltQName) Returns whether a QName is nillable or notbooleanGets the ordered status.booleanbooleanGets 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) toString()
-
Field Details
-
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
-
elementToJavaClassMap
-
specialTypeFlagMap
-
qNameMaxOccursCountMap
-
qNameMinOccursCountMap
-
qNameOrderMap
-
ownQname
-
ownClassName
-
lengthFacet
protected long lengthFacet -
maxLengthFacet
protected long maxLengthFacet -
minLengthFacet
protected long minLengthFacet -
enumFacet
-
patternFacet
-
totalDigitsFacet
-
maxExclusiveFacet
-
minExclusiveFacet
-
maxInclusiveFacet
-
minInclusiveFacet
-
memberTypes
-
xmlNameJavaNameMap
-
memberTypesKeys
-
elementQNameToDefulatValueMap
-
itemTypeQName
-
itemTypeClassName
-
isUnion
protected boolean isUnion -
isList
protected boolean isList -
isParticleClass
protected boolean isParticleClass -
hasParticleType
protected boolean hasParticleType -
nillableQNameList
-
fixedQNameList
-
parent
-
-
Constructor Details
-
BeanWriterMetaInfoHolder
public BeanWriterMetaInfoHolder()
-
-
Method Details
-
isChoice
public boolean isChoice() -
setChoice
public void setChoice(boolean choice) -
isSimple
public boolean isSimple() -
setSimple
public void setSimple(boolean simple) -
getOwnClassName
-
setOwnClassName
-
getOwnQname
-
setOwnQname
-
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
Sets the extensions base class name. Valid only when the isExtension returns true.- Returns:
- Returns String.
-
setExtensionClassName
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
-
setRestrictionClassName
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
Sets the extension basetype.- Parameters:
extensionBaseType-
-
isExtensionBaseType
Checks if it is a extension base type.- Parameters:
extensionBaseType-
-
setRestrictionBaseType
Sets the restriction basetype.- Parameters:
restrictionBaseType-
-
isRestrictionBaseType
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
Registers a mapping.- Parameters:
qName-schemaName-javaClassName-
-
registerNillableQName
Registers a Qname as nillable The qName better be of an element- Parameters:
qName-schemaName-javaClassName-
-
isNillable
Returns whether a QName is nillable or not- Parameters:
eltQName-
-
registerFixedQName
Registers a Qname as fixed The qName better be of an element- Parameters:
eltQName-
-
isFixed
Returns whether a QName is fixed or not- Parameters:
eltQName-
-
registerMapping
Registers a mapping.- Parameters:
qName-schemaName-javaClassName-type-
-
registerDefaultValue
this method registers the defult value agaist the element qname.- Parameters:
qname-value-
-
isDefaultValueAvailable
- Parameters:
qname-- Returns:
- is a default value available for this qname
-
getDefaultValueForQName
gets the default value for qname- Parameters:
qname-- Returns:
- default value for this qname
-
getSchemaQNameForQName
Gets the schema name for the given QName.- Parameters:
eltQName-- Returns:
- Returns QName.
-
getClassNameForQName
Gets the class name for the QName.- Parameters:
eltQName-- Returns:
- Returns String.
-
getAttributeStatusForQName
Gets whether a given QName is an attribute- Parameters:
qName-- Returns:
- Returns boolean.
-
getDefaultStatusForQName
checks the element corresponds to the qName type is xsd:anyType- Parameters:
qName-- Returns:
- is element corresponds to qName has xsd:anyType
-
getAnyStatusForQName
Gets whether a given QName represents a anyType- Parameters:
qName-- Returns:
- Returns boolean.
-
getArrayStatusForQName
Gets whether a given QName refers to an array.- Parameters:
qName-- Returns:
- Returns boolean.
-
getBinaryStatusForQName
Gets whether a given QName refers to binary.- Parameters:
qName-- Returns:
- Returns boolean.
-
getInnerChoiceStatusForQName
- Parameters:
qName-- Returns:
- is this a inner choice
-
getSimpleStatusForQName
Gets whether a given QName refers to Simple Type.- Parameters:
qName-- Returns:
- Returns boolean.
-
getParticleTypeStatusForQName
- Parameters:
qName-- Returns:
- whether the attribute is a partical class or not
-
getAnyAttributeStatusForQName
Gets whether a given QName has the any attribute status.- Parameters:
qName-- Returns:
- Returns boolean.
-
getOptionalAttributeStatusForQName
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
Adds the minOccurs associated with a QName.- Parameters:
qName-minOccurs-
-
registerQNameIndex
Registers a QName for the order.- Parameters:
qName-index-
-
getMinOccurs
Adds the minOccurs associated with a QName.- Parameters:
qName-- Returns:
- Returns long.
-
getMaxOccurs
Gets the maxOccurs associated with a QName.- Parameters:
qName-- Returns:
- Returns long.
-
addMaxOccurs
Adds the maxOccurs associated with a QName.- Parameters:
qName-maxOccurs-
-
getElementQNameIterator
Deprecated.Use #getQNameArray- Returns:
- Returns Iterator.
-
getQNameArray
Gets the QName array - may not be ordered.- Returns:
- Returns 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
Creates link to th- Parameters:
metaInfo-
-
addtStatus
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
Sets the totalDigits- Parameters:
totalDigitsFacet-
-
getTotalDigitsFacet
- Returns:
- Returns the totalDigits
-
setMaxExclusiveFacet
Sets the maxExclusive.- Parameters:
maxExclusiveFacet-
-
getMaxExclusiveFacet
Gets the maxExclusive.- Returns:
- Returns the maxExclusive.
-
setMinExclusiveFacet
Sets the minExclusive.- Parameters:
minExclusiveFacet-
-
getMinExclusiveFacet
Gets the minExclusive.- Returns:
- Returns the minExclusive.
-
setMaxInclusiveFacet
Sets the maxInclusive.- Parameters:
maxInclusiveFacet-
-
getMaxInclusiveFacet
Gets the maxInclusive.- Returns:
- Returns the maxInclusive.
-
setMinInclusiveFacet
Sets the minInclusive.- Parameters:
minInclusiveFacet-
-
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
Sets the enumeration.- Parameters:
enumFacet-
-
addEnumFacet
Adds the enumeration.- Parameters:
enumFacet-
-
getEnumFacet
Gets the enumeration.- Returns:
- Returns enumeration.
-
setPatternFacet
Sets the pattern.- Parameters:
patternFacet-
-
getPatternFacet
Gets the pattern.- Returns:
- Returns pattern.
-
isUnion
public boolean isUnion()- Returns:
- Returns is union
-
setUnion
public void setUnion(boolean union) -
getMemberTypes
- Returns:
- Returns memeber type in a union
-
setMemberTypes
-
getMemberTypesKeys
-
setMemberTypesKeys
-
addMemberType
-
isList
public boolean isList() -
setList
public void setList(boolean list) -
getItemTypeQName
-
setItemTypeQName
-
getItemTypeClassName
-
setItemTypeClassName
-
isParticleClass
public boolean isParticleClass() -
setParticleClass
public void setParticleClass(boolean particleClass) -
isHasParticleType
public boolean isHasParticleType() -
setHasParticleType
public void setHasParticleType(boolean hasParticleType) -
addXmlNameJavaNameMapping
-
isJavaNameMappingAvailable
-
getJavaName
-
getRestrictionBaseType
-
toString
-