drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/client/AbstractResourceHandle.java
protected URLTable extractPropStats(MultiStatus multiStatus) throws IOException, MalformedElementException {
        // Construct a URLTable to return to the user.
        URLTable reply = new URLTable();

        // For each response (resource).
        Enumeration responses = multiStatus.getResponses();
        while (responses.hasMoreElements()) {
            ResponseBody responseBody = (ResponseBody) responses.nextElement();
            String href = responseBody.getHref();

            // The href may be relative to the request URL.
            URL resourceURL = new URL(new URL(locator.getResourceURL()), href);
            Hashtable properties = new Hashtable();
            reply.put(resourceURL, properties);

            // For each property status grouping.
            Enumeration propstats = responseBody.getPropStats();
            while (propstats.hasMoreElements()) {
                PropStat propstat = (PropStat) propstats.nextElement();
                org.eclipse.webdav.dom.Status status = new org.eclipse.webdav.dom.Status(propstat.getStatus());

                // For each property with this status.
                Enumeration elements = propstat.getProp().getProperties();
                while (elements.hasMoreElements()) {
                    Element element = (Element) elements.nextElement();
                    QualifiedName name = ElementEditor.getQualifiedName(element);
                    // Add a property status object to the result set.
                    PropertyStatus propertyStatus = new PropertyStatus(element, status.getStatusCode(), status.getStatusMessage());
                    properties.put(name, propertyStatus);
                } // end-while
            } // end-while
        } // end-while

        return reply;
    }
protected URLTable extractPropStats(MultiStatus multiStatus) throws IOException, MalformedElementException {
        // Construct a URLTable to return to the user.
        URLTable reply = new URLTable();

        // For each response (resource).
        Enumeration responses = multiStatus.getResponses();
        while (responses.hasMoreElements()) {
            ResponseBody responseBody = (ResponseBody) responses.nextElement();
            String href = responseBody.getHref();

            // The href may be relative to the request URL.
            URL resourceURL = new URL(new URL(locator.getResourceURL()), href);
            Hashtable properties = new Hashtable();
            reply.put(resourceURL, properties);

            // For each property status grouping.
            Enumeration propstats = responseBody.getPropStats();
            while (propstats.hasMoreElements()) {
                PropStat propstat = (PropStat) propstats.nextElement();
                org.eclipse.webdav.dom.Status status = new org.eclipse.webdav.dom.Status(propstat.getStatus());

                // For each property with this status.
                Enumeration elements = propstat.getProp().getProperties();
                while (elements.hasMoreElements()) {
                    Element element = (Element) elements.nextElement();
                    QualifiedName name = ElementEditor.getQualifiedName(element);
                    // Add a property status object to the result set.
                    PropertyStatus propertyStatus = new PropertyStatus(element, status.getStatusCode(), status.getStatusMessage());
                    properties.put(name, propertyStatus);
                } // end-while
            } // end-while
        } // end-while

        return reply;
    }
protected URLTable extractPropStats ( MultiStatus multiStatus ) throws IOException , MalformedElementException { // Construct a URLTable to return to the user. URLTable reply = new URLTable ( ) ; // For each response (resource). Enumeration responses = multiStatus . getResponses ( ) ; while ( responses . hasMoreElements ( ) ) { ResponseBody responseBody = ( ResponseBody ) responses . nextElement ( ) ; String href = responseBody . getHref ( ) ; // The href may be relative to the request URL. URL resourceURL = new URL ( new URL ( locator . getResourceURL ( ) ) , href ) ; Hashtable properties = new Hashtable ( ) ; reply . put ( resourceURL , properties ) ; // For each property status grouping. Enumeration propstats = responseBody . getPropStats ( ) ; while ( propstats . hasMoreElements ( ) ) { PropStat propstat = ( PropStat ) propstats . nextElement ( ) ; org . eclipse . webdav . dom . Status status = new org . eclipse . webdav . dom . Status ( propstat . getStatus ( ) ) ; // For each property with this status. Enumeration elements = propstat . getProp ( ) . getProperties ( ) ; while ( elements . hasMoreElements ( ) ) { Element element = ( Element ) elements . nextElement ( ) ; QualifiedName name = ElementEditor . getQualifiedName ( element ) ; // Add a property status object to the result set. PropertyStatus propertyStatus = new PropertyStatus ( element , status . getStatusCode ( ) , status . getStatusMessage ( ) ) ; properties . put ( name , propertyStatus ) ; } // end-while } // end-while } // end-while return reply ; }
Helper method to extract the property status response from
a multi status reponse, and populate a URLTable with the
results.

@param multiStatus an editor on the response from the server.
@return all the property status in a <code>URLTable</code>.
@throws IOException if there is a problem parsing the resource URLs.
@throws MalformedElementException if the XML is badly formed.
Helper method to extract the property status response from a multi status reponse and populate a URLTable with the results .