org.skunk.dav.client
Class DAVFile

java.lang.Object
  |
  +--org.skunk.dav.client.DAVFile
All Implemented Interfaces:
java.lang.Comparable

public class DAVFile
extends java.lang.Object
implements java.lang.Comparable

a wrapper around the results returned by a DAV propfind or other DAV method. It resembles a beanified ResultSet more than a File object; two DAVFile objects with the same host, port, and path may have quite different contents, depending on the sorts of queries that were used to generate it.


Constructor Summary
DAVFile(java.lang.String path)
           
DAVFile(java.lang.String host, int port, java.lang.String filename)
           
DAVFile(java.lang.String protocol, java.lang.String host, int port, java.lang.String path)
           
 
Method Summary
 void addAvailableProperty(DAVProperty property)
           
 void addChild(DAVFile child)
           
 void addLink(Link l)
           
 void addLock(Lock lock)
           
 void addSupportedLock(Lock shlock)
           
 java.util.Iterator children()
           
 int compareTo(java.lang.Object otherObject)
           
 int compareToDAVFile(DAVFile otherFile)
           
 DAVProperty[] getAvailableProperties()
          N.B.
 DAVFile getChildAt(int index)
           
 int getChildCollectionCount()
           
 int getChildCount()
           
 DAVFile getChildNamed(java.lang.String path)
           
 java.lang.String getContentLanguage()
           
 java.lang.Long getContentLength()
           
 java.lang.String getContentType()
           
 java.lang.String getCreationDate()
           
 java.util.Map getCustomProperties()
           
 java.lang.String getCustomProperty(DAVProperty property)
           
 DAVConnection getDAVConnection()
           
 java.lang.String getDisplayName()
           
 java.lang.String getEtag()
           
 Lock getExclusiveLock()
           
 java.lang.String getExclusiveLockOwner()
           
 java.lang.String getExclusiveLockToken()
           
 java.lang.String getFileName()
           
 java.lang.String getFullName()
           
 java.lang.String getFullNameWithProtocol()
           
 java.lang.String getHost()
           
 java.lang.String getLastModified()
           
 Link[] getLinks()
           
 Lock getLock(java.lang.String owner)
           
 Lock[] getLocks()
           
 java.lang.String getName()
           
 int getPort()
           
 java.lang.String getProtocol()
           
 java.lang.String getResourceType()
           
 java.lang.String getResponseDescription()
           
 java.lang.Integer getStatus()
           
 Lock[] getSupportedLocks()
           
 boolean isCollection()
           
 boolean isExclusiveLocked()
           
 boolean isLocked()
           
 void removeLock(Lock lock)
           
 void setContentLanguage(java.lang.String contentLanguage)
           
 void setContentLength(java.lang.Long contentLength)
           
 void setContentType(java.lang.String contentType)
           
 void setCreationDate(java.lang.String creationDate)
           
 void setCustomProperty(DAVProperty property, java.lang.String propertyValue)
           
 void setDisplayName(java.lang.String displayName)
           
 void setEtag(java.lang.String etag)
           
 void setExclusiveLock(Lock lock)
           
 void setHost(java.lang.String host)
           
 void setLastModified(java.lang.String lastModified)
           
 void setPort(int port)
           
 void setProtocol(java.lang.String protocol)
           
 void setResourceType(java.lang.String resourceType)
           
 void setResponseDescription(java.lang.String responseDescription)
           
 void setStatus(java.lang.Integer status)
           
 java.lang.String toString()
           
 java.lang.String toVerboseString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DAVFile

public DAVFile(java.lang.String path)

DAVFile

public DAVFile(java.lang.String host,
               int port,
               java.lang.String filename)

DAVFile

public DAVFile(java.lang.String protocol,
               java.lang.String host,
               int port,
               java.lang.String path)
Method Detail

getName

public java.lang.String getName()

getFullName

public java.lang.String getFullName()

getFullNameWithProtocol

public java.lang.String getFullNameWithProtocol()

getProtocol

public java.lang.String getProtocol()

setProtocol

public void setProtocol(java.lang.String protocol)

getFileName

public java.lang.String getFileName()

getHost

public java.lang.String getHost()

setHost

public void setHost(java.lang.String host)

getPort

public int getPort()

setPort

public void setPort(int port)

getDAVConnection

public DAVConnection getDAVConnection()

isCollection

public boolean isCollection()

addChild

public void addChild(DAVFile child)

children

public java.util.Iterator children()

getChildCount

public int getChildCount()

getChildCollectionCount

public int getChildCollectionCount()

getChildAt

public DAVFile getChildAt(int index)

getChildNamed

public DAVFile getChildNamed(java.lang.String path)

getResourceType

public java.lang.String getResourceType()

setResourceType

public void setResourceType(java.lang.String resourceType)

isLocked

public boolean isLocked()

isExclusiveLocked

public boolean isExclusiveLocked()

getExclusiveLockToken

public java.lang.String getExclusiveLockToken()

getLocks

public Lock[] getLocks()

getExclusiveLock

public Lock getExclusiveLock()

getLock

public Lock getLock(java.lang.String owner)

setExclusiveLock

public void setExclusiveLock(Lock lock)

addLock

public void addLock(Lock lock)

removeLock

public void removeLock(Lock lock)

getLastModified

public java.lang.String getLastModified()

setLastModified

public void setLastModified(java.lang.String lastModified)

getCreationDate

public java.lang.String getCreationDate()

setCreationDate

public void setCreationDate(java.lang.String creationDate)

getExclusiveLockOwner

public java.lang.String getExclusiveLockOwner()

getEtag

public java.lang.String getEtag()

setEtag

public void setEtag(java.lang.String etag)

getContentLength

public java.lang.Long getContentLength()

setContentLength

public void setContentLength(java.lang.Long contentLength)

getCustomProperty

public java.lang.String getCustomProperty(DAVProperty property)

setCustomProperty

public void setCustomProperty(DAVProperty property,
                              java.lang.String propertyValue)

getCustomProperties

public java.util.Map getCustomProperties()

getSupportedLocks

public Lock[] getSupportedLocks()

addSupportedLock

public void addSupportedLock(Lock shlock)

getAvailableProperties

public DAVProperty[] getAvailableProperties()
N.B. this only has meaning after a propname query. An allprop or prop will not populate this structure and this method will then return null

addAvailableProperty

public void addAvailableProperty(DAVProperty property)

getStatus

public java.lang.Integer getStatus()

setStatus

public void setStatus(java.lang.Integer status)

getDisplayName

public java.lang.String getDisplayName()

setDisplayName

public void setDisplayName(java.lang.String displayName)

getContentLanguage

public java.lang.String getContentLanguage()

setContentLanguage

public void setContentLanguage(java.lang.String contentLanguage)

getContentType

public java.lang.String getContentType()

setContentType

public void setContentType(java.lang.String contentType)

getLinks

public Link[] getLinks()

addLink

public void addLink(Link l)

getResponseDescription

public java.lang.String getResponseDescription()

setResponseDescription

public void setResponseDescription(java.lang.String responseDescription)

toVerboseString

public java.lang.String toVerboseString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareToDAVFile

public int compareToDAVFile(DAVFile otherFile)

compareTo

public int compareTo(java.lang.Object otherObject)
Specified by:
compareTo in interface java.lang.Comparable