KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > search > ResultSetRow


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.search;
18
19 import java.io.Serializable JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.alfresco.service.cmr.repository.ChildAssociationRef;
23 import org.alfresco.service.cmr.repository.NodeRef;
24 import org.alfresco.service.cmr.repository.Path;
25 import org.alfresco.service.namespace.QName;
26
27 /**
28  * A row in a result set
29  *
30  * TODO: Support for other non attribute features such as parents and path
31  *
32  * @author andyh
33  *
34  */

35 public interface ResultSetRow
36 {
37     /**
38      * Get the values of all available node properties
39      *
40      * @return
41      */

42     public Map JavaDoc<Path, Serializable JavaDoc> getValues();
43
44     /**
45      * Get a node property by path
46      *
47      * @param path
48      * @return
49      */

50     public Serializable JavaDoc getValue(Path path);
51
52     /**
53      * Get a node value by name
54      *
55      * @param qname
56      * @return
57      */

58     public Serializable JavaDoc getValue(QName qname);
59     
60     /**
61      * The refernce to the node that equates to this row in the result set
62      *
63      * @return
64      */

65     public NodeRef getNodeRef();
66
67     /**
68      * Get the score for this row in the result set
69      *
70      * @return
71      */

72     public float getScore(); // Score is score + rank + potentially other
73
// stuff
74

75     /**
76      * Get the containing result set
77      *
78      * @return
79      */

80     public ResultSet getResultSet();
81     
82     /**
83      * Return the QName of the node in the context in which it was found.
84      * @return
85      */

86     
87     public QName getQName();
88
89     /**
90      * Get the position of this row in the containing set.
91      * @return
92      */

93     public int getIndex();
94     
95     /**
96      * Return the child assoc ref for this row
97      * @return
98      */

99     public ChildAssociationRef getChildAssocRef();
100     
101 }
102
Popular Tags