Class SearchResultProperty

    • Constructor Detail

      • SearchResultProperty

        public SearchResultProperty​(String[] columnNames,
                                    String[] selectorNames,
                                    Value[] values)
        Creates a new SearchResultProperty.
        Parameters:
        columnNames - the column names of the search row represented by this dav property.
        selectorNames - the selector names of the row represented by this dav property.
        values - the values present in the columns
    • Method Detail

      • getColumnNames

        public String[] getColumnNames()
        Return the column names representing the names of the properties present in the values.
        Returns:
        columnNames
      • getSelectorNames

        public String[] getSelectorNames()
        Returns:
        the selector name for each of the columns in the result property.
      • getValues

        public Value[] getValues()
        Return the values representing the values of that row in the search result table.
        Returns:
        values
        See Also:
        Row.getValues()
      • toXml

        public Element toXml​(Document document)
        Return the xml representation of this webdav property. For every value in the query result row a dcr:name, dcr:value, dcr:type and an optional dcr:selectorName element is created. Example:
         -----------------------------------------------------------
           col-name  |   bla   |   bli   |  jcr:path  |  jcr:score
         -----------------------------------------------------------
           value     |   xxx   |   111   |  /aNode    |    1
           type      |    1    |    3    |     8      |    3
           sel-name  |         |         |     S      |    S
         -----------------------------------------------------------
         
        results in:
         <dcr:search-result-property xmlns:dcr="http://www.day.com/jcr/webdav/1.0">
            <dcr:column>
               <dcr:name>bla<dcr:name/>
               <dcr:value dcr:type="String">xxx<dcr:value/>
            </dcr:column>
            <dcr:column>
               <dcr:name>bli<dcr:name/>
               <dcr:value dcr:type="Long">111<dcr:value/>
            </dcr:column>
            <dcr:column>
               <dcr:name>jcr:path<dcr:name/>
               <dcr:value dcr:type="Path">/aNode<dcr:value/>
               <dcr:selectorName>S<dcr:selectorName/>
            </dcr:column>
            <dcr:column>
               <dcr:name>jcr:score<dcr:name/>
               <dcr:value dcr:type="Long">1<dcr:value/>
               <dcr:selectorName>S<dcr:selectorName/>
            </dcr:column>
         </dcr:search-result-property>
         
        Specified by:
        toXml in interface XmlSerializable
        Overrides:
        toXml in class AbstractDavProperty<Value[]>
        Parameters:
        document - to be used as factory.
        Returns:
        a XML element of this property
        See Also:
        XmlSerializable.toXml(org.w3c.dom.Document)