Class PropContainer

    • Constructor Detail

      • PropContainer

        public PropContainer()
    • Method Detail

      • addContent

        public boolean addContent​(Object contentEntry)
        Deprecated.
        Tries to add the specified object to the PropContainer and returns a boolean indicating whether the content could be added to the internal set/map.
        Parameters:
        contentEntry -
        Returns:
        true if the object could be added; false otherwise
      • addContent

        public abstract boolean addContent​(PropEntry contentEntry)
        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.
        Parameters:
        contentEntry -
        Returns:
        true if the object could be added; false otherwise
      • isEmpty

        public abstract boolean isEmpty()
        Returns true if the PropContainer does not yet contain any content elements.
        Returns:
        true if this container is empty.
      • getContentSize

        public abstract int getContentSize()
        Returns the number of property related content elements that are present in this PropContainer.
        Returns:
        number of content elements
      • getContent

        public abstract Collection<? extends PropEntry> getContent()
        Returns the collection that contains all the content elements of this PropContainer.
        Returns:
        collection representing the contents of this PropContainer.
      • contains

        public abstract boolean contains​(DavPropertyName name)
        Returns true if this PropContainer contains a content element that matches the given DavPropertyName.
        Parameters:
        name -
        Returns:
        true if any of the content elements (be it a DavProperty or a DavPropertyName only) matches the given name.
      • toXml

        public Element toXml​(Document document)
        Returns the xml representation of a property related set with the following format:
         <!ELEMENT prop (ANY) >
         where ANY consists of a list of elements each reflecting the xml
         representation of the entries returned by getContent().
         
        Specified by:
        toXml in interface XmlSerializable
        Parameters:
        document - to be used as factory.
        Returns:
        a w3c element representing this object
        See Also:
        XmlSerializable.toXml(Document)