org.apache.jackrabbit.webdav.lock
Class Type

java.lang.Object
  extended by org.apache.jackrabbit.webdav.lock.Type
All Implemented Interfaces:
XmlSerializable

public class Type
extends Object
implements XmlSerializable

The Type class encapsulates the lock type as defined by RFC 2518.


Field Summary
static Type WRITE
           
 
Method Summary
static Type create(String localName, Namespace namespace)
          Create a Type object from the given localName and namespace.
static Type createFromXml(Element lockType)
          Create a Type object from the given Xml element.
 boolean equals(Object obj)
          Returns true if this Type is equal to the given one.
 int hashCode()
           
 Element toXml(Document document)
          Returns the Xml representation of this lock Type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE

public static final Type WRITE
Method Detail

toXml

public Element toXml(Document document)
Returns the Xml representation of this lock Type.

Specified by:
toXml in interface XmlSerializable
Parameters:
document - to be used as factory.
Returns:
Xml representation
See Also:
XmlSerializable.toXml(Document)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Returns true if this Type is equal to the given one.

Overrides:
equals in class Object
Parameters:
obj -
Returns:

createFromXml

public static Type createFromXml(Element lockType)
Create a Type object from the given Xml element.

Parameters:
lockType -
Returns:
Type object.

create

public static Type create(String localName,
                          Namespace namespace)
Create a Type object from the given localName and namespace.

Parameters:
localName -
namespace -
Returns:
Type object.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.