KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.alfresco.service.cmr.search.QueryParameterDefinition;
20 import org.alfresco.service.namespace.NamespacePrefixResolver;
21 import org.alfresco.service.namespace.QName;
22
23 public interface QueryCollection
24 {
25     /**
26      * The name of the query collection
27      *
28      * @return
29      */

30     public String JavaDoc getName();
31     
32     /**
33      * Does this collection contain a query for the given QName?
34      * @param qName
35      * @return
36      */

37     public boolean containsQueryDefinition(QName qName);
38     
39     /**
40      * Get a query definition by QName.
41      * @param qName
42      * @return
43      */

44     public CannedQueryDef getQueryDefinition(QName qName);
45     
46     /**
47      * Does this collection contain a query for the given QName?
48      * @param qName
49      * @return
50      */

51     public boolean containsParameterDefinition(QName qName);
52     
53     /**
54      * Get a query definition by QName.
55      * @param qName
56      * @return
57      */

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

67     public NamespacePrefixResolver getNamespacePrefixResolver();
68     
69 }
70
Popular Tags