add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / queries / src / java / org / apache / lucene / search / FilterClause.java
1 package org.apache.lucene.search;
2
3 /**
4  * Licensed to the Apache Software Foundation (ASF) under one or more
5  * contributor license agreements.  See the NOTICE file distributed with
6  * this work for additional information regarding copyright ownership.
7  * The ASF licenses this file to You under the Apache License, Version 2.0
8  * (the "License"); you may not use this file except in compliance with
9  * the License.  You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 import org.apache.lucene.search.BooleanClause.Occur;
21
22 /**
23  * A Filter that wrapped with an indication of how that filter
24  * is used when composed with another filter.
25  * (Follows the boolean logic in BooleanClause for composition 
26  * of queries.)
27  */
28
29 public class FilterClause implements java.io.Serializable
30 {
31         Occur occur = null;
32         Filter filter = null;
33
34         /**
35          * Create a new FilterClause
36          * @param filter A Filter object containing a BitSet
37          * @param occur A parameter implementation indicating SHOULD, MUST or MUST NOT
38          */
39         
40         public FilterClause( Filter filter,Occur occur)
41         {
42                 this.occur = occur;
43                 this.filter = filter;
44         }
45
46         /**
47          * Returns this FilterClause's filter
48          * @return A Filter object
49          */
50         
51         public Filter getFilter()
52         {
53                 return filter;
54         }
55
56         /**
57          * Returns this FilterClause's occur parameter
58          * @return An Occur object
59          */
60         
61         public Occur getOccur()
62         {
63                 return occur;
64         }
65
66 }