Class ExtElement

    • Constructor Detail

      • ExtElement

        public ExtElement​(ExtElement original)
        Copy constructor.
        Parameters:
        original - the original object to duplicate.
      • ExtElement

        public ExtElement​(QName qName)
        Creates a new ExtElement object.
        Parameters:
        qName - the qualified name of the element.
    • Method Detail

      • getQName

        public QName getQName()
        Gets the QName of this element.
        Returns:
        the QName of this element.
      • hasChild

        public boolean hasChild()
        Indicates if this element has at least one child.
        Returns:
        true if this element has at least one child, false otherwise.
      • getChildren

        public List<IExtChild> getChildren()
        Gets the list of the children of this element. An empty list is created if needed.
        Returns:
        list of the children of this element.
        See Also:
        hasChild()
      • getFirstElement

        public ExtElement getFirstElement​(String namespaceURI,
                                          String localName)
        Gets the first element child for a given namespace and name of this element.
        Parameters:
        namespaceURI - the namespace URI of the element to retrieve.
        localName - the name of the element to retrieve.
        Returns:
        the first child element of the given namespace and name if it exists, or null if it does not.
      • getFirstElement

        public ExtElement getFirstElement()
        Gets the first child element of this element.
        Returns:
        the first child element of this element, or null if there is no child element.
      • getFirstContent

        public ExtContent getFirstContent()
        Gets the first child content of this element.
        Returns:
        the first child content of this element, or null if there is no child content.
      • addChild

        public IExtChild addChild​(IExtChild child)
        Adds a IExtChild object to this element.
        Parameters:
        child - the object to add.
        Returns:
        the added object.
      • addElement

        public ExtElement addElement​(String namespaceURI,
                                     String localPart,
                                     String prefix)
        Adds a child element to this element.
        Parameters:
        namespaceURI - the namespace URI of the element to add.
        localPart - the local part of the name of the element to add.
        prefix - the prefix of the name of the element to add.
        Returns:
        the added element.
      • addElement

        public ExtElement addElement​(String localPart)
        Adds a child element to this element, both of the same namespace.
        Parameters:
        localPart - the local part of the name of the element to add.
        Returns:
        the added element.
      • addContent

        public ExtContent addContent​(String text)
        Adds a text content to this element.
        Parameters:
        text - the text to add.
        Returns:
        the added ExtContent object.
      • isModule

        public boolean isModule()
        Indicates if this extension element is part of a module or not.
        Returns:
        true if this extension element is part of a module.
      • equals

        public boolean equals​(Object obj)
        Description copied from class: DataWithExtAttributes
        Indicates if this object is equals to a given one.
        Overrides:
        equals in class DataWithExtAttributes
        Parameters:
        obj - the other object to compare.
        Returns:
        true if the two objects are identical.