org.eclipse.webdav.dom
Class PropFind

java.lang.Object
  extended by org.eclipse.webdav.dom.ElementEditor
      extended by org.eclipse.webdav.dom.PropFind

public class PropFind
extends ElementEditor

An element editor for the WebDAV propfind element. See RFC2518 section 12.14 for the element's definition.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

See Also:
Prop

Field Summary
protected static String[] childNames
          An ordered collection of the element names of the propfind element's children.
 
Fields inherited from class org.eclipse.webdav.dom.ElementEditor
DAV_NS, root, XML_NS_NAME, XML_NS_PREFIX, XML_PREFIX
 
Constructor Summary
PropFind(Element root)
          Creates a new editor on the given WebDAV propfind element.
 
Method Summary
static PropFind create(Document document)
          Creates a new WebDAV propfind element and sets it as the root of the given document.
 Prop getProp()
          Returns this propfind's prop.
 boolean isAllProp()
          Returns true iff this propfind is in the "all prop" form.
 boolean isProp()
          Returns true iff this propfind is in the "prop" form.
 boolean isPropName()
          Returns true iff this propfind is in the "prop name" form.
 void setIsAllProp(boolean isAllProp)
          Sets whether this propfind is in the "all prop" form.
 void setIsPropName(boolean isPropName)
          Sets whether this propfind is in the "prop name" form.
 Prop setProp()
          Creates and sets a new prop on this propfind and returns an editor on it.
 
Methods inherited from class org.eclipse.webdav.dom.ElementEditor
addChild, addChild, addChild, appendChild, appendChild, cloneNode, create, declareNS, decodeHref, encodeHref, ensure, ensure, ensureDAVElement, ensureDAVElement, ensureNotNull, ensureNull, ensureText, extractElement, extractNode, getChild, getChildElement, getChildText, getDAVChild, getElement, getFirstChild, getFirstChild, getFirstText, getLastChild, getNamespaces, getNamespaces, getNextSibling, getNextSibling, getNextSibling, getNSLocalName, getNSLocalName, getNSName, getNSPrefix, getNSPrefix, getQualifiedName, getSibling, getText, getTwin, hasChild, insertBefore, insertBefore, isDAVElement, isDAVElement, isElement, isText, makeNSStandalone, reduceNS, reduceNS, resolve, setChild, setChild, setChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

childNames

protected static final String[] childNames
An ordered collection of the element names of the propfind element's children.

Constructor Detail

PropFind

public PropFind(Element root)
         throws MalformedElementException
Creates a new editor on the given WebDAV propfind element. The element is assumed to be well formed.

Parameters:
root - a propfind element
Throws:
MalformedElementException - if there is reason to believe that the element is not well formed
Method Detail

create

public static PropFind create(Document document)
Creates a new WebDAV propfind element and sets it as the root of the given document. Returns an editor on the new propfind element. The document must not be null, and must not already have a root element.

Parameters:
document - the document that will become the root of a new propfind element
Returns:
an element editor on a propfind element

getProp

public Prop getProp()
             throws MalformedElementException
Returns this propfind's prop.

Returns:
this propfind's prop
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed, or if this propfind is not in the "prop" form

isAllProp

public boolean isAllProp()
                  throws MalformedElementException
Returns true iff this propfind is in the "all prop" form.

Returns:
a boolean indicating whether this propfind is in the "all prop" form
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

isProp

public boolean isProp()
               throws MalformedElementException
Returns true iff this propfind is in the "prop" form.

Returns:
a boolean indicating whether this propfind is in the "prop" form
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

isPropName

public boolean isPropName()
                   throws MalformedElementException
Returns true iff this propfind is in the "prop name" form.

Returns:
a boolean indicating whether this propfind is in the "propname" form
Throws:
MalformedElementException - if there is reason to believe that this editor's underlying element is not well formed

setIsAllProp

public void setIsAllProp(boolean isAllProp)
Sets whether this propfind is in the "all prop" form.

Parameters:
isAllProp - boolean indicating whether this propfind will be in the "all prop" form

setIsPropName

public void setIsPropName(boolean isPropName)
Sets whether this propfind is in the "prop name" form.

Parameters:
isPropName - boolean indicating whether this propfind will be in the "prop name" form

setProp

public Prop setProp()
Creates and sets a new prop on this propfind and returns an editor on it. This propfind must not already be in the "all prop" or "prop name" form.

Returns:
an editor on a new prop element


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.