pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.webdav.util
Class DeadProperty

java.lang.Object
  extended by org.torweg.pulse.webdav.util.DeadProperty
All Implemented Interfaces:
java.io.Serializable, IProperty

@Entity
public class DeadProperty
extends java.lang.Object
implements IProperty

represents a dead property of a VirtualFile.

DeadProperties store additional information provided by WebDAV clients.

Version:
$Revision: 2013 $
Author:
Thomas Weber
See Also:
Serialized Form

Constructor Summary
protected DeadProperty()
          Deprecated. 
  DeadProperty(org.jdom.Element property)
          creates a new dead property from the property XML.
  DeadProperty(java.lang.String name, java.lang.String namespace)
          creates an empty property with the given name and namespace URI.
 
Method Summary
 boolean equals(java.lang.Object obj)
          checks whether the given object is equal to this DeadProperty.
 DeadProperty extractPrototype()
          extracts a prototype of the dead property.
 java.lang.Long getId()
           
 java.lang.String getName()
          returns the name of the IProperty.
 java.lang.String getNamespaceURI()
          returns the namespace URI of the IProperty.
 org.jdom.Element getPropElement()
          returns the property as a JDOM element.
 int hashCode()
          computes the hash code of the dead property.
 void patch(DeadProperty prop)
          patches the property with the given other property.
 void patch(org.jdom.Element prop)
          patches the property with the given property XML.
 java.lang.String toString()
          returns a string representation of the dead property.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeadProperty

@Deprecated
protected DeadProperty()
Deprecated. 

used by HibernateTM and JAXB.


DeadProperty

public DeadProperty(org.jdom.Element property)
creates a new dead property from the property XML.

Parameters:
property - the property XML

DeadProperty

public DeadProperty(java.lang.String name,
                    java.lang.String namespace)
creates an empty property with the given name and namespace URI.

Parameters:
name - the name
namespace - the namespace URI
Method Detail

getId

public final java.lang.Long getId()
Returns:
Returns the id.

getNamespaceURI

public final java.lang.String getNamespaceURI()
Description copied from interface: IProperty
returns the namespace URI of the IProperty.

Specified by:
getNamespaceURI in interface IProperty
Returns:
Returns the namespaceURI.

getName

public final java.lang.String getName()
Description copied from interface: IProperty
returns the name of the IProperty.

Specified by:
getName in interface IProperty
Returns:
Returns the propName.

getPropElement

public final org.jdom.Element getPropElement()
Description copied from interface: IProperty
returns the property as a JDOM element.

Specified by:
getPropElement in interface IProperty
Returns:
Returns the propElement.

patch

public final void patch(org.jdom.Element prop)
                 throws VFIOException
patches the property with the given property XML.

The namespace URI and name of the XML's root element must match the namespace URI and name of this DeadProperty.

Parameters:
prop - the XML
Throws:
VFIOException - if the given XML does not match the properties name and/or namespace

patch

public final void patch(DeadProperty prop)
                 throws VFIOException
patches the property with the given other property.

The namespace URI and name of the property must match the namespace URI and name of this DeadProperty.

Parameters:
prop - the property
Throws:
VFIOException - if the given property does not match the properties name and/or namespace

extractPrototype

public final DeadProperty extractPrototype()
extracts a prototype of the dead property.

A prototype has no specific value and consists of an empty element with the same name and namespace as this DeadProperty.

Specified by:
extractPrototype in interface IProperty
Returns:
a prototype of the dead property

hashCode

public int hashCode()
computes the hash code of the dead property.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code

equals

public boolean equals(java.lang.Object obj)
checks whether the given object is equal to this DeadProperty.

The given object is considered equal, if it is a DeadProperty, with the same namespace URI and prop-name, and thus suitable for patching.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the given object
Returns:
true, if and only if, the given object is suitable for patching. Otherwise false.
See Also:
patch(DeadProperty)

toString

public java.lang.String toString()
returns a string representation of the dead property.

Overrides:
toString in class java.lang.Object
Returns:
a string representation