Class StructureAttributes


  • public class StructureAttributes
    extends AttributeBase
    Model component for structure attribute group in binding definition.
    Author:
    Dennis M. Sosnoski
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean m_isAllowRepeats
      Flag for repeated child elements to be ignored.
      private boolean m_isChoice
      Flag for choice child content.
      private boolean m_isFlexible
      Flexible element handling flag.
      private boolean m_isOrdered
      Flag for ordered child content.
      private java.lang.String m_labelName
      Name for labeled child content potentially referenced elsewhere.
      private java.lang.String m_usingName
      Name for labeled child content defined elsewhere.
      static StringArray s_allowedAttributes
      Enumeration of allowed attribute names
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLabelName()
      Get label name for child component list.
      java.lang.String getUsingName()
      Get name for child component list definition.
      boolean isAllowRepeats()
      Check if repeated child elements are allowed.
      boolean isChoice()
      Check if child components are a choice.
      boolean isFlexible()
      Get flexible flag.
      boolean isOrdered()
      Check if child components are ordered.
      void prevalidate​(ValidationContext vctx)
      Prevalidate attribute information.
      void setAllowRepeats​(boolean ignore)
      Set repeated child elements allowed flag.
      void setChoice​(boolean choice)
      Set child components choice flag.
      void setFlexible​(boolean flexible)
      Set flexible flag.
      void setLabelName​(java.lang.String name)
      Set label name for child component list.
      void setOrdered​(boolean ordered)
      Set child components ordered flag.
      void setUsingName​(java.lang.String name)
      Set name for child component list definition.
      void validate​(ValidationContext vctx)
      Validate attribute information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • s_allowedAttributes

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

        private boolean m_isFlexible
        Flexible element handling flag.
      • m_isOrdered

        private boolean m_isOrdered
        Flag for ordered child content.
      • m_isChoice

        private boolean m_isChoice
        Flag for choice child content.
      • m_isAllowRepeats

        private boolean m_isAllowRepeats
        Flag for repeated child elements to be ignored.
      • m_usingName

        private java.lang.String m_usingName
        Name for labeled child content defined elsewhere.
      • m_labelName

        private java.lang.String m_labelName
        Name for labeled child content potentially referenced elsewhere.
    • Constructor Detail

      • StructureAttributes

        public StructureAttributes()
        Constructor.
    • Method Detail

      • isFlexible

        public boolean isFlexible()
        Get flexible flag.
        Returns:
        flexible flag
      • setFlexible

        public void setFlexible​(boolean flexible)
        Set flexible flag.
        Parameters:
        flexible -
      • isOrdered

        public boolean isOrdered()
        Check if child components are ordered.
        Returns:
        true if ordered, false if not
      • setOrdered

        public void setOrdered​(boolean ordered)
        Set child components ordered flag.
        Parameters:
        ordered - true if ordered, false if not
      • isChoice

        public boolean isChoice()
        Check if child components are a choice.
        Returns:
        true if choice, false if not
      • setChoice

        public void setChoice​(boolean choice)
        Set child components choice flag.
        Parameters:
        choice - true if choice, false if not
      • isAllowRepeats

        public boolean isAllowRepeats()
        Check if repeated child elements are allowed.
        Returns:
        true if repeats allowed, false if not
      • setAllowRepeats

        public void setAllowRepeats​(boolean ignore)
        Set repeated child elements allowed flag.
        Parameters:
        ignore - true if repeated child elements to be allowed, false if not
      • getUsingName

        public java.lang.String getUsingName()
        Get name for child component list definition.
        Returns:
        text of name defining child components (null if none)
      • setUsingName

        public void setUsingName​(java.lang.String name)
        Set name for child component list definition.
        Parameters:
        name - text of name defining child components (null if none)
      • getLabelName

        public java.lang.String getLabelName()
        Get label name for child component list.
        Returns:
        label name text (null if none)
      • setLabelName

        public void setLabelName​(java.lang.String name)
        Set label name for child component list.
        Parameters:
        name - label text for name (null if none)
      • prevalidate

        public void prevalidate​(ValidationContext vctx)
        Description copied from class: AttributeBase
        Prevalidate attribute information. The prevalidation step is used to check attribute values in isolation, such as the settings for enumerated values and class file information. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.
        Overrides:
        prevalidate in class AttributeBase
        Parameters:
        vctx - validation context
      • 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