KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > search > CannedQueryDef


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.repo.search;
18
19 import java.util.Collection JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.alfresco.service.cmr.search.QueryParameterDefinition;
23 import org.alfresco.service.namespace.NamespacePrefixResolver;
24 import org.alfresco.service.namespace.QName;
25
26 /**
27  * The definition of a canned query
28  *
29  * @author andyh
30  *
31  */

32 public interface CannedQueryDef
33 {
34     /**
35      * Get the unique name for the query
36      *
37      * @return
38      */

39     public QName getQname();
40
41     /**
42      * Get the language in which the query is defined.
43      *
44      * @return
45      */

46     public String JavaDoc getLanguage();
47
48     /**
49      * Get the definitions for any query parameters.
50      *
51      * @return
52      */

53     public Collection JavaDoc<QueryParameterDefinition> getQueryParameterDefs();
54
55     /**
56      * Get the query string.
57      *
58      * @return
59      */

60     public String JavaDoc getQuery();
61
62     /**
63      * Return the mechanism that this query definition uses to map namespace
64      * prefixes to URIs. A query may use a predefined set of prefixes for known
65      * URIs. I would be unwise to rely on the defaults.
66      *
67      * @return
68      */

69     public NamespacePrefixResolver getNamespacePrefixResolver();
70
71     /**
72      * Get a map to look up definitions by Qname
73      *
74      * @return
75      */

76     public Map JavaDoc<QName, QueryParameterDefinition> getQueryParameterMap();
77 }
78
Popular Tags