Hello,

This is a patch file for SEARCH method. Soon I'd like to add some code into 
SearchMethod.java to support DASL. :-)

Index: WebdavResource.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v
retrieving revision 1.43
diff -r1.43 WebdavResource.java
3008a3009,3055
>
>     /*
>      * Execute SEARCH method for the given path and query.
>      * Get list of given WebDAV properties on the given resource.
>      *
>      * @param path the path to request for propertis.
>      * @param query the simple query
>      * @return Enumeration list of WebDAV properties on a resource.
>      * @exception HttpException
>      * @exception IOException
>      */
>     public Enumeration searchMethod(String path, String query)
>         throws HttpException, IOException {
>                 setClient();
>         // Default depth=0, type=by_name
>         SearchMethod method =
>             new SearchMethod(HttpURL.getPath(path), query);
>         method.setDebug(debug);
>         client.executeMethod(method);
>                 // It contains the results.
>         Vector results = new Vector();
>                 Enumeration responses = method.getResponses();
>         if (responses.hasMoreElements()) {
>             ResponseEntity response =
>                 (ResponseEntity) responses.nextElement();
>             String href = (String) response.getHref();
>                         // Set status code for this resource.
>             if ((thisResource == true) && (response.getStatusCode() > 0))
>                 setStatusCode(response.getStatusCode());
>             thisResource = false;
>                         Enumeration responseProperties =
>                 method.getResponseProperties(href);
>             while (responseProperties.hasMoreElements()) {
>                 Property property =
>                     (Property) responseProperties.nextElement();
>                 results.addElement(property.getPropertyAsString());
>             }
>         }
>                 return results.elements();
>     }
>

--
Sung Kim




_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to