Class NameAttributes

java.lang.Object
org.jibx.binding.model.AttributeBase
org.jibx.binding.model.NameAttributes

public class NameAttributes extends AttributeBase
Model component for name attribute group in binding definition.
Author:
Dennis M. Sosnoski
  • Field Details

    • s_allowedAttributes

      public static final StringArray s_allowedAttributes
      Enumeration of allowed attribute names
    • m_name

      private String m_name
      Name text.
    • m_uri

      private String m_uri
      Namespace URI.
    • m_prefix

      private String m_prefix
      Namespace prefix.
    • m_isAttribute

      private boolean m_isAttribute
      Name represents an attribute flag.
    • m_namespace

      private NamespaceElement m_namespace
      Namespace definition used by this name.
  • Constructor Details

    • NameAttributes

      public NameAttributes()
      Default constructor.
  • Method Details

    • setIsAttribute

      public void setIsAttribute(boolean isattr)
      Set flag for an attribute name. This information is necessary for resolving the namespace definition to be used with a name, but has to be determined by the element owning this attribute group. It must be set (if different from the default of false) prior to validation.
      Parameters:
      isattr - flag for name represents an attribute
    • isAttribute

      public boolean isAttribute()
      Get flag for an attribute name.
      Returns:
      true if an attribute, false if an element
    • 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 definition. This call can only be used after validation.
      Returns:
      definition for namespace used by this name
    • validate

      public void validate(ValidationContext vctx)
      Description copied from class: AttributeBase
      Validate attribute information. The validation step is used for checking the interactions between attributes, such as references to named elements and namespace usage. The AttributeBase.prevalidate(org.jibx.binding.model.ValidationContext) method will always be called for every component in the binding definition before this method is called for any component. This empty base class implementation should be overridden by each subclass that requires validation handling.
      Overrides:
      validate in class AttributeBase
      Parameters:
      vctx - validation context
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object