KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > clustering > HitsCluster


1 /* Copyright (c) 2003 The Nutch Organization. All rights reserved. */
2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */
3
4 package net.nutch.clustering;
5
6 import net.nutch.searcher.HitDetails;
7
8 /**
9  * An interface representing a group of hits.
10  *
11  * <p>If {@link #isJunkCluster()} method returns <code>true</code>
12  * then this cluster contains documents that are grouped together,
13  * but no clear semantic relation has been detected; this is mostly
14  * the case with "Other topics" clusters. Such clusters may
15  * be discarded by the user interface layer.</p>
16  *
17  * @author Dawid Weiss
18  * @version $Id: HitsCluster.java,v 1.1 2004/08/09 23:23:52 johnnx Exp $
19  */

20 public interface HitsCluster {
21   /**
22    * @return Returns an array of {@link HitsCluster} objects
23    * that are sub-groups of the current group, or <code>null</code>
24    * if this cluster has no sub-groups.
25    */

26   public HitsCluster [] getSubclusters();
27   
28   /**
29    * @return Returns a relevance-ordered array of the hits belonging
30    * to this cluster or <code>null</code> if this cluster
31    * has no associated documents (it may have subclusters only).
32    */

33   public HitDetails[] getHits();
34   
35   /**
36    * @return Returns an array of labels for this cluster. The labels should
37    * be sorted according to their relevance to the cluster's content. Not
38    * all of the labels must be displayed - the application is free to
39    * set a cutoff threshold and display only the topmost labels.
40    */

41   public String JavaDoc[] getDescriptionLabels();
42   
43   /**
44    * Returns <code>true</code> if this cluster constains documents
45    * that did not fit anywhere else (presentation layer may
46    * discard such clusters).
47    *
48    * <p>Subclusters of this cluster are also junk clusters, even if
49    * they don't have this property set to <code>true</code></p>
50    */

51   public boolean isJunkCluster();
52 }
53
Popular Tags