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

public class DavPropertyNameSet extends PropContainer implements Iterable<DavPropertyName>
DavPropertyNameSet represents a Set of DavPropertyName objects.
  • Constructor Details

    • DavPropertyNameSet

      public DavPropertyNameSet()
      Create a new empty set.
    • DavPropertyNameSet

      public DavPropertyNameSet(DavPropertyNameSet initialSet)
      Create a new DavPropertyNameSet with the given initial values.
      Parameters:
      initialSet -
    • DavPropertyNameSet

      public DavPropertyNameSet(Element propElement)
      Create a new DavPropertyNameSet from the given DAV:prop element.
      Parameters:
      propElement -
      Throws:
      IllegalArgumentException - if the specified element is null or is not a DAV:prop element.
  • Method Details

    • add

      public boolean add(DavPropertyName propertyName)
      Adds the specified DavPropertyName object to this set if it is not already present.
      Parameters:
      propertyName - element to be added to this set.
      Returns:
      true if the set did not already contain the specified element.
    • add

      public boolean add(String localName, Namespace namespace)
      Creates a DavPropertyName from the given parameters and add it to this set.
      Parameters:
      localName -
      namespace -
      Returns:
      true if the set did not already contain the specified property name.
    • addAll

      public boolean addAll(DavPropertyNameSet propertyNames)
      Add the property names contained in the specified set to this set.
      Parameters:
      propertyNames -
      Returns:
      true if the set has been modified by this call.
    • remove

      public boolean remove(DavPropertyName propertyName)
      Removes the specified DavPropertyName object from this set.
      Parameters:
      propertyName -
      Returns:
      true if the given property name could be removed.
      See Also:
    • iterator

      public DavPropertyNameIterator iterator()
      Specified by:
      iterator in interface Iterable<DavPropertyName>
      Returns:
      Iterator over all DavPropertyNames contained in this set.
    • contains

      public boolean contains(DavPropertyName name)
      Description copied from class: PropContainer
      Returns true if this PropContainer contains a content element that matches the given DavPropertyName.
      Specified by:
      contains in class PropContainer
      Returns:
      true if any of the content elements (be it a DavProperty or a DavPropertyName only) matches the given name.
      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 an instance of DavPropertyName in order to successfully add the given entry.
      Returns:
      true if contentEntry is an instance of DavPropertyName that could be added to this set. 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<DavPropertyName> 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: