View Javadoc

1   /*
2    * Copyright 2011-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.tagcloud.collector;
17  
18  import java.io.IOException;
19  import java.io.InputStream;
20  
21  import de.smartics.tagcloud.TagCloud;
22  
23  /**
24   * Collects words from input streams to be added to a cloud instance.
25   *
26   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
27   * @version $Revision:591 $
28   */
29  public interface TagCollector
30  {
31    // ********************************* Fields *********************************
32  
33    // --- constants ------------------------------------------------------------
34  
35    // ****************************** Initializer *******************************
36  
37    // ****************************** Inner Classes *****************************
38  
39    // ********************************* Methods ********************************
40  
41    // --- get&set --------------------------------------------------------------
42  
43    // --- business -------------------------------------------------------------
44  
45    /**
46     * Collects words from the input stream. The words are added as tags to the
47     * tag cloud.
48     */
49    void collect(InputStream input) throws IOException;
50  
51    /**
52     * Returns a reference to the cloud.
53     *
54     * @return a reference to the cloud.
55     */
56    TagCloud getTagCloud();
57  
58    /**
59     * Removes all tag information collected.
60     */
61    void clear();
62  
63    // --- object basics --------------------------------------------------------
64  }