Top Description Fields Constructors Methods
org.hibernate.tuple

public Class ElementWrapper

extends Object
implements Element, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.dom4j.Element, org.dom4j.Branch, org.dom4j.Node, java.lang.Cloneable
Imports
java.io.IOException, .Serializable, .Writer, java.util.Iterator, .List, .Map, org.dom4j.Attribute, .Branch, .CDATA, .Comment, .Document, .Element, .Entity, .InvalidXPathException, .Namespace, .Node, .ProcessingInstruction, .QName, .Text, .Visitor, .XPath

Wraps dom4j elements, allowing them to exist in a non-hierarchical structure.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private Element
private Element

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
accept(Visitor
is the visitor in the Visitor Pattern
visitor
)

Implements org.dom4j.Node.accept.

accept is the method used in the Visitor Pattern.

public void
add(Attribute
is the attribute to be added
attribute
)

Implements org.dom4j.Element.add.

Adds the given Attribute to this element.
public void
add(CDATA
is the CDATA to be added
cdata
)

Implements org.dom4j.Element.add.

Adds the given CDATA to this element.
public void
add(Entity
is the entity to be added
entity
)

Implements org.dom4j.Element.add.

Adds the given Entity to this element.
public void
add(Text
is the text to be added
text
)

Implements org.dom4j.Element.add.

Adds the given Text to this element.
public void
add(Namespace
is the namespace to be added
namespace
)

Implements org.dom4j.Element.add.

Adds the given Namespace to this element.
public void
add(Node
is the given node to add
node
)

Implements org.dom4j.Branch.add.

Adds the given Node or throws IllegalAddException if the given node is not of a valid type.
public void
add(Comment
is the comment to be added
comment
)

Implements org.dom4j.Branch.add.

Adds the given Comment to this branch.
public void
add(Element
is the element to be added
element
)

Implements org.dom4j.Branch.add.

Adds the given Element to this branch.
public void
add(ProcessingInstruction
is the processing instruction to be added
processingInstruction
)

Implements org.dom4j.Branch.add.

Adds the given ProcessingInstruction to this branch.
public Element
addAttribute(String
is the name of the attribute whose value is to be added or updated
attrName
,
String
is the attribute's value
text
)

Implements org.dom4j.Element.addAttribute.

Adds the attribute value of the given local name.
public Element
addAttribute(QName
is the fully qualified name of the attribute whose value is to be added or updated
attrName
,
String
is the attribute's value
text
)

Implements org.dom4j.Element.addAttribute.

Adds the attribute value of the given fully qualified name.
public Element
addCDATA(String
is the text for the CDATA node.
text
)

Implements org.dom4j.Element.addCDATA.

Adds a new CDATA node with the given text to this element.
public Element
addComment(String
is the text for the Comment node.
text
)

Implements org.dom4j.Element.addComment.

Adds a new Comment node with the given text to this element.
public Element
addElement(String
is the name for the Element node.
name
)

Implements org.dom4j.Branch.addElement.

Adds a new Element node with the given name to this branch and returns a reference to the new node.
public Element
addElement(QName
is the qualified name for the Element node.
qName
)

Implements org.dom4j.Branch.addElement.

Adds a new Element node with the given QNameto this branch and returns a reference to the new node.
public Element
addElement(String
is the fully qualified name of the Element
name
,
String
is the URI of the namespace to use
text
)

Implements org.dom4j.Branch.addElement.

Adds a new Element node with the given qualified name and namespace URI to this branch and returns a reference to the new node.
public Element
addEntity(String
is the name for the Entity node.
name
,
String
is the text for the Entity node.
text
)

Implements org.dom4j.Element.addEntity.

Adds a new Entity node with the given name and text to this element and returns a reference to the new node.
public List<E>
additionalNamespaces()

Implements org.dom4j.Element.additionalNamespaces.

Returns any additional namespaces declarations for this element other than namespace returned via the getNamespace()method.
public Element
addNamespace(String
is the prefix to use, which should not be null or blank
prefix
,
String
is the namespace URI
uri
)

Implements org.dom4j.Element.addNamespace.

Adds a namespace to this element for use by its child content
public Element
addProcessingInstruction(String
is the target of the processing instruction
target
,
String
is the textual data (key/value pairs) of the processing instruction
text
)

Implements org.dom4j.Element.addProcessingInstruction.

Adds a processing instruction for the given target
public Element
addProcessingInstruction(String
is the target of the processing instruction
target
,
Map<K, V>
is a Map of the key / value pairs of the processing instruction
data
)

Implements org.dom4j.Element.addProcessingInstruction.

Adds a processing instruction for the given target
public Element
addText(String
is the text for the Text node.
text
)

Implements org.dom4j.Element.addText.

Adds a new Text node with the given text to this element.
public void
appendAttributes(Element
is the element whose attributes will be added to me.
element
)

Implements org.dom4j.Element.appendAttributes.

Appends the attributes of the given element to me.
public void
appendContent(Branch
is the branch whose content will be added to me.
branch
)

Implements org.dom4j.Branch.appendContent.

Appends the content of the given branch to this branch instance.
public String
asXML()

Implements org.dom4j.Node.asXML.

asXML returns the textual XML representation of this node.

public Node
asXPathResult(Element
DOCUMENT ME!
element
)

Implements org.dom4j.Node.asXPathResult.

asXPathResult returns a version of this node which is capable of being an XPath result.

public Attribute
attribute(int
DOCUMENT ME!
i
)

Implements org.dom4j.Element.attribute.

Returns the attribute at the specified indexGets the
public Attribute
attribute(String
DOCUMENT ME!
name
)

Implements org.dom4j.Element.attribute.

Returns the attribute with the given name
public Attribute
attribute(QName
is the fully qualified name
qName
)

Implements org.dom4j.Element.attribute.

DOCUMENT ME!
public int
public Iterator<E>
public List<E>
attributes()

Implements org.dom4j.Element.attributes.

Returns the Attributeinstances this element contains as a backed Listso that the attributes may be modified directly using the Listinterface.
public String
attributeValue(String
is the name of the attribute value to be returned
name
)

Implements org.dom4j.Element.attributeValue.

This returns the attribute value for the attribute with the given name and any namespace or null if there is no such attribute or the empty string if the attribute value is empty.
public String
attributeValue(String
is the name of the attribute value to be returned
name
,
String
is the default value to be returned if the attribute has no value defined.
defaultValue
)

Implements org.dom4j.Element.attributeValue.

This returns the attribute value for the attribute with the given name and any namespace or the default value if there is no such attribute value.
public String
attributeValue(QName
is the fully qualified name
qName
)

Implements org.dom4j.Element.attributeValue.

This returns the attribute value for the attribute with the given fully qualified name or null if there is no such attribute or the empty string if the attribute value is empty.
public String
attributeValue(QName
is the fully qualified name
qName
,
String
is the default value to be returned if the attribute has no value defined.
defaultValue
)

Implements org.dom4j.Element.attributeValue.

This returns the attribute value for the attribute with the given fully qualified name or the default value if there is no such attribute value.
public void
clearContent()

Implements org.dom4j.Branch.clearContent.

Clears the content for this branch, removing any Node instances this branch may contain.
public Object
clone()

Overrides java.lang.Object.clone.

Implements org.dom4j.Node.clone.

clone will return a deep clone or if this node is read-only then clone will return the same instance.

public List<E>
content()

Implements org.dom4j.Branch.content.

Returns the content nodes of this branch as a backed Listso that the content of this branch may be modified directly using the Listinterface.
public Element
createCopy()

Implements org.dom4j.Element.createCopy.

Creates a deep copy of this element The new element is detached from its parent, and getParent() on the clone will return null.
public Element
createCopy(String
DOCUMENT ME!
name
)

Implements org.dom4j.Element.createCopy.

Creates a deep copy of this element with the given local name The new element is detached from its parent, and getParent() on the clone will return null.
public Element
createCopy(QName
DOCUMENT ME!
qName
)

Implements org.dom4j.Element.createCopy.

Creates a deep copy of this element with the given fully qualified name.
public XPath
createXPath(String
is the XPath expression to be evaluated
xpath
)

Implements org.dom4j.Node.createXPath.

createXPath creates an XPath object for the given xpathExpression.

public List<E>
declaredNamespaces()

Implements org.dom4j.Element.declaredNamespaces.

Returns all the namespaces declared by this element.
public Node
detach()

Implements org.dom4j.Node.detach.

Removes this node from its parent if there is one.

public Element
element(String
DOCUMENT ME!
name
)

Implements org.dom4j.Element.element.

Returns the first element for the given local name and any namespace.
public Element
element(QName
is the fully qualified name to search for
qName
)

Implements org.dom4j.Element.element.

Returns the first element for the given fully qualified name.
public Element
elementByID(String
DOCUMENT ME!
id
)

Implements org.dom4j.Branch.elementByID.

Returns the element of the given ID attribute value.
public Iterator<E>
elementIterator()

Implements org.dom4j.Element.elementIterator.

Returns an iterator over all this elements child elements.
public Iterator<E>
elementIterator(String
DOCUMENT ME!
name
)

Implements org.dom4j.Element.elementIterator.

Returns an iterator over the elements contained in this element which match the given local name and any namespace.
public Iterator<E>
elementIterator(QName
is the fully qualified name to search for
qName
)

Implements org.dom4j.Element.elementIterator.

Returns an iterator over the elements contained in this element which match the given fully qualified name.
public List<E>
elements()

Implements org.dom4j.Element.elements.

Returns the elements contained in this element.
public List<E>
elements(String
DOCUMENT ME!
name
)

Implements org.dom4j.Element.elements.

Returns the elements contained in this element with the given local name and any namespace.
public List<E>
elements(QName
is the fully qualified name to search for
qName
)

Implements org.dom4j.Element.elements.

Returns the elements contained in this element with the given fully qualified name.
public String
public String
public String
public String
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public Object
getData()

Implements org.dom4j.Element.getData.

Accesses the data of this element which may implement data typing bindings such as XML Schema or Java Bean bindings or will return the same value as getText
public Document
getDocument()

Implements org.dom4j.Node.getDocument.

getDocument returns the Document that this Node is part of if this node supports the parent relationship.

public Element
public String
getName()

Implements org.dom4j.Node.getName.

getName returns the name of this node.

public Namespace
getNamespace()

Implements org.dom4j.Element.getNamespace.

Returns the Namespace of this element if one exists otherwise Namespace.NO_NAMESPACE is returned.
public Namespace
getNamespaceForPrefix(String
DOCUMENT ME!
s
)

Implements org.dom4j.Element.getNamespaceForPrefix.

Returns the Namespace which is mapped to the given prefix or null if it could not be found.
public Namespace
getNamespaceForURI(String
DOCUMENT ME!
s
)

Implements org.dom4j.Element.getNamespaceForURI.

Returns the Namespace which is mapped to the given URI or null if it could not be found.
public String
getNamespacePrefix()

Implements org.dom4j.Element.getNamespacePrefix.

Returns the namespace prefix of this element if one exists otherwise an empty String is returned.
public List<E>
getNamespacesForURI(String
DOCUMENT ME!
s
)

Implements org.dom4j.Element.getNamespacesForURI.

Returns the all namespaces which are mapped to the given URI or an empty list if no such namespaces could be found.
public String
getNamespaceURI()

Implements org.dom4j.Element.getNamespaceURI.

Returns the URI mapped to the namespace of this element if one exists otherwise an empty String is returned.
public short
getNodeType()

Implements org.dom4j.Node.getNodeType.

Returns the code according to the type of node.
public String
public Element
getParent()

Implements org.dom4j.Node.getParent.

getParent returns the parent Element if this node supports the parent relationship or null if it is the root element or does not support the parent relationship.

public String
getPath()

Implements org.dom4j.Node.getPath.

Returns the XPath expression which will return a node set containing the given node such as /a/b/@c.

public String
getPath(Element
is the parent context from which the relative path should start. If the context is null or the context is not an ancestor of this node then the path will be absolute and start from the document and so begin with the '/' character.
element
)

Implements org.dom4j.Node.getPath.

Returns the relative XPath expression which will return a node set containing the given node such as a/b/@c.
public QName
getQName()

Implements org.dom4j.Element.getQName.

Returns the QName of this element which represents the local name, the qualified name and the Namespace.
public QName
getQName(String
DOCUMENT ME!
s
)

Implements org.dom4j.Element.getQName.

Returns the QName for the given qualified name, using the namespace URI in scope for the given prefix of the qualified name or the default namespace if the qualified name has no prefix.
public String
getQualifiedName()

Implements org.dom4j.Element.getQualifiedName.

Returns the fully qualified name of this element.
public String
getStringValue()

Implements org.dom4j.Element.getStringValue.

Returns the XPath string-value of this node.
public String
getText()

Implements org.dom4j.Element.getText.

Returns the text value of this element without recursing through child elements.
public String
getTextTrim()

Implements org.dom4j.Element.getTextTrim.

DOCUMENT ME!
public String
getUniquePath()

Implements org.dom4j.Node.getUniquePath.

Returns the XPath expression which will return a nodeset of one node which is the current node.

public String
getUniquePath(Element
is the parent context from which the path should start. If the context is null or the context is not an ancestor of this node then the path will start from the document and so begin with the '/' character.
element
)

Implements org.dom4j.Node.getUniquePath.

Returns the relative unique XPath expression from the given context which will return a nodeset of one node which is the current node.

public Node
getXPathResult(int
DOCUMENT ME!
i
)

Implements org.dom4j.Element.getXPathResult.

Returns a node at the given index suitable for an XPath result set.
public boolean
hasContent()

Implements org.dom4j.Node.hasContent.

hasContent returns true if this node is a Branch (either an Element or a Document) and it contains at least one content node such as a child Element or Text node.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean
hasMixedContent()

Implements org.dom4j.Element.hasMixedContent.

Returns true if this Element has mixed content.
public int
indexOf(Node
the content child node to find.
node
)

Implements org.dom4j.Branch.indexOf.

Returns the index of the given node if it is a child node of this branch or -1 if the given node is not a child node.
public boolean
isReadOnly()

Implements org.dom4j.Node.isReadOnly.

isReadOnly returns true if this node is read only and cannot be modified.

public boolean
public boolean
isTextOnly()

Implements org.dom4j.Element.isTextOnly.

Returns true if this Element has text only content.
public boolean
matches(String
is an XPath expression
xpath
)

Implements org.dom4j.Node.matches.

matches returns true if evaluating the given XPath expression on this node returns a non-empty node set containing this node.

public Node
node(int
the index of the node to return.
i
)

Implements org.dom4j.Branch.node.

Returns the Node at the specified index position.
public int
nodeCount()

Implements org.dom4j.Branch.nodeCount.

Returns the number of Node instances that this branch contains.
public Iterator<E>
nodeIterator()

Implements org.dom4j.Branch.nodeIterator.

Returns an iterator through the content nodes of this branch
public void
normalize()

Implements org.dom4j.Branch.normalize.

Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
public Number
numberValueOf(String
is the XPath expression to be evaluated
xpath
)

Implements org.dom4j.Node.numberValueOf.

numberValueOf evaluates an XPath expression and returns the numeric value of the XPath expression if the XPath expression results in a number, or null if the result is not a number.

public ProcessingInstruction
processingInstruction(String
DOCUMENT ME!
name
)

Implements org.dom4j.Branch.processingInstruction.

DOCUMENT ME!
public List<E>
processingInstructions()

Implements org.dom4j.Branch.processingInstructions.

Returns a list of all the processing instructions in this branch.
public List<E>
processingInstructions(String
DOCUMENT ME!
name
)

Implements org.dom4j.Branch.processingInstructions.

Returns a list of the processing instructions for the given target.
public boolean
remove(Attribute
is the attribute to be removed
attribute
)

Implements org.dom4j.Element.remove.

Removes the given Attribute from this element.
public boolean
remove(CDATA
is the CDATA to be removed
cdata
)

Implements org.dom4j.Element.remove.

Removes the given CDATA if the node is an immediate child of this element.
public boolean
remove(Entity
is the entity to be removed
entity
)

Implements org.dom4j.Element.remove.

Removes the given Entity if the node is an immediate child of this element.
public boolean
remove(Namespace
is the namespace to be removed
namespace
)

Implements org.dom4j.Element.remove.

Removes the given Namespace if the node is an immediate child of this element.
public boolean
remove(Text
is the text to be removed
text
)

Implements org.dom4j.Element.remove.

Removes the given Text if the node is an immediate child of this element.
public boolean
remove(Node
is the given node to be removed
node
)

Implements org.dom4j.Branch.remove.

Removes the given Node if the node is an immediate child of this branch.
public boolean
remove(Comment
is the comment to be removed
comment
)

Implements org.dom4j.Branch.remove.

Removes the given Comment if the node is an immediate child of this branch.
public boolean
remove(Element
is the element to be removed
element
)

Implements org.dom4j.Branch.remove.

Removes the given Element if the node is an immediate child of this branch.
public boolean
remove(ProcessingInstruction
is the processing instruction to be removed
processingInstruction
)

Implements org.dom4j.Branch.remove.

Removes the given ProcessingInstruction if the node is an immediate child of this branch.
public boolean
removeProcessingInstruction(String
DOCUMENT ME!
name
)

Implements org.dom4j.Branch.removeProcessingInstruction.

Removes the processing instruction for the given target if it exists
public List<E>
selectNodes(String
is the XPath expression to be evaluated
xpath
)

Implements org.dom4j.Node.selectNodes.

selectNodes evaluates an XPath expression and returns the result as a List of Node instances or String instances depending on the XPath expression.

public List<E>
selectNodes(String
is the XPath expression to be evaluated
xpath
,
String
is the XPath expression used to compare the results by for sorting
comparison
)

Implements org.dom4j.Node.selectNodes.

selectNodes evaluates an XPath expression then sorts the results using a secondary XPath expression Returns a sorted List of Node instances.

public List<E>
selectNodes(String
is the XPath expression to be evaluated
xpath
,
String
is the XPath expression used to compare the results by for sorting
comparison
,
boolean
if this parameter is true then duplicate values (using the comparisonXPathExpression) are removed from the result List.
removeDups
)

Implements org.dom4j.Node.selectNodes.

selectNodes evaluates an XPath expression then sorts the results using a secondary XPath expression Returns a sorted List of Node instances.

public Object
selectObject(String
is the XPath expression to be evaluated
xpath
)

Implements org.dom4j.Node.selectObject.

selectObject evaluates an XPath expression and returns the result as an Object.

public Node
selectSingleNode(String
is the XPath expression to be evaluated
xpath
)

Implements org.dom4j.Node.selectSingleNode.

selectSingleNode evaluates an XPath expression and returns the result as a single Node instance.

public void
setAttributes(List<E>
DOCUMENT ME!
list
)

Implements org.dom4j.Element.setAttributes.

Sets the attributes that this element contains
public void
setAttributeValue(String
is the name of the attribute whose value is to be added or updated
name
,
String
is the attribute's value
value
)

Implements org.dom4j.Element.setAttributeValue.

Deprecated
Sets the attribute value of the given local name.
public void
setAttributeValue(QName
is the fully qualified name of the attribute whose value is to be added or updated
qName
,
String
is the attribute's value
value
)

Implements org.dom4j.Element.setAttributeValue.

Deprecated
Sets the attribute value of the given fully qualified name.
public void
setContent(List<E>
is the list of nodes to use as the content for this branch.
list
)

Implements org.dom4j.Branch.setContent.

Sets the contents of this branch as a List of Node instances.
public void
setData(Object
DOCUMENT ME!
data
)

Implements org.dom4j.Element.setData.

Sets the data value of this element if this element supports data binding or calls setTextif it doesn't
public void
setDocument(Document
is the new document of this node.
document
)

Implements org.dom4j.Node.setDocument.

setDocument sets the document of this node if the parent relationship is supported or does nothing if the parent relationship is not supported.

public void
setName(String
is the new name of this node
name
)

Implements org.dom4j.Node.setName.

Sets the text data of this node or this method will throw an UnsupportedOperationException if it is read-only.

public void
setParent(Element
is the new parent of this node.
parent
)

Implements org.dom4j.Node.setParent.

setParent sets the parent relationship of this node if the parent relationship is supported or does nothing if the parent relationship is not supported.

public void
setProcessingInstructions(List<E>
DOCUMENT ME!
list
)

Implements org.dom4j.Branch.setProcessingInstructions.

Sets all the processing instructions for this branch
public void
setQName(QName
is the QName to be associated with this element
qName
)

Implements org.dom4j.Element.setQName.

Sets the QName of this element which represents the local name, the qualified name and the Namespace.
public void
setText(String
is the new textual value of this node
text
)

Implements org.dom4j.Node.setText.

Sets the text data of this node or this method will throw an UnsupportedOperationException if it is read-only.

public boolean
supportsParent()

Implements org.dom4j.Node.supportsParent.

supportsParent returns true if this node supports the parent relationship.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public String
valueOf(String
is the XPath expression to be evaluated
xpath
)

Implements org.dom4j.Node.valueOf.

valueOf evaluates an XPath expression and returns the textual representation of the results the XPath string-value of this node.

public void
write(Writer
is the Writer to output the XML to
writer
)

Implements org.dom4j.Node.write.

write writes this node as the default XML notation for this node.

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait