|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.could.webdav.DAVResource
A simple representation of a WebDAV resource based on Files.
| Field Summary | |
static String |
COLLECTION_MIME_TYPE
The mime type when isCollection() is true. |
protected static String |
PREFIX
The prefix for all temporary resources. |
protected static String |
SUFFIX
The suffix for all temporary resources. |
| Constructor Summary | |
protected |
DAVResource(DAVRepository repo,
File file)
Create a new DAVResource instance. |
| Method Summary | |
int |
compareTo(Object object)
Compare this instance to another object for sorting. |
void |
copy(DAVResource dest,
boolean overwrite,
boolean recursive)
Copy this resource to the specified destination. |
void |
delete()
Delete this resource. |
boolean |
equals(Object object)
Compare this instance to another object for equality. |
Iterator |
getChildren()
Return an Iterator over all children of this instance. |
Long |
getContentLength()
Return the MIME Content-Length of this DAVResource. |
String |
getContentType()
Return the MIME Content-Type of this DAVResource. |
Date |
getCreationDate()
Return the creation date of this DAVResource. |
String |
getDisplayName()
Return the display name of this resource (with an added "/" slash at the end if it is a collection). |
String |
getEntityTag()
Return a String representing the Entity Tag of this
DAVResource as described by the
HTTP RFC. |
protected File |
getFile()
Return the File associated with this resource. |
Date |
getLastModified()
Return the last modification date of this DAVResource. |
String |
getName()
Return the bare name of this resource (without any "/" slashes at the end if it is a collection). |
DAVResource |
getParent()
Return the parent DAVResource of this instance. |
String |
getRelativePath()
Return the path of this DAVResource relative to the root
of the associated DAVRepository. |
URI |
getRelativeURI()
Return the URI of this DAVResource relative to the
root of the associated DAVRepository. |
DAVRepository |
getRepository()
Return the DAVRepository associated with this resource. |
int |
hashCode()
Return an integer number for the hash value of this instance. |
boolean |
isCollection()
Checks if this DAVResource is a collection. |
boolean |
isNull()
Checks if this DAVResource is a null (non existant) one. |
boolean |
isResource()
Checks if this DAVResource is an existing resource. |
void |
makeCollection()
Create a collection identified by this DAVResource. |
DAVInputStream |
read()
Return an InputStream reading the resource. |
DAVOutputStream |
write()
Return a DAVOutputStream writing to this DAVResource
instance. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String COLLECTION_MIME_TYPE
The mime type when isCollection() is true.
protected static final String PREFIX
The prefix for all temporary resources.
protected static final String SUFFIX
The suffix for all temporary resources.
| Constructor Detail |
protected DAVResource(DAVRepository repo,
File file)
Create a new DAVResource instance.
| Method Detail |
public int hashCode()
Return an integer number for the hash value of this instance.
public boolean equals(Object object)
Compare this instance to another object for equality.
public int compareTo(Object object)
Compare this instance to another object for sorting.
compareTo in interface Comparablepublic boolean isNull()
Checks if this DAVResource is a null (non existant) one.
public boolean isCollection()
Checks if this DAVResource is a collection.
public boolean isResource()
Checks if this DAVResource is an existing resource.
protected File getFile()
Return the File associated with this resource.
public DAVRepository getRepository()
Return the DAVRepository associated with this resource.
public String getName()
Return the bare name of this resource (without any "/" slashes at the end if it is a collection).
String.public String getDisplayName()
Return the display name of this resource (with an added "/" slash at the end if it is a collection).
String.public String getRelativePath()
Return the path of this DAVResource relative to the root
of the associated DAVRepository.
String.public URI getRelativeURI()
Return the URI of this DAVResource relative to the
root of the associated DAVRepository.
URI instance.public DAVResource getParent()
Return the parent DAVResource of this instance.
DAVResource instance or null
if this DAVResource is the repository root.public Iterator getChildren()
Return an Iterator over all children of this instance.
Iterator instance or null if
this DAVResource is not a collection.
IOException - If the resource could not be resolved.public String getContentType()
Return the MIME Content-Type of this DAVResource.
If the isCollection() method returns true this
method always returns text/html.
String instance or null if this resource does
not exist.public Long getContentLength()
Return the MIME Content-Length of this DAVResource.
Long instance or null if this resource does
not exist or is a collection.public Date getCreationDate()
Return the creation date of this DAVResource.
As this implementation relies on a File backend, this method
will always return the same as getLastModified().
String instance or null if this resource does
not exist.public Date getLastModified()
Return the last modification date of this DAVResource.
String instance or null if this resource does
not exist.public String getEntityTag()
Return a String representing the Entity Tag of this
DAVResource as described by the
HTTP RFC.
String instance or null if this resource does
not exist.
public void delete()
throws DAVMultiStatus
Delete this resource.
DAVException - If for any reason this resource cannot be deleted.
DAVMultiStatus
public void copy(DAVResource dest,
boolean overwrite,
boolean recursive)
throws DAVMultiStatus
Copy this resource to the specified destination.
DAVException - If for any reason this resource cannot be deleted.
DAVMultiStatuspublic void makeCollection()
Create a collection identified by this DAVResource.
This resource must be non-null and its
parent must be accessible and be a
collection.
DAVException - If for any reason a collection identified by this
resource cannot be created.public DAVInputStream read()
Return an InputStream reading the resource.
InputStream instance.public DAVOutputStream write()
Return a DAVOutputStream writing to this DAVResource
instance.
DAVOutputStream instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||