Class AbstractDavProperty<T>

    • Constructor Detail

      • AbstractDavProperty

        public AbstractDavProperty​(DavPropertyName name,
                                   boolean isInvisibleInAllprop)
        Create a new AbstractDavProperty with the given DavPropertyName and a boolean flag indicating whether this property should be suppressed in PROPFIND/allprop responses.
    • Method Detail

      • hashCode

        public int hashCode()
        Computes the hash code using this property's name and value.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code
      • equals

        public boolean equals​(Object obj)
        Checks if this property has the same name and value 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
      • toXml

        public Element toXml​(Document document)
        Return a XML element representation of this property. The value of the property will be added as text or as child element.
         new DavProperty("displayname", "WebDAV Directory").toXml
         gives a element like:
         <D:displayname>WebDAV Directory</D:displayname>
        
         new DavProperty("resourcetype", new Element("collection")).toXml
         gives a element like:
         <D:resourcetype><D:collection/></D:resourcetype>
        
         Element[] customVals = { new Element("bla", customNamespace), new Element("bli", customNamespace) };
         new DavProperty("custom-property", customVals, customNamespace).toXml
         gives an element like
         <Z:custom-property>
            <Z:bla/>
            <Z:bli/>
         </Z:custom-property>
         
        Specified by:
        toXml in interface XmlSerializable
        Parameters:
        document -
        Returns:
        a XML element of this property
        See Also:
        XmlSerializable.toXml(Document)