Class XMLElementWrapper

    • Constructor Detail

      • XMLElementWrapper

        public XMLElementWrapper()
        Creates the property container without a name.
      • XMLElementWrapper

        public XMLElementWrapper​(Atom propertyAtom)
        Creates the property container.
        Parameters:
        propertyAtom - the name of the component, unique within it's parent.
    • Method Detail

      • usesPropIndex

        public boolean usesPropIndex()
        XML element wrappers are index based.
        Specified by:
        usesPropIndex in interface IPropCnr
        Overrides:
        usesPropIndex in class PropCnr
        Returns:
        true if index is used, false for non-index based container.
      • createXMLElementWrapper

        protected XMLElementWrapper createXMLElementWrapper​(Atom atom)
        Creates a new XMLElementWrapper instance.
      • clone

        public XMLElementWrapper clone()
                                throws java.lang.CloneNotSupportedException
        Clones the XMLElementWrapper.
        Overrides:
        clone in class PropCnr
        Returns:
        A new wrapper for a cloned XML element.
        Throws:
        java.lang.CloneNotSupportedException - For property errors when cloning.
      • getOutputProps

        public OutputProps getOutputProps()
        Gets the Output properties.
        Returns:
        The Output properties, or null if this property is orphan.
      • wrap

        public void wrap​(org.w3c.dom.Element element)
                  throws PropException
        Wraps the XML element. This method sets properties in this instance, and creates additional elements when required. Comment nodes are ignored.
        Parameters:
        element - The XML element to wrap.
        Throws:
        PropException - For property errors.
      • isDocumentElement

        protected boolean isDocumentElement()
        Checks if it's the document element.
      • getWrappedReference

        public java.lang.String getWrappedReference​(boolean attempIndex)
        Gets the reference of this wrapped element.
        Parameters:
        attempIndex - Flag indicating index is required if possible.
        Returns:
        A reference such as "xml:/path" where an element that could be a row element is assigned the row index.
      • getElement

        public org.w3c.dom.Element getElement()
        Gets the XML Element.
        Returns:
        The element.
      • getElementPath

        public java.lang.String getElementPath()
        Gets the path of this element node in relation to the document.
        Returns:
        The path to the element.
      • getWrappedElementValue

        public java.lang.String getWrappedElementValue()
        Gets the wrapped element value.
        Returns:
        The wrapped element value, or null for none.