KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > search > HitRow


1 /*
2  * Created on May 15, 2005
3  */

4 package com.openedit.search;
5
6 import org.apache.nutch.searcher.Hit;
7 import org.apache.nutch.searcher.HitDetails;
8
9 /**
10  * @author cburkey
11  *
12  */

13 public class HitRow
14 {
15     Hit fieldHit;
16     String JavaDoc fieldSummary;
17     HitDetails fieldDetail;
18     public HitDetails getDetail()
19     {
20         return fieldDetail;
21     }
22     public void setDetail(HitDetails inDetail)
23     {
24         fieldDetail = inDetail;
25     }
26     public Hit getHit()
27     {
28         return fieldHit;
29     }
30     public void setHit(Hit inHit)
31     {
32         fieldHit = inHit;
33     }
34     public String JavaDoc getSummary()
35     {
36         return fieldSummary;
37     }
38     public void setSummary(String JavaDoc inSummary)
39     {
40         fieldSummary = inSummary;
41     }
42     public String JavaDoc getTitle()
43     {
44         String JavaDoc title = getDetail().getValue("title");
45         if ( title != null && title.length() > 0)
46         {
47             return title;
48         }
49         return getUrl();
50     }
51     public String JavaDoc getUrl()
52     {
53         return getDetail().getValue("url");
54     }
55 }
56
Popular Tags