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 void
addEnumFacet(String enumFacet)
Adds the enumeration.void
addMaxOccurs(QName qName, long maxOccurs)
Adds the maxOccurs associated with a QName.void
addMemberType(QName qname, 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(String xmlName, 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 anyTypeboolean
getArrayStatusForQName(QName qName)
Gets whether a given QName refers to an array.boolean
getAttributeStatusForQName(QName qName)
Gets whether a given QName is an attributeboolean
getBinaryStatusForQName(QName qName)
Gets whether a given QName refers to binary.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:anyTypeString
getDefaultValueForQName(QName qname)
gets the default value for qnameIterator<QName>
getElementQNameIterator()
Deprecated.Use #getQNameArrayList<String>
getEnumFacet()
Gets the enumeration.String
getExtensionClassName()
Sets the extensions base class name.boolean
getInnerChoiceStatusForQName(QName qName)
String
getItemTypeClassName()
QName
getItemTypeQName()
String
getJavaName(String xmlName)
long
getLengthFacet()
Gets the length facet.String
getMaxExclusiveFacet()
Gets the maxExclusive.String
getMaxInclusiveFacet()
Gets the maxInclusive.long
getMaxLengthFacet()
Gets the maxLength.long
getMaxOccurs(QName qName)
Gets the maxOccurs associated with a QName.Map<QName,String>
getMemberTypes()
List<QName>
getMemberTypesKeys()
String
getMinExclusiveFacet()
Gets the minExclusive.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 orderString
getOwnClassName()
QName
getOwnQname()
BeanWriterMetaInfoHolder
getParent()
Gets the parentboolean
getParticleTypeStatusForQName(QName qName)
String
getPatternFacet()
Gets the pattern.QName[]
getQNameArray()
Gets the QName array - may not be ordered.QName
getRestrictionBaseType()
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.String
getTotalDigitsFacet()
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
isFixed(QName eltQName)
Returns whether a QName is fixed or notboolean
isHasParticleType()
boolean
isJavaNameMappingAvailable(String xmlName)
boolean
isList()
boolean
isNillable(QName eltQName)
Returns whether a QName is nillable or notboolean
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, String value)
this method registers the defult value agaist the element qname.void
registerFixedQName(QName eltQName)
Registers a Qname as fixed The qName better be of an elementvoid
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)
Registers a Qname as nillable The qName better be of an elementvoid
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 thvoid
setChoice(boolean choice)
void
setEnumFacet(ArrayList<String> enumFacet)
Sets the enumeration.void
setExtension(boolean extension)
Sets the extension status.void
setExtensionBaseType(QName extensionBaseType)
Sets the extension basetype.void
setExtensionClassName(String extensionClassName)
Sets the extensions base class name.void
setHasParticleType(boolean hasParticleType)
void
setItemTypeClassName(String itemTypeClassName)
void
setItemTypeQName(QName itemTypeQName)
void
setLengthFacet(long lengthFacet)
Sets the length facet.void
setList(boolean list)
void
setMaxExclusiveFacet(String maxExclusiveFacet)
Sets the maxExclusive.void
setMaxInclusiveFacet(String maxInclusiveFacet)
Sets the maxInclusive.void
setMaxLengthFacet(long maxLengthFacet)
Sets the maxLength.void
setMemberTypes(Map<QName,String> memberTypes)
void
setMemberTypesKeys(List<QName> memberTypesKeys)
void
setMinExclusiveFacet(String minExclusiveFacet)
Sets the minExclusive.void
setMinInclusiveFacet(String minInclusiveFacet)
Sets the minInclusive.void
setMinLengthFacet(long minLengthFacet)
Sets the minLength.void
setOrdered(boolean ordered)
Sets the ordered flag.void
setOwnClassName(String ownClassName)
void
setOwnQname(QName ownQname)
void
setParticleClass(boolean particleClass)
void
setPatternFacet(String patternFacet)
Sets the pattern.void
setRestriction(boolean restriction)
Sets the restriction status.void
setRestrictionBaseType(QName restrictionBaseType)
Sets the restriction basetype.void
setRestrictionClassName(String restrictionClassName)
Sets the restriction base class name.void
setSimple(boolean simple)
void
setTotalDigitsFacet(String totalDigitsFacet)
Sets the totalDigitsvoid
setUnion(boolean union)
String
toString()
-
-
-
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
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 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()
-
-