org.apache.jackrabbit.webdav.bind
Class ParentElement

java.lang.Object
  extended by org.apache.jackrabbit.webdav.bind.ParentElement
All Implemented Interfaces:
XmlSerializable

public class ParentElement
extends Object
implements XmlSerializable

ParentElement wraps en element of the parent set of a resource. A java.util.Set of ParentElement objects may serve as the value object of the ParentSet DavProperty.


Constructor Summary
ParentElement(String href, String segment)
           
 
Method Summary
static ParentElement createFromXml(Element root)
          Build an ParentElement object from an XML element DAV:parent
 String getHref()
           
 String getSegment()
           
 Element toXml(Document document)
          Returns the xml representation of the implementing object as Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParentElement

public ParentElement(String href,
                     String segment)
Method Detail

getHref

public String getHref()

getSegment

public String getSegment()

createFromXml

public static ParentElement createFromXml(Element root)
                                   throws DavException
Build an ParentElement object from an XML element DAV:parent

Parameters:
root - the DAV:parent element
Returns:
a ParentElement object
Throws:
DavException - if the DAV:parent element is malformed

toXml

public Element toXml(Document document)
Description copied from interface: XmlSerializable
Returns the xml representation of the implementing object as Element. The given Document is used as factory and represents the owner document of the returned DOM element.

Specified by:
toXml in interface XmlSerializable
Parameters:
document - to be used as factory.
Returns:
a w3c element representing this object
See Also:
XmlSerializable.toXml(org.w3c.dom.Document)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.