1 4 package com.openedit.search; 5 6 import org.apache.nutch.searcher.Hit; 7 import org.apache.nutch.searcher.HitDetails; 8 9 13 public class HitRow 14 { 15 Hit fieldHit; 16 String 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 getSummary() 35 { 36 return fieldSummary; 37 } 38 public void setSummary(String inSummary) 39 { 40 fieldSummary = inSummary; 41 } 42 public String getTitle() 43 { 44 String title = getDetail().getValue("title"); 45 if ( title != null && title.length() > 0) 46 { 47 return title; 48 } 49 return getUrl(); 50 } 51 public String getUrl() 52 { 53 return getDetail().getValue("url"); 54 } 55 } 56 | Popular Tags |