com.liferay.portal.xml
Class ElementImpl
java.lang.Object
com.liferay.portal.xml.NodeImpl
com.liferay.portal.xml.BranchImpl
com.liferay.portal.xml.ElementImpl
- All Implemented Interfaces:
- Branch, Element, Node, Serializable
public class ElementImpl
- extends BranchImpl
- implements Element
- See Also:
- Serialized Form
Constructor Summary |
ElementImpl(org.dom4j.Element element)
|
Method Summary |
|
accept(V visitor)
|
void |
add(Attribute attribute)
|
void |
add(CDATA cdata)
|
void |
add(Entity entity)
|
void |
add(Namespace namespace)
|
void |
add(Text text)
|
Element |
addAttribute(QName qName,
String value)
|
Element |
addAttribute(String name,
String value)
|
Element |
addCDATA(String cdata)
|
Element |
addComment(String comment)
|
Element |
addEntity(String name,
String text)
|
List<Namespace> |
additionalNamespaces()
|
Element |
addNamespace(String prefix,
String uri)
|
Element |
addProcessingInstruction(String target,
Map<String,String> data)
|
Element |
addProcessingInstruction(String target,
String data)
|
Element |
addText(String text)
|
void |
appendAttributes(Element element)
|
Attribute |
attribute(int index)
|
Attribute |
attribute(QName qName)
|
Attribute |
attribute(String name)
|
int |
attributeCount()
|
Iterator<Attribute> |
attributeIterator()
|
List<Attribute> |
attributes()
|
String |
attributeValue(QName qName)
|
String |
attributeValue(QName qName,
String defaultValue)
|
String |
attributeValue(String name)
|
String |
attributeValue(String name,
String defaultValue)
|
Element |
createCopy()
|
Element |
createCopy(QName qName)
|
Element |
createCopy(String name)
|
List<Namespace> |
declaredNamespaces()
|
Element |
element(QName qName)
|
Element |
element(String name)
|
Iterator<Element> |
elementIterator()
|
Iterator<Element> |
elementIterator(QName qName)
|
Iterator<Element> |
elementIterator(String name)
|
List<Element> |
elements()
|
List<Element> |
elements(QName qName)
|
List<Element> |
elements(String name)
|
String |
elementText(QName qName)
|
String |
elementText(String name)
|
String |
elementTextTrim(QName qName)
|
String |
elementTextTrim(String name)
|
boolean |
equals(Object obj)
|
String |
formattedString()
|
String |
formattedString(String indent)
|
String |
formattedString(String indent,
boolean expandEmptyElements)
|
Object |
getData()
|
Namespace |
getNamespace()
|
Namespace |
getNamespaceForPrefix(String prefix)
|
Namespace |
getNamespaceForURI(String uri)
|
String |
getNamespacePrefix()
|
List<Namespace> |
getNamespacesForURI(String uri)
|
String |
getNamespaceURI()
|
QName |
getQName()
|
QName |
getQName(String qualifiedName)
|
String |
getQualifiedName()
|
String |
getTextTrim()
|
org.dom4j.Element |
getWrappedElement()
|
Node |
getXPathResult(int index)
|
int |
hashCode()
|
boolean |
hasMixedContent()
|
boolean |
isRootElement()
|
boolean |
isTextOnly()
|
boolean |
remove(Attribute attribute)
|
boolean |
remove(CDATA cdata)
|
boolean |
remove(Entity entity)
|
boolean |
remove(Namespace namespace)
|
boolean |
remove(Text text)
|
void |
setAttributes(List<Attribute> attributes)
|
void |
setData(Object data)
|
void |
setQName(QName qName)
|
void |
sortAttributes(boolean recursive)
|
void |
sortElementsByAttribute(String elementName,
String attributeName)
|
void |
sortElementsByChildElement(String elementName,
String childElementName)
|
String |
toString()
|
Methods inherited from class com.liferay.portal.xml.BranchImpl |
add, add, add, add, addElement, addElement, addElement, appendContent, clearContent, content, elementByID, getWrappedBranch, indexOf, node, nodeCount, nodeIterator, normalize, processingInstruction, processingInstructions, processingInstructions, remove, remove, remove, remove, removeProcessingInstruction, setContent, setProcessingInstructions |
Methods inherited from class com.liferay.portal.xml.NodeImpl |
asXML, asXPathResult, compactString, detach, formattedString, getDocument, getName, getParent, getPath, getPath, getStringValue, getText, getUniquePath, getUniquePath, getWrappedNode, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setName, setText, supportsParent, valueOf, write |
Methods inherited from interface com.liferay.portal.kernel.xml.Branch |
add, add, add, add, addElement, addElement, addElement, appendContent, clearContent, content, elementByID, indexOf, node, nodeCount, nodeIterator, normalize, processingInstruction, processingInstructions, processingInstructions, remove, remove, remove, remove, removeProcessingInstruction, setContent, setProcessingInstructions |
Methods inherited from interface com.liferay.portal.kernel.xml.Node |
asXML, asXPathResult, compactString, detach, formattedString, getDocument, getName, getParent, getPath, getPath, getUniquePath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setName, setText, supportsParent, valueOf, write |
ElementImpl
public ElementImpl(org.dom4j.Element element)
accept
public <T,V extends Visitor<T>> T accept(V visitor)
- Specified by:
accept
in interface Node
- Overrides:
accept
in class NodeImpl
add
public void add(Attribute attribute)
- Specified by:
add
in interface Element
add
public void add(CDATA cdata)
- Specified by:
add
in interface Element
add
public void add(Entity entity)
- Specified by:
add
in interface Element
add
public void add(Namespace namespace)
- Specified by:
add
in interface Element
add
public void add(Text text)
- Specified by:
add
in interface Element
addAttribute
public Element addAttribute(QName qName,
String value)
- Specified by:
addAttribute
in interface Element
addAttribute
public Element addAttribute(String name,
String value)
- Specified by:
addAttribute
in interface Element
addCDATA
public Element addCDATA(String cdata)
- Specified by:
addCDATA
in interface Element
addComment
public Element addComment(String comment)
- Specified by:
addComment
in interface Element
addEntity
public Element addEntity(String name,
String text)
- Specified by:
addEntity
in interface Element
additionalNamespaces
public List<Namespace> additionalNamespaces()
- Specified by:
additionalNamespaces
in interface Element
addNamespace
public Element addNamespace(String prefix,
String uri)
- Specified by:
addNamespace
in interface Element
addProcessingInstruction
public Element addProcessingInstruction(String target,
Map<String,String> data)
- Specified by:
addProcessingInstruction
in interface Element
addProcessingInstruction
public Element addProcessingInstruction(String target,
String data)
- Specified by:
addProcessingInstruction
in interface Element
addText
public Element addText(String text)
- Specified by:
addText
in interface Element
appendAttributes
public void appendAttributes(Element element)
- Specified by:
appendAttributes
in interface Element
attribute
public Attribute attribute(int index)
- Specified by:
attribute
in interface Element
attribute
public Attribute attribute(QName qName)
- Specified by:
attribute
in interface Element
attribute
public Attribute attribute(String name)
- Specified by:
attribute
in interface Element
attributeCount
public int attributeCount()
- Specified by:
attributeCount
in interface Element
attributeIterator
public Iterator<Attribute> attributeIterator()
- Specified by:
attributeIterator
in interface Element
attributes
public List<Attribute> attributes()
- Specified by:
attributes
in interface Element
attributeValue
public String attributeValue(QName qName)
- Specified by:
attributeValue
in interface Element
attributeValue
public String attributeValue(QName qName,
String defaultValue)
- Specified by:
attributeValue
in interface Element
attributeValue
public String attributeValue(String name)
- Specified by:
attributeValue
in interface Element
attributeValue
public String attributeValue(String name,
String defaultValue)
- Specified by:
attributeValue
in interface Element
createCopy
public Element createCopy()
- Specified by:
createCopy
in interface Element
createCopy
public Element createCopy(QName qName)
- Specified by:
createCopy
in interface Element
createCopy
public Element createCopy(String name)
- Specified by:
createCopy
in interface Element
declaredNamespaces
public List<Namespace> declaredNamespaces()
- Specified by:
declaredNamespaces
in interface Element
element
public Element element(QName qName)
- Specified by:
element
in interface Element
element
public Element element(String name)
- Specified by:
element
in interface Element
elementIterator
public Iterator<Element> elementIterator()
- Specified by:
elementIterator
in interface Element
elementIterator
public Iterator<Element> elementIterator(QName qName)
- Specified by:
elementIterator
in interface Element
elementIterator
public Iterator<Element> elementIterator(String name)
- Specified by:
elementIterator
in interface Element
elements
public List<Element> elements()
- Specified by:
elements
in interface Element
elements
public List<Element> elements(QName qName)
- Specified by:
elements
in interface Element
elements
public List<Element> elements(String name)
- Specified by:
elements
in interface Element
elementText
public String elementText(QName qName)
- Specified by:
elementText
in interface Element
elementText
public String elementText(String name)
- Specified by:
elementText
in interface Element
elementTextTrim
public String elementTextTrim(QName qName)
- Specified by:
elementTextTrim
in interface Element
elementTextTrim
public String elementTextTrim(String name)
- Specified by:
elementTextTrim
in interface Element
equals
public boolean equals(Object obj)
- Overrides:
equals
in class BranchImpl
formattedString
public String formattedString()
throws IOException
- Specified by:
formattedString
in interface Element
- Specified by:
formattedString
in interface Node
- Overrides:
formattedString
in class NodeImpl
- Throws:
IOException
formattedString
public String formattedString(String indent)
throws IOException
- Specified by:
formattedString
in interface Element
- Specified by:
formattedString
in interface Node
- Overrides:
formattedString
in class NodeImpl
- Throws:
IOException
formattedString
public String formattedString(String indent,
boolean expandEmptyElements)
throws IOException
- Specified by:
formattedString
in interface Element
- Specified by:
formattedString
in interface Node
- Overrides:
formattedString
in class NodeImpl
- Throws:
IOException
getData
public Object getData()
- Specified by:
getData
in interface Element
getNamespace
public Namespace getNamespace()
- Specified by:
getNamespace
in interface Element
getNamespaceForPrefix
public Namespace getNamespaceForPrefix(String prefix)
- Specified by:
getNamespaceForPrefix
in interface Element
getNamespaceForURI
public Namespace getNamespaceForURI(String uri)
- Specified by:
getNamespaceForURI
in interface Element
getNamespacePrefix
public String getNamespacePrefix()
- Specified by:
getNamespacePrefix
in interface Element
getNamespacesForURI
public List<Namespace> getNamespacesForURI(String uri)
- Specified by:
getNamespacesForURI
in interface Element
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI
in interface Element
getQName
public QName getQName()
- Specified by:
getQName
in interface Element
getQName
public QName getQName(String qualifiedName)
- Specified by:
getQName
in interface Element
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedName
in interface Element
getTextTrim
public String getTextTrim()
- Specified by:
getTextTrim
in interface Element
getWrappedElement
public org.dom4j.Element getWrappedElement()
getXPathResult
public Node getXPathResult(int index)
- Specified by:
getXPathResult
in interface Element
hashCode
public int hashCode()
- Overrides:
hashCode
in class BranchImpl
hasMixedContent
public boolean hasMixedContent()
- Specified by:
hasMixedContent
in interface Element
isRootElement
public boolean isRootElement()
- Specified by:
isRootElement
in interface Element
isTextOnly
public boolean isTextOnly()
- Specified by:
isTextOnly
in interface Element
remove
public boolean remove(Attribute attribute)
- Specified by:
remove
in interface Element
remove
public boolean remove(CDATA cdata)
- Specified by:
remove
in interface Element
remove
public boolean remove(Entity entity)
- Specified by:
remove
in interface Element
remove
public boolean remove(Namespace namespace)
- Specified by:
remove
in interface Element
remove
public boolean remove(Text text)
- Specified by:
remove
in interface Element
setAttributes
public void setAttributes(List<Attribute> attributes)
- Specified by:
setAttributes
in interface Element
setData
public void setData(Object data)
- Specified by:
setData
in interface Element
setQName
public void setQName(QName qName)
- Specified by:
setQName
in interface Element
sortAttributes
public void sortAttributes(boolean recursive)
- Specified by:
sortAttributes
in interface Element
sortElementsByAttribute
public void sortElementsByAttribute(String elementName,
String attributeName)
- Specified by:
sortElementsByAttribute
in interface Element
sortElementsByChildElement
public void sortElementsByChildElement(String elementName,
String childElementName)
- Specified by:
sortElementsByChildElement
in interface Element
toString
public String toString()
- Overrides:
toString
in class BranchImpl