Class 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 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 Map<QName,​QName> elementToSchemaQNameMap
      • elementToJavaClassMap

        protected Map<QName,​String> elementToJavaClassMap
      • qNameMaxOccursCountMap

        protected Map<QName,​Long> qNameMaxOccursCountMap
      • qNameMinOccursCountMap

        protected Map<QName,​Long> qNameMinOccursCountMap
      • 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
      • memberTypesKeys

        protected List<QName> memberTypesKeys
      • elementQNameToDefulatValueMap

        protected Map<QName,​String> elementQNameToDefulatValueMap
      • itemTypeQName

        protected QName itemTypeQName
      • itemTypeClassName

        protected String itemTypeClassName
      • isUnion

        protected boolean isUnion
      • isList

        protected boolean isList
      • isParticleClass

        protected boolean isParticleClass
      • hasParticleType

        protected boolean hasParticleType
      • nillableQNameList

        protected List<QName> nillableQNameList
      • fixedQNameList

        protected List<QName> fixedQNameList
    • 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 String getOwnClassName()
      • setOwnClassName

        public void setOwnClassName​(String ownClassName)
      • getOwnQname

        public QName getOwnQname()
      • setOwnQname

        public void setOwnQname​(QName ownQname)
      • 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 -
      • getEnumFacet

        public List<String> getEnumFacet()
        Gets the enumeration.
        Returns:
        Returns enumeration.
      • 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)
      • getMemberTypes

        public Map<QName,​String> getMemberTypes()
        Returns:
        Returns memeber type in a union
      • setMemberTypes

        public void setMemberTypes​(Map<QName,​String> memberTypes)
      • getMemberTypesKeys

        public List<QName> getMemberTypesKeys()
      • setMemberTypesKeys

        public void setMemberTypesKeys​(List<QName> memberTypesKeys)
      • addMemberType

        public void addMemberType​(QName qname,
                                  String className)
      • 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)
      • addXmlNameJavaNameMapping

        public void addXmlNameJavaNameMapping​(String xmlName,
                                              String javaName)
      • isJavaNameMappingAvailable

        public boolean isJavaNameMappingAvailable​(String xmlName)
      • getJavaName

        public String getJavaName​(String xmlName)
      • getRestrictionBaseType

        public QName getRestrictionBaseType()