net.shibboleth.metadata.dom
Class DomElementItem

java.lang.Object
  extended by net.shibboleth.metadata.AbstractItem<Element>
      extended by net.shibboleth.metadata.dom.DomElementItem
All Implemented Interfaces:
Serializable, Item<Element>

@ThreadSafe
public class DomElementItem
extends AbstractItem<Element>

A 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.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Serial version UID.
 
Constructor Summary
DomElementItem(Document document)
          Constructor.
DomElementItem(Element element)
          Constructor.
 
Method Summary
 Item<Element> copy()
          Performs a copy of this Item.
 
Methods inherited from class net.shibboleth.metadata.AbstractItem
getItemMetadata, setData, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version UID.

See Also:
Constant Field Values
Constructor Detail

DomElementItem

public DomElementItem(Document document)
Constructor. The document element of the given document becomes the Element value for this item.

Parameters:
document - document whose document element becomes the value for this Item; may not be null and must have a document element

DomElementItem

public DomElementItem(Element element)
Constructor. A new 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.

Parameters:
element - element that is copied to become the value of this Item
Method Detail

copy

public Item<Element> copy()
Performs a copy of this Item. All member fields, except ItemMetadata, should be deep cloned. ItemMetadata objects must be shared between the clone and the original.

Returns:
the clone of this element


Copyright © 2009-2011. All Rights Reserved.