KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > search > QueryScope


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/QueryScope.java,v 1.11 2004/07/28 09:35:10 ib Exp $
3  * $Revision: 1.11 $
4  * $Date: 2004/07/28 09:35:10 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.search;
25
26 import java.util.Set JavaDoc;
27
28 /**
29  * Holds the scope information supplied with the <FROM> element.
30  *
31  * @version $Revision: 1.11 $
32  */

33 public interface QueryScope {
34     
35     public static final int DEPTH_0 = 0;
36     public static final int DEPTH_1 = 1;
37     public static final int DEPTH_INFINITY = Integer.MAX_VALUE;
38     
39     /**
40      * Method getExcludeSet
41      *
42      * @return a Set
43      */

44     public Set JavaDoc getExcludeSet();
45     
46     
47     /**
48      * Method getIncludeSet
49      *
50      * @return a Set
51      */

52     public Set JavaDoc getIncludeSet();
53     
54     
55     /**
56      * href accessor.
57      *
58      * @return a String
59      *
60      */

61     public String JavaDoc getHref();
62     
63     /**
64      * depth accessor
65      *
66      * @return one of QueryScope.DEPTH_INFINITY, QueryScope.DEPTH_0
67      * or QueryScope.DEPTH_1
68      *
69      */

70     public int getDepth();
71     
72     /**
73      * Returns true if the scope specifies a collection
74      *
75      * @return a boolean
76      *
77      */

78     public boolean isCollection ();
79     
80     /**
81      * Method setIsCollection
82      *
83      * @param isCollection a boolean
84      *
85      */

86     public void setIsCollection (boolean isCollection);
87     
88     
89     /**
90      * Returns an Iterator for Scope objects, that shall be excluded from
91      * SEARCH. An excludedScope must match the scope of a store as defined
92      * in Domain.xml
93      *
94      * @return an Iterator of Scope objects
95      *
96      */

97     public Set JavaDoc getExcludedScopes ();
98
99 }
100
Popular Tags