Class NestingElementBase

    • Field Detail

      • s_allowedAttributes

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

        private NestingAttributes m_nestingAttrs
        Value style attribute information.
      • m_defContext

        private DefinitionContext m_defContext
        Definition context for this nesting (created by validation).
      • m_children

        private java.util.ArrayList m_children
        List of child elements.
    • Constructor Detail

      • NestingElementBase

        protected NestingElementBase​(int type)
        Constructor.
        Parameters:
        type - element type code
    • Method Detail

      • addChild

        public final void addChild​(java.lang.Object child)
        Add child element. TODO: should be ElementBase argument, but JiBX doesn't allow yet
        Parameters:
        child - element to be added as child of this element
      • children

        public final java.util.ArrayList children()
        Get list of child elements.
        Returns:
        list of child elements (never null)
      • childIterator

        public final java.util.Iterator childIterator()
        Get iterator for child elements.
        Returns:
        iterator for child elements
      • getDefinitions

        public final DefinitionContext getDefinitions()
        Get definition context. This method may only be called after validation.
        Returns:
        definition context, or null if no definition context for this element
      • setDefinitions

        void setDefinitions​(DefinitionContext ctx)
        Set definition context.
        Parameters:
        ctx - definition context to be set
      • getStyleName

        public java.lang.String getStyleName()
        Get style name set on this nesting element.
        Returns:
        style string value (null if undefined at this level)
      • getStyle

        public int getStyle()
        Get style value set on this nesting element. This call is only meaningful after validation.
        Returns:
        style value (-1 if undefined at this level)
      • setStyleName

        public void setStyleName​(java.lang.String name)
        Set style name on this nesting element.
        Parameters:
        name - style name (null to undefine style at this level)
      • getDefaultStyle

        public int getDefaultStyle()
        Get default style value for child components. This call is only meaningful after validation.
        Returns:
        default style value for child components (-1 if not defined at this level)
      • 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 ElementBase
        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 ElementBase
        Parameters:
        vctx - validation context