add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / facet / src / java / org / apache / lucene / facet / index / streaming / CategoryListTokenizer.java
1 package org.apache.lucene.facet.index.streaming;
2
3 import java.io.IOException;
4
5 import org.apache.lucene.analysis.TokenStream;
6
7 import org.apache.lucene.facet.index.params.FacetIndexingParams;
8
9 /**
10  * Licensed to the Apache Software Foundation (ASF) under one or more
11  * contributor license agreements.  See the NOTICE file distributed with
12  * this work for additional information regarding copyright ownership.
13  * The ASF licenses this file to You under the Apache License, Version 2.0
14  * (the "License"); you may not use this file except in compliance with
15  * the License.  You may obtain a copy of the License at
16  *
17  *     http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25
26 /**
27  * A base class for category list tokenizers, which add category list tokens to
28  * category streams.
29  * 
30  * @lucene.experimental
31  */
32 public abstract class CategoryListTokenizer extends CategoryTokenizerBase {
33
34   /**
35    * @see CategoryTokenizerBase#CategoryTokenizerBase(TokenStream, FacetIndexingParams)
36    */
37   public CategoryListTokenizer(TokenStream input,
38       FacetIndexingParams indexingParams) {
39     super(input, indexingParams);
40   }
41
42   /**
43    * A method invoked once when the input stream begins, for subclass-specific
44    * processing. Subclass implementations must invoke this one, too!
45    */
46   protected void handleStartOfInput() throws IOException {
47     // In this class, we do nothing.
48   }
49
50   /**
51    * A method invoked once when the input stream ends, for subclass-specific
52    * processing.
53    */
54   protected void handleEndOfInput() throws IOException {
55     // In this class, we do nothing.
56   }
57
58   @Override
59   public void reset() throws IOException {
60     super.reset();
61     handleStartOfInput();
62   }
63
64   @Override
65   public abstract boolean incrementToken() throws IOException;
66
67 }