Class ElementImpl

All Implemented Interfaces:
com.liferay.portal.kernel.xml.Branch, com.liferay.portal.kernel.xml.Element, com.liferay.portal.kernel.xml.Node, Serializable

public class ElementImpl extends BranchImpl implements com.liferay.portal.kernel.xml.Element
Author:
Brian Wing Shun Chan
See Also:
  • Constructor Details

    • ElementImpl

      public ElementImpl(org.dom4j.Element element)
  • Method Details

    • accept

      public <T, V extends com.liferay.portal.kernel.xml.Visitor<T>> T accept(V visitor)
      Specified by:
      accept in interface com.liferay.portal.kernel.xml.Node
      Overrides:
      accept in class NodeImpl
    • add

      public void add(com.liferay.portal.kernel.xml.Attribute attribute)
      Specified by:
      add in interface com.liferay.portal.kernel.xml.Element
    • add

      public void add(com.liferay.portal.kernel.xml.CDATA cdata)
      Specified by:
      add in interface com.liferay.portal.kernel.xml.Element
    • add

      public void add(com.liferay.portal.kernel.xml.Entity entity)
      Specified by:
      add in interface com.liferay.portal.kernel.xml.Element
    • add

      public void add(com.liferay.portal.kernel.xml.Namespace namespace)
      Specified by:
      add in interface com.liferay.portal.kernel.xml.Element
    • add

      public void add(com.liferay.portal.kernel.xml.Text text)
      Specified by:
      add in interface com.liferay.portal.kernel.xml.Element
    • addAttribute

      public com.liferay.portal.kernel.xml.Element addAttribute(com.liferay.portal.kernel.xml.QName qName, String value)
      Specified by:
      addAttribute in interface com.liferay.portal.kernel.xml.Element
    • addAttribute

      public com.liferay.portal.kernel.xml.Element addAttribute(String name, String value)
      Specified by:
      addAttribute in interface com.liferay.portal.kernel.xml.Element
    • addCDATA

      public com.liferay.portal.kernel.xml.Element addCDATA(String cdata)
      Specified by:
      addCDATA in interface com.liferay.portal.kernel.xml.Element
    • addComment

      public com.liferay.portal.kernel.xml.Element addComment(String comment)
      Specified by:
      addComment in interface com.liferay.portal.kernel.xml.Element
    • addEntity

      public com.liferay.portal.kernel.xml.Element addEntity(String name, String text)
      Specified by:
      addEntity in interface com.liferay.portal.kernel.xml.Element
    • additionalNamespaces

      public List<com.liferay.portal.kernel.xml.Namespace> additionalNamespaces()
      Specified by:
      additionalNamespaces in interface com.liferay.portal.kernel.xml.Element
    • addNamespace

      public com.liferay.portal.kernel.xml.Element addNamespace(String prefix, String uri)
      Specified by:
      addNamespace in interface com.liferay.portal.kernel.xml.Element
    • addProcessingInstruction

      public com.liferay.portal.kernel.xml.Element addProcessingInstruction(String target, Map<String,String> data)
      Specified by:
      addProcessingInstruction in interface com.liferay.portal.kernel.xml.Element
    • addProcessingInstruction

      public com.liferay.portal.kernel.xml.Element addProcessingInstruction(String target, String data)
      Specified by:
      addProcessingInstruction in interface com.liferay.portal.kernel.xml.Element
    • addText

      public com.liferay.portal.kernel.xml.Element addText(String text)
      Specified by:
      addText in interface com.liferay.portal.kernel.xml.Element
    • appendAttributes

      public void appendAttributes(com.liferay.portal.kernel.xml.Element element)
      Specified by:
      appendAttributes in interface com.liferay.portal.kernel.xml.Element
    • attribute

      public com.liferay.portal.kernel.xml.Attribute attribute(int index)
      Specified by:
      attribute in interface com.liferay.portal.kernel.xml.Element
    • attribute

      public com.liferay.portal.kernel.xml.Attribute attribute(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      attribute in interface com.liferay.portal.kernel.xml.Element
    • attribute

      public com.liferay.portal.kernel.xml.Attribute attribute(String name)
      Specified by:
      attribute in interface com.liferay.portal.kernel.xml.Element
    • attributeCount

      public int attributeCount()
      Specified by:
      attributeCount in interface com.liferay.portal.kernel.xml.Element
    • attributeIterator

      public Iterator<com.liferay.portal.kernel.xml.Attribute> attributeIterator()
      Specified by:
      attributeIterator in interface com.liferay.portal.kernel.xml.Element
    • attributes

      public List<com.liferay.portal.kernel.xml.Attribute> attributes()
      Specified by:
      attributes in interface com.liferay.portal.kernel.xml.Element
    • attributeValue

      public String attributeValue(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      attributeValue in interface com.liferay.portal.kernel.xml.Element
    • attributeValue

      public String attributeValue(com.liferay.portal.kernel.xml.QName qName, String defaultValue)
      Specified by:
      attributeValue in interface com.liferay.portal.kernel.xml.Element
    • attributeValue

      public String attributeValue(String name)
      Specified by:
      attributeValue in interface com.liferay.portal.kernel.xml.Element
    • attributeValue

      public String attributeValue(String name, String defaultValue)
      Specified by:
      attributeValue in interface com.liferay.portal.kernel.xml.Element
    • createCopy

      public com.liferay.portal.kernel.xml.Element createCopy()
      Specified by:
      createCopy in interface com.liferay.portal.kernel.xml.Element
    • createCopy

      public com.liferay.portal.kernel.xml.Element createCopy(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      createCopy in interface com.liferay.portal.kernel.xml.Element
    • createCopy

      public com.liferay.portal.kernel.xml.Element createCopy(String name)
      Specified by:
      createCopy in interface com.liferay.portal.kernel.xml.Element
    • declaredNamespaces

      public List<com.liferay.portal.kernel.xml.Namespace> declaredNamespaces()
      Specified by:
      declaredNamespaces in interface com.liferay.portal.kernel.xml.Element
    • element

      public com.liferay.portal.kernel.xml.Element element(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      element in interface com.liferay.portal.kernel.xml.Element
    • element

      public com.liferay.portal.kernel.xml.Element element(String name)
      Specified by:
      element in interface com.liferay.portal.kernel.xml.Element
    • elementIterator

      public Iterator<com.liferay.portal.kernel.xml.Element> elementIterator()
      Specified by:
      elementIterator in interface com.liferay.portal.kernel.xml.Element
    • elementIterator

      public Iterator<com.liferay.portal.kernel.xml.Element> elementIterator(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      elementIterator in interface com.liferay.portal.kernel.xml.Element
    • elementIterator

      public Iterator<com.liferay.portal.kernel.xml.Element> elementIterator(String name)
      Specified by:
      elementIterator in interface com.liferay.portal.kernel.xml.Element
    • elements

      public List<com.liferay.portal.kernel.xml.Element> elements()
      Specified by:
      elements in interface com.liferay.portal.kernel.xml.Element
    • elements

      public List<com.liferay.portal.kernel.xml.Element> elements(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      elements in interface com.liferay.portal.kernel.xml.Element
    • elements

      public List<com.liferay.portal.kernel.xml.Element> elements(String name)
      Specified by:
      elements in interface com.liferay.portal.kernel.xml.Element
    • elementText

      public String elementText(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      elementText in interface com.liferay.portal.kernel.xml.Element
    • elementText

      public String elementText(String name)
      Specified by:
      elementText in interface com.liferay.portal.kernel.xml.Element
    • elementTextTrim

      public String elementTextTrim(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      elementTextTrim in interface com.liferay.portal.kernel.xml.Element
    • elementTextTrim

      public String elementTextTrim(String name)
      Specified by:
      elementTextTrim in interface com.liferay.portal.kernel.xml.Element
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class BranchImpl
    • getData

      public Object getData()
      Specified by:
      getData in interface com.liferay.portal.kernel.xml.Element
    • getNamespace

      public com.liferay.portal.kernel.xml.Namespace getNamespace()
      Specified by:
      getNamespace in interface com.liferay.portal.kernel.xml.Element
    • getNamespaceForPrefix

      public com.liferay.portal.kernel.xml.Namespace getNamespaceForPrefix(String prefix)
      Specified by:
      getNamespaceForPrefix in interface com.liferay.portal.kernel.xml.Element
    • getNamespaceForURI

      public com.liferay.portal.kernel.xml.Namespace getNamespaceForURI(String uri)
      Specified by:
      getNamespaceForURI in interface com.liferay.portal.kernel.xml.Element
    • getNamespacePrefix

      public String getNamespacePrefix()
      Specified by:
      getNamespacePrefix in interface com.liferay.portal.kernel.xml.Element
    • getNamespacesForURI

      public List<com.liferay.portal.kernel.xml.Namespace> getNamespacesForURI(String uri)
      Specified by:
      getNamespacesForURI in interface com.liferay.portal.kernel.xml.Element
    • getNamespaceURI

      public String getNamespaceURI()
      Specified by:
      getNamespaceURI in interface com.liferay.portal.kernel.xml.Element
    • getQName

      public com.liferay.portal.kernel.xml.QName getQName()
      Specified by:
      getQName in interface com.liferay.portal.kernel.xml.Element
    • getQName

      public com.liferay.portal.kernel.xml.QName getQName(String qualifiedName)
      Specified by:
      getQName in interface com.liferay.portal.kernel.xml.Element
    • getQualifiedName

      public String getQualifiedName()
      Specified by:
      getQualifiedName in interface com.liferay.portal.kernel.xml.Element
    • getTextTrim

      public String getTextTrim()
      Specified by:
      getTextTrim in interface com.liferay.portal.kernel.xml.Element
    • getWrappedElement

      public org.dom4j.Element getWrappedElement()
    • getXPathResult

      public com.liferay.portal.kernel.xml.Node getXPathResult(int index)
      Specified by:
      getXPathResult in interface com.liferay.portal.kernel.xml.Element
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BranchImpl
    • hasMixedContent

      public boolean hasMixedContent()
      Specified by:
      hasMixedContent in interface com.liferay.portal.kernel.xml.Element
    • isRootElement

      public boolean isRootElement()
      Specified by:
      isRootElement in interface com.liferay.portal.kernel.xml.Element
    • isTextOnly

      public boolean isTextOnly()
      Specified by:
      isTextOnly in interface com.liferay.portal.kernel.xml.Element
    • remove

      public boolean remove(com.liferay.portal.kernel.xml.Attribute attribute)
      Specified by:
      remove in interface com.liferay.portal.kernel.xml.Element
    • remove

      public boolean remove(com.liferay.portal.kernel.xml.CDATA cdata)
      Specified by:
      remove in interface com.liferay.portal.kernel.xml.Element
    • remove

      public boolean remove(com.liferay.portal.kernel.xml.Entity entity)
      Specified by:
      remove in interface com.liferay.portal.kernel.xml.Element
    • remove

      public boolean remove(com.liferay.portal.kernel.xml.Namespace namespace)
      Specified by:
      remove in interface com.liferay.portal.kernel.xml.Element
    • remove

      public boolean remove(com.liferay.portal.kernel.xml.Text text)
      Specified by:
      remove in interface com.liferay.portal.kernel.xml.Element
    • setAttributes

      public void setAttributes(List<com.liferay.portal.kernel.xml.Attribute> attributes)
      Specified by:
      setAttributes in interface com.liferay.portal.kernel.xml.Element
    • setData

      public void setData(Object data)
      Specified by:
      setData in interface com.liferay.portal.kernel.xml.Element
    • setQName

      public void setQName(com.liferay.portal.kernel.xml.QName qName)
      Specified by:
      setQName in interface com.liferay.portal.kernel.xml.Element
    • sortAttributes

      public void sortAttributes(boolean recursive)
      Specified by:
      sortAttributes in interface com.liferay.portal.kernel.xml.Element
    • sortElementsByAttribute

      public void sortElementsByAttribute(String elementName, String attributeName)
      Specified by:
      sortElementsByAttribute in interface com.liferay.portal.kernel.xml.Element
    • sortElementsByChildElement

      public void sortElementsByChildElement(String elementName, String childElementName)
      Specified by:
      sortElementsByChildElement in interface com.liferay.portal.kernel.xml.Element
    • toString

      public String toString()
      Overrides:
      toString in class BranchImpl