org.apache.webdav.lib.properties

Class ResourceTypeProperty

Implemented Interfaces:
Property

public class ResourceTypeProperty
extends BaseProperty

An interface that describes a standard Resource Type property (as defined by the WebDAV specification).

Field Summary

static String
TAG_COLLECTION
The property collection tag.
static String
TAG_NAME
The property name.
static String
TAG_PRINCIPAL

Fields inherited from class org.apache.webdav.lib.BaseProperty

element, response

Constructor Summary

ResourceTypeProperty(ResponseEntity response, Element element)
Default constructor for the property.

Method Summary

String
getPropertyAsString()
This method returns the value of the property.
boolean
isCollection()
Returns true if the resource is a collection.
boolean
isPrincipal()

Methods inherited from class org.apache.webdav.lib.BaseProperty

getElement, getLocalName, getName, getNamespaceURI, getOwningURL, getPropertyAsString, getStatusCode, toString

Field Details

TAG_COLLECTION

public static final String TAG_COLLECTION
The property collection tag.

TAG_NAME

public static final String TAG_NAME
The property name.

TAG_PRINCIPAL

public static final String TAG_PRINCIPAL

Constructor Details

ResourceTypeProperty

public ResourceTypeProperty(ResponseEntity response,
                            Element element)
Default constructor for the property.

Method Details

getPropertyAsString

public String getPropertyAsString()
This method returns the value of the property. For this property "COLLECTION" is returned if this resource is a collection, "" otherwise. WARNING: this will change in the future use isCollection()
Specified by:
getPropertyAsString in interface Property
Overrides:
getPropertyAsString in interface BaseProperty

isCollection

public boolean isCollection()
Returns true if the resource is a collection. A collection is indicated by a response like this:
 <D:resourcetype><D:collection/></D:resourcetype>
 

isPrincipal

public boolean isPrincipal()