Class DavResource

java.lang.Object
com.github.sardine.DavResource

public class DavResource extends Object
Describes a resource on a remote server. This could be a directory or an actual file.
  • Field Details

  • Constructor Details

  • Method Details

    • getStatusCode

      public int getStatusCode()
      Returns:
      Status code (or 200 if not present, or -1 if malformed)
    • getCreation

      public Date getCreation()
      Returns:
      Timestamp
    • getModified

      public Date getModified()
      Returns:
      Timestamp
    • getContentType

      public String getContentType()
      Returns:
      MIME Type
    • getContentLength

      public Long getContentLength()
      Returns:
      Size
    • getEtag

      public String getEtag()
      Returns:
      Fingerprint
    • getContentLanguage

      public String getContentLanguage()
      Returns:
      Content language
    • getDisplayName

      public String getDisplayName()
      Returns:
      Display name
    • getLockToken

      public String getLockToken()
      Returns:
      Lock Token
    • getResourceTypes

      public List<QName> getResourceTypes()
      Returns:
      Resource types
    • getSupportedReports

      public List<QName> getSupportedReports()
      Returns:
      Resource types
    • isDirectory

      public boolean isDirectory()
      Implementation assumes that every resource with a content type of httpd/unix-directory is a directory.
      Returns:
      True if this resource denotes a directory
    • getCustomProps

      public Map<String,String> getCustomProps()
      Returns:
      Additional metadata. This implementation does not take namespaces into account.
    • getCustomPropsNS

      public Map<QName,String> getCustomPropsNS()
      Returns:
      Additional metadata with namespace informations
    • getHref

      public URI getHref()
      Returns:
      URI of the resource.
    • getName

      public String getName()
      Last path component.
      Returns:
      The name of the resource URI decoded.
      See Also:
    • getPath

      public String getPath()
      Returns:
      Path component of the URI of the resource.
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: