jericho     01/03/06 05:42:28

  Modified:    src/webdav/client/src/org/apache/webdav/util
                        WebdavResource.java
  Log:
  - Change some tabs to spaces.
  - Add some comment for the propfind method.
  
  Revision  Changes    Path
  1.11      +35 -29    
jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java
  
  Index: WebdavResource.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebdavResource.java       2001/03/06 13:27:52     1.10
  +++ WebdavResource.java       2001/03/06 13:42:27     1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java,v
 1.10 2001/03/06 13:27:52 jericho Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/03/06 13:27:52 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/WebdavResource.java,v
 1.11 2001/03/06 13:42:27 jericho Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/03/06 13:42:27 $
    *
    * ====================================================================
    *
  @@ -549,32 +549,32 @@
                   (ResponseEntity) responses.nextElement();
   
               boolean itself = false;
  -                 String httpUrlPath = httpUrl.getPath();
  +            String httpUrlPath = httpUrl.getPath();
               String href = (String) response.getHref();
  -                 String hrefPath = HttpURL.getPath(href);
  -                 int compared = httpUrlPath.compareTo(hrefPath);
  +            String hrefPath = HttpURL.getPath(href);
  +            int compared = httpUrlPath.compareTo(hrefPath);
               // Compare with the href path and requested-path itself.
  -                     if (compared == 0 || compared == -1 && hrefPath.endsWith("/") 
||
  +            if (compared == 0 || compared == -1 && hrefPath.endsWith("/") ||
                   compared == 1 && httpUrlPath.endsWith("/")) {
   
                   if (response.getStatusCode() > 0)
                       setStatusCode(response.getStatusCode());
  -                         exists = true;
  -                         itself = true;
  +                exists = true;
  +                itself = true;
               }
   
               // Table for the href and its properties
               Hashtable hrefProperties = new Hashtable();
  -                     Enumeration properties = response.getProperties();
  -                     while (properties.hasMoreElements()) {
  +            Enumeration properties = response.getProperties();
  +            while (properties.hasMoreElements()) {
   
  -                             Property property = (Property) 
properties.nextElement();
  +                Property property = (Property) properties.nextElement();
   
   
                   // ------------------------------  Checking WebDAV properties
   
                   if (property.getLocalName().equals(DISPLAYNAME)) {
  -                                     String displayName = 
property.getPropertyAsString();
  +                    String displayName = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(DISPLAYNAME, displayName);
                       } else {
  @@ -582,7 +582,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(GETCONTENTLENGTH)) {
  -                                     String getContentLength = 
property.getPropertyAsString();
  +                    String getContentLength = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put
                               (GETCONTENTLENGTH, getContentLength);
  @@ -600,7 +600,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(GETCONTENTTYPE)) {
  -                                     String getContentType = 
property.getPropertyAsString();
  +                    String getContentType = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(GETCONTENTTYPE, getContentType);
                       } else {
  @@ -616,7 +616,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(CREATIONDATE)) {
  -                                     String creationDate = 
property.getPropertyAsString();
  +                    String creationDate = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(CREATIONDATE, creationDate);
                       } else {
  @@ -624,7 +624,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(GETETAG)) {
  -                                     String getEtag = 
property.getPropertyAsString();
  +                    String getEtag = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(GETETAG, getEtag);
                       } else {
  @@ -632,7 +632,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(ISHIDDEN)) {
  -                                     String isHidden = 
property.getPropertyAsString();
  +                    String isHidden = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(ISHIDDEN, isHidden);
                       } else {
  @@ -640,7 +640,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(ISCOLLECTION)) {
  -                                     String isCollection = 
property.getPropertyAsString();
  +                    String isCollection = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(ISCOLLECTION, isCollection);
                       } else {
  @@ -648,7 +648,7 @@
                       }
                   } else
                   if (property.getLocalName().equals(SUPPORTEDLOCK)) {
  -                                     String supportedLock = 
property.getPropertyAsString();
  +                    String supportedLock = property.getPropertyAsString();
                       if (!itself) {
                           hrefProperties.put(SUPPORTEDLOCK, supportedLock);
                       } else {
  @@ -736,12 +736,12 @@
       }
   
   
  -     /**
  -      * Parse the <code>java.util.Date</code> string for HTTP-date.
  -      *
  -      * @return The parsed date.
  -      */
  -     public Date parseDate(String dateValue) {
  +    /**
  +     * Parse the <code>java.util.Date</code> string for HTTP-date.
  +     *
  +     * @return The parsed date.
  +     */
  +    public Date parseDate(String dateValue) {
   
           Date date = null;
           for (int i = 0; (date == null) && (i < formats.length); i++) {
  @@ -752,7 +752,7 @@
           }
   
           return date;
  -     }
  +    }
   
   
       /**
  @@ -984,7 +984,7 @@
                       (String) pairProperties.get(GETCONTENTTYPE);
                   longFormat[2] = resourceTypeProperty.isCollection() ?
                       "COLLECTION" : getContentType ;
  -             String getLastModified =
  +                String getLastModified =
                       (String) pairProperties.get(GETLASTMODIFIED);
                   Date date = parseDate(getLastModified);
                   longFormat[3] =
  @@ -1342,6 +1342,9 @@
        * <p>Once used this method, the the status code in the 207
        * reponse is need to be set for the method of WebdavResource.
        *
  +     * <p>The values of DepthSupport.DEPTH_0, DepthSupport.DEPTH_1,
  +     * DepthSupport.DEPTH_INFINITY is possbile for the depth.
  +     *
        * @param depth
        * @return the response entity body that has pairs of href and properties.
        * @exception WebdavException
  @@ -1361,6 +1364,9 @@
        * <p>Once used this method, the the status code in the 207
        * reponse is need to be set for the method of WebdavResource.
        *
  +     * <p>The values of DepthSupport.DEPTH_0, DepthSupport.DEPTH_1,
  +     * DepthSupport.DEPTH_INFINITY is possbile for the depth.
  +     *
        * @param path the path to request.
        * @param depth
        * @return the response entity body that has pairs of href and properties.
  @@ -1384,7 +1390,7 @@
           // In order to save this session.
           this.client = client;
   
  -     return method.getResponses();
  +        return method.getResponses();
       }
   
   
  
  
  

Reply via email to