java.lang.Object
org.apache.jackrabbit.webdav.property.PropContainer
org.apache.jackrabbit.webdav.property.DavPropertySet
All Implemented Interfaces:
Iterable<DavProperty<?>>, DavConstants, XmlSerializable

public class DavPropertySet extends PropContainer implements Iterable<DavProperty<?>>
The DavPropertySet class represents a set of WebDAV property.
  • Constructor Details

    • DavPropertySet

      public DavPropertySet()
  • Method Details

    • add

      public DavProperty<?> add(DavProperty<?> property)
      Adds a new property to this set.
      Parameters:
      property - The property to add
      Returns:
      The previously assigned property or null.
    • addAll

      public void addAll(DavPropertySet pset)
      Parameters:
      pset - Properties to add
    • get

      public DavProperty<?> get(String name)
      Retrieves the property with the specified name and the default WebDAV namespace.
      Parameters:
      name - The name of the property to retrieve
      Returns:
      The desired property or null
    • get

      public DavProperty<?> get(String name, Namespace namespace)
      Retrieves the property with the specified name and namespace.
      Parameters:
      name - The name of the property to retrieve
      namespace - The namespace of the property to retrieve
      Returns:
      The desired property or null
    • get

      public DavProperty<?> get(DavPropertyName name)
      Retrieves the property with the specified name
      Parameters:
      name - The webdav property name of the property to retrieve
      Returns:
      The desired property or null
    • remove

      public DavProperty<?> remove(DavPropertyName name)
      Removes the indicated property from this set.
      Parameters:
      name - The webdav property name to remove
      Returns:
      The removed property or null
    • remove

      public DavProperty<?> remove(String name)
      Removes the property with the specified name and the default WebDAV namespace.
      Parameters:
      name - The name of the property to remove
      Returns:
      The removed property or null
    • remove

      public DavProperty<?> remove(String name, Namespace namespace)
      Removes the property with the specified name and namespace from this set.
      Parameters:
      name - The name of the property to remove
      namespace - The namespace of the property to remove
      Returns:
      The removed property or null
    • iterator

      public DavPropertyIterator iterator()
      Returns an iterator over all property in this set.
      Specified by:
      iterator in interface Iterable<DavProperty<?>>
      Returns:
      An iterator over DavProperty.
    • iterator

      public DavPropertyIterator iterator(Namespace namespace)
      Returns an iterator over all those property in this set, that have the indicated namespace.
      Parameters:
      namespace - The namespace of the property in the iteration.
      Returns:
      An iterator over DavProperty.
    • getPropertyNames

      public DavPropertyName[] getPropertyNames()
      Return the names of all properties present in this set.
      Returns:
      array of property names present in this set.
    • contains

      public boolean contains(DavPropertyName name)
      Checks if this set contains the property with the specified name.
      Specified by:
      contains in class PropContainer
      Parameters:
      name - The name of the property
      Returns:
      true if this set contains the property; false otherwise.
      See Also:
    • addContent

      public boolean addContent(PropEntry contentEntry)
      Description copied from class: PropContainer
      Tries to add the specified entry to the PropContainer and returns a boolean indicating whether the content could be added to the internal set/map.
      Specified by:
      addContent in class PropContainer
      Parameters:
      contentEntry - NOTE, that the given object must be an instance of DavProperty in order to be successfully added to this set.
      Returns:
      true if the specified object is an instance of DavProperty and false otherwise.
      See Also:
    • isEmpty

      public boolean isEmpty()
      Description copied from class: PropContainer
      Returns true if the PropContainer does not yet contain any content elements.
      Specified by:
      isEmpty in class PropContainer
      Returns:
      true if this container is empty.
      See Also:
    • getContentSize

      public int getContentSize()
      Description copied from class: PropContainer
      Returns the number of property related content elements that are present in this PropContainer.
      Specified by:
      getContentSize in class PropContainer
      Returns:
      number of content elements
      See Also:
    • getContent

      public Collection<? extends PropEntry> getContent()
      Description copied from class: PropContainer
      Returns the collection that contains all the content elements of this PropContainer.
      Specified by:
      getContent in class PropContainer
      Returns:
      collection representing the contents of this PropContainer.
      See Also: