@ThreadSafe public class DOMElementItem extends AbstractItem<Element>
Item
whose data is a DOM, version 3, Element
.
The Element
wrapped by this Item
is always the document element of the document that owns the
Element
.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serial version UID.
|
Constructor and Description |
---|
DOMElementItem(Document document)
Constructor.
|
DOMElementItem(Element element)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Item<Element> |
copy()
Performs a copy of this Item.
|
getItemMetadata, setData, unwrap
private static final long serialVersionUID
public DOMElementItem(@Nonnull Document document)
Element
value for this item.document
- document whose document element becomes the value for this Item; may not be null and must have a
document elementpublic DOMElementItem(@Nonnull Element element)
Document
is created and the given Element
is deep-imported in to the new
document via Document.importNode(org.w3c.dom.Node, boolean)
, and the resultant Element
is set as
the new document's root.element
- element that is copied to become the value of this Itempublic Item<Element> copy()
ItemMetadata
, should be deep cloned.
ItemMetadata
objects must be shared between the clone and the original.Copyright © 1999–2016. All rights reserved.