Class MappingElementBase

  • Direct Known Subclasses:
    MappingElement, PrecompiledMappingElement

    public abstract class MappingElementBase
    extends TemplateElementBase
    Model component for mapping element of binding definition. Subclasses are used for mappings in normal or precompiled bindings.
    Author:
    Dennis M. Sosnoski
    • Field Detail

      • s_allowedAttributes

        public static final StringArray s_allowedAttributes
        Enumeration of allowed attribute names
    • Constructor Detail

      • MappingElementBase

        public MappingElementBase​(int type)
        Constructor.
        Parameters:
        type - element type code
    • Method Detail

      • isAbstract

        public boolean isAbstract()
        Check for abstract mapping.
        Returns:
        true if abstract, false if not
      • setAbstract

        public void setAbstract​(boolean abs)
        Set abstract mapping.
        Parameters:
        abs - true if abstract, false if not
      • getTypeName

        public String getTypeName()
        Get type name.
        Returns:
        type name
      • setTypeName

        public void setTypeName​(String name)
        Set type name.
        Parameters:
        name - type name
      • getTypeQName

        public org.jibx.runtime.QName getTypeQName()
        Get type qualified name.
        Returns:
        type qualified name
      • setTypeQName

        public void setTypeQName​(org.jibx.runtime.QName qname)
        Set type qualified name.
        Parameters:
        qname - type qualified name
      • isDefaultTemplate

        public boolean isDefaultTemplate()
        Check if this is a default template.
        Specified by:
        isDefaultTemplate in class TemplateElementBase
        Returns:
        true if default, false if not
      • getNameAttributes

        public NameAttributes getNameAttributes()
        Get name attributes. This is provided for use with the name attributes as a hash key.
        Returns:
        name attributes structure
      • getName

        public String getName()
        Get name.
        Returns:
        name text
      • setName

        public void setName​(String name)
        Set name.
        Parameters:
        name - text for name
      • getUri

        public String getUri()
        Get specified namespace URI.
        Returns:
        namespace URI (null if not set)
      • setUri

        public void setUri​(String uri)
        Set namespace URI.
        Parameters:
        uri - namespace URI (null if not set)
      • getPrefix

        public String getPrefix()
        Get specified namespace prefix.
        Returns:
        namespace prefix (null if not set)
      • setPrefix

        public void setPrefix​(String prefix)
        Set namespace prefix.
        Parameters:
        prefix - namespace prefix (null if not set)
      • getNamespace

        public NamespaceElement getNamespace()
        Get effective namespace information. This call is only meaningful after validation.
        Returns:
        effective namespace information
      • setExtendsName

        public void setExtendsName​(String name)
        Set name of mapped class extended by this one.
        Parameters:
        name - Name
      • getExtendsName

        public String getExtendsName()
        Get name of mapped class extended by this one.
        Returns:
        name Name of mapped class
      • prevalidate

        public void prevalidate​(ValidationContext vctx)
        Description copied from class: ElementBase
        Prevalidate element information. The prevalidation step is used to check isolated aspects of an element, such as the settings for enumerated values on the element and attributes. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.
        Overrides:
        prevalidate in class TemplateElementBase
        Parameters:
        vctx - validation context
      • validate

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