Class AttributeElement

    • Field Detail

      • s_allowedAttributes

        public static final org.jibx.util.StringArray s_allowedAttributes
        List of allowed attribute names.
      • s_useValues

        public static final org.jibx.runtime.EnumSet s_useValues
    • Constructor Detail

      • AttributeElement

        public AttributeElement()
        Constructor.
    • Method Detail

      • preset

        protected void preset​(org.jibx.runtime.IUnmarshallingContext ictx)
                       throws org.jibx.runtime.JiBXException
        Description copied from class: SchemaBase
        Pre-set method to be called by data binding while parsing element start tag. The base class implementation just sets the parent element link and reads in any extra namespaces defined on the element. Subclasses which override this implementation must call the base implementation during their processing.
        Overrides:
        preset in class SchemaBase
        Parameters:
        ictx - unmarshalling context
        Throws:
        org.jibx.runtime.JiBXException - on error
      • getType

        public org.jibx.runtime.QName getType()
        Get 'type' attribute value.
        Returns:
        type (null if not set)
      • setType

        public void setType​(org.jibx.runtime.QName type)
        Set 'type' attribute value. Note that this method should only be used prior to validation, since it will only set the type name and not link the actual type information.
        Parameters:
        type - (null if not set)
      • getDefault

        public String getDefault()
        Get 'default' attribute value.
        Returns:
        default (null if not set)
      • setDefault

        public void setDefault​(String dflt)
        Set the 'default' attribute value.
        Parameters:
        dflt - (null if not set)
      • getFixed

        public String getFixed()
        Get 'fixed' attribute value.
        Returns:
        fixed (null if not set)
      • setFixed

        public void setFixed​(String fixed)
        Set 'fixed' attribute value.
        Parameters:
        fixed - (null if not set)
      • getUse

        public int getUse()
        Get 'use' attribute type code.
        Returns:
        type code applied to this attribute
      • setUse

        public void setUse​(int code)
        Set 'use' attribute type code.
        Parameters:
        code - (-1 to unset)
      • getUseText

        public String getUseText()
        Get 'use' attribute text.
        Returns:
        text (null if not set)
      • getQName

        public org.jibx.runtime.QName getQName()
        Get qualified name set directly on attribute. This method is only usable after prevalidation.
        Specified by:
        getQName in interface INamed
        Returns:
        qname (null if a reference)
      • getEffectiveQName

        public org.jibx.runtime.QName getEffectiveQName()
        Get effective qualified name for attribute (whether defined directly, or by reference). This method is only usable after prevalidation.
        Returns:
        qname
      • getReference

        public AttributeElement getReference()
        Get the referenced attribute declaration. This method is only usable after validation.
        Returns:
        referenced attribute declaration, or null if not a reference
      • isInlineType

        public boolean isInlineType()
        Check if the attribute uses an inline type definition.
        Returns:
        true if inline, false if not
      • getTypeDefinition

        public CommonTypeDefinition getTypeDefinition()
        Get type definition. This returns the actual type definition for the attribute, irrespective of whether the attribute uses an attribute reference, a type reference, or an inline type definition. It is only usable after validation.
        Returns:
        type definition
      • setTypeDefinition

        public void setTypeDefinition​(CommonTypeDefinition def)
        Set type definition. If the supplied type definition is a global type it is used by reference; if a local type it is used inline.
        Parameters:
        def - type definition
      • prevalidate

        public void prevalidate​(ValidationContext vctx)
        Description copied from class: SchemaBase
        Prevalidate component information. The prevalidation step is used to check isolated aspects of a component, such as the settings for enumerated values. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.
        Specified by:
        prevalidate in interface IComponent
        Overrides:
        prevalidate in class AnnotatedBase
        Parameters:
        vctx - validation context
      • validate

        public void validate​(ValidationContext vctx)
        Description copied from class: SchemaBase
        Validate component information. The validation step is used for checking the interactions between components, such as name references to other components. The SchemaBase.prevalidate(org.jibx.schema.validation.ValidationContext) method will always be called for every component in the schema definition before this method is called for any component. This empty base class implementation should be overridden by each subclass that requires validation handling.
        Specified by:
        validate in interface IComponent
        Overrides:
        validate in class SchemaBase
        Parameters:
        vctx - validation context