Package org.apache.webdav.lib.properties
Class ResourceTypeProperty
- java.lang.Object
-
- org.apache.webdav.lib.BaseProperty
-
- org.apache.webdav.lib.properties.ResourceTypeProperty
-
- All 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
Fields Modifier and Type Field Description static java.lang.String
TAG_COLLECTION
The property collection tag.static java.lang.String
TAG_NAME
The property name.static java.lang.String
TAG_PRINCIPAL
-
Fields inherited from class org.apache.webdav.lib.BaseProperty
element, response
-
-
Constructor Summary
Constructors Constructor Description ResourceTypeProperty(ResponseEntity response, org.w3c.dom.Element element)
Default constructor for the property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.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, getStatusCode, toString
-
-
-
-
Field Detail
-
TAG_NAME
public static final java.lang.String TAG_NAME
The property name.- See Also:
- Constant Field Values
-
TAG_COLLECTION
public static final java.lang.String TAG_COLLECTION
The property collection tag.- See Also:
- Constant Field Values
-
TAG_PRINCIPAL
public static final java.lang.String TAG_PRINCIPAL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResourceTypeProperty
public ResourceTypeProperty(ResponseEntity response, org.w3c.dom.Element element)
Default constructor for the property.
-
-
Method Detail
-
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()
-
getPropertyAsString
public java.lang.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 interfaceProperty
- Overrides:
getPropertyAsString
in classBaseProperty
-
-