drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/ResponseBody.java
public PropStat accumulatePropStat(QualifiedName propertyName, String status, String responseDescription) {

        Assert.isNotNull(propertyName);
        Assert.isNotNull(status);

        Element child = getFirstChild(root, new String[] {"href", "status"}); //$NON-NLS-1$ //$NON-NLS-2$
        Assert.isTrue(child == null || isDAVElement(child, "href") //$NON-NLS-1$
                && getNextSibling(child, new String[] {"href", "status"}) == null); //$NON-NLS-1$ //$NON-NLS-2$

        String nsName = propertyName.getQualifier();
        Assert.isTrue(!"".equals(nsName)); //$NON-NLS-1$

        String localName = propertyName.getLocalName();
        Assert.isNotNull(localName);
        Assert.isTrue(!localName.equals("")); //$NON-NLS-1$

        Document document = root.getOwnerDocument();
        Element element = document.createElement(localName);
        declareNS(element, null, nsName);

        try {
            return accumulatePropStat(element, status, responseDescription);
        } catch (MalformedElementException e) {
            Assert.isTrue(false, Policy.bind("assert.internalError")); //$NON-NLS-1$
            return null; // Never reached.
        }
    }
public PropStat accumulatePropStat(QualifiedName propertyName, String status, String responseDescription) {

        Assert.isNotNull(propertyName);
        Assert.isNotNull(status);

        Element child = getFirstChild(root, new String[] {"href", "status"}); //$NON-NLS-1$ //$NON-NLS-2$
        Assert.isTrue(child == null || isDAVElement(child, "href") //$NON-NLS-1$
                && getNextSibling(child, new String[] {"href", "status"}) == null); //$NON-NLS-1$ //$NON-NLS-2$

        String nsName = propertyName.getQualifier();
        Assert.isTrue(!"".equals(nsName)); //$NON-NLS-1$

        String localName = propertyName.getLocalName();
        Assert.isNotNull(localName);
        Assert.isTrue(!localName.equals("")); //$NON-NLS-1$

        Document document = root.getOwnerDocument();
        Element element = document.createElement(localName);
        declareNS(element, null, nsName);

        try {
            return accumulatePropStat(element, status, responseDescription);
        } catch (MalformedElementException e) {
            Assert.isTrue(false, Policy.bind("assert.internalError")); //$NON-NLS-1$
            return null; // Never reached.
        }
    }
public PropStat accumulatePropStat ( QualifiedName propertyName , String status , String responseDescription ) { Assert . isNotNull ( propertyName ) ; Assert . isNotNull ( status ) ; Element child = getFirstChild ( root , new String [ ] { "href" , "status" } ) ; //$NON-NLS-1$ //$NON-NLS-2$ Assert . isTrue ( child == null || isDAVElement ( child , "href" ) //$NON-NLS-1$ && getNextSibling ( child , new String [ ] { "href" , "status" } ) == null ) ; //$NON-NLS-1$ //$NON-NLS-2$ String nsName = propertyName . getQualifier ( ) ; Assert . isTrue ( ! "" . equals ( nsName ) ) ; //$NON-NLS-1$ String localName = propertyName . getLocalName ( ) ; Assert . isNotNull ( localName ) ; Assert . isTrue ( ! localName . equals ( "" ) ) ; //$NON-NLS-1$ Document document = root . getOwnerDocument ( ) ; Element element = document . createElement ( localName ) ; declareNS ( element , null , nsName ) ; try { return accumulatePropStat ( element , status , responseDescription ) ; } catch ( MalformedElementException e ) { Assert . isTrue ( false , Policy . bind ( "assert.internalError" ) ) ; //$NON-NLS-1$ return null ; // Never reached. } }
Gets this response's first propstat with the given status and adds an
element created from the given property name as a property of the
propstat's prop. If such a propstat does not exists, it is created.
The propstat's response description is set to the given response
description, or removed if the response description is
<code>null</code>. Returns the propstat. The property name must not
be <code>null</code> and its qualifier and local part must not be
<code>null</code> and must not be the empty string. The status must
not be <code>null</code>. This response must not already be in the
"status" form.

@param propertyName        the name of the property to create and add
@param status              the status of the propstat to add the
property element to
@param responseDescription the new response description of the
propstat, or <code>null</code> to remove
the old one
@return                    a propstat with the specified property
element, status, and response description
Gets this response s first propstat with the given status and adds an element created from the given property name as a property of the propstat s prop . If such a propstat does not exists it is created . The propstat s response description is set to the given response description or removed if the response description is <code > null< / code > . Returns the propstat . The property name must not be <code > null< / code > and its qualifier and local part must not be <code > null< / code > and must not be the empty string . The status must not be <code > null< / code > . This response must not already be in the status form .