java.lang.Object
org.apache.jackrabbit.webdav.property.DavPropertyName
All Implemented Interfaces:
DavConstants, PropEntry, XmlSerializable

public class DavPropertyName extends Object implements DavConstants, XmlSerializable, PropEntry
The DavPropertyName class reflects a WebDAV property name. It holds together the local name of the property and its namespace.
  • Field Details

  • Method Details

    • create

      public static DavPropertyName create(String name, Namespace namespace)
      Creates a new DavPropertyName with the given name and Namespace.
      Parameters:
      name - The local name of the new property name
      namespace - The namespace of the new property name
      Returns:
      The WebDAV property name
    • create

      public static DavPropertyName create(String name)
      Creates a new DavPropertyName with the given local name and the default WebDAV namespace.
      Parameters:
      name - The local name of the new property name
      Returns:
      The WebDAV property name
    • createFromXml

      public static DavPropertyName createFromXml(Element nameElement)
      Create a new DavPropertyName with the name and namespace of the given Xml element.
      Parameters:
      nameElement -
      Returns:
      DavPropertyName instance
    • getName

      public String getName()
      Return the name of this DavPropertyName.
      Returns:
      name
    • getNamespace

      public Namespace getNamespace()
      Return the namespace of this DavPropertyName.
      Returns:
      namespace
    • hashCode

      public int hashCode()
      Computes the hash code using this properties name and namespace.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • equals

      public boolean equals(Object obj)
      Checks if this property has the same name and namespace as the given one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare to
      Returns:
      true if the 2 objects are equal; false otherwise
    • toString

      public String toString()
      Returns a string representation of this property suitable for debugging
      Overrides:
      toString in class Object
      Returns:
      a human readable string representation
    • toXml

      public Element toXml(Document document)
      Creates a element with the name and namespace of this DavPropertyName.
      Specified by:
      toXml in interface XmlSerializable
      Parameters:
      document -
      Returns:
      A element with the name and namespace of this DavPropertyName.