01: package org.apache.lucene.search;
02:
03: /**
04: * Licensed to the Apache Software Foundation (ASF) under one or more
05: * contributor license agreements. See the NOTICE file distributed with
06: * this work for additional information regarding copyright ownership.
07: * The ASF licenses this file to You under the Apache License, Version 2.0
08: * (the "License"); you may not use this file except in compliance with
09: * 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: * @author BPDThebault
28: */
29:
30: public class FilterClause implements java.io.Serializable {
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: this .occur = occur;
42: this .filter = filter;
43: }
44:
45: /**
46: * Returns this FilterClause's filter
47: * @return A Filter object
48: */
49:
50: public Filter getFilter() {
51: return filter;
52: }
53:
54: /**
55: * Returns this FilterClause's occur parameter
56: * @return An Occur object
57: */
58:
59: public Occur getOccur() {
60: return occur;
61: }
62:
63: }
|