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;
17  
18  import java.util.List;
19  
20  /**
21   * Interface to the tag cloud.
22   *
23   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
24   * @version $Revision:591 $
25   */
26  public interface TagCloud
27  {
28    // ********************************* Fields *********************************
29  
30    // --- constants ------------------------------------------------------------
31  
32    // ****************************** Initializer *******************************
33  
34    // ****************************** Inner Classes *****************************
35  
36    // ********************************* Methods ********************************
37  
38    // --- get&set --------------------------------------------------------------
39  
40    // --- business -------------------------------------------------------------
41  
42    /**
43     * Adds the tag to the cloud.
44     *
45     * @param tag the tag to add.
46     */
47    void addTag(final String tag);
48  
49    /**
50     * Resets the content of the cloud. All collected tags are removed.
51     */
52    void clear();
53  
54    /**
55     * Returns the HTML representation of the tag cloud.
56     *
57     * @return an HTML snippet containing the tag cloud.
58     */
59    String toHtml();
60  
61    /**
62     * Returns the list of tag information.
63     *
64     * @return the list of tag information.
65     */
66    List<Tag> getTags();
67  
68    // --- object basics --------------------------------------------------------
69  
70  }