org.apache.nutch.searcher
Class FetchedSegments

java.lang.Object
  extended byorg.apache.nutch.searcher.FetchedSegments
All Implemented Interfaces:
HitContent, HitSummarizer

public class FetchedSegments
extends Object
implements HitSummarizer, HitContent

Implements HitSummarizer and HitContent for a set of fetched segments.


Constructor Summary
FetchedSegments(NutchFileSystem nfs, String segmentsDir)
          Construct given a directory containing fetcher output.
 
Method Summary
 String[] getAnchors(HitDetails details)
          Returns the anchors of a hit document.
 byte[] getContent(HitDetails details)
          Returns the content of a hit document.
 long getFetchDate(HitDetails details)
          Returns the anchors of a hit document.
 ParseData getParseData(HitDetails details)
          Returns the ParseData of a hit document.
 ParseText getParseText(HitDetails details)
          Returns the ParseText of a hit document.
 String[] getSegmentNames()
           
 String[] getSummary(HitDetails[] details, Query query)
          Returns summaries for a set of details.
 String getSummary(HitDetails details, Query query)
          Returns a summary for the given hit details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FetchedSegments

public FetchedSegments(NutchFileSystem nfs,
                       String segmentsDir)
                throws IOException
Construct given a directory containing fetcher output.

Method Detail

getSegmentNames

public String[] getSegmentNames()

getContent

public byte[] getContent(HitDetails details)
                  throws IOException
Description copied from interface: HitContent
Returns the content of a hit document.

Specified by:
getContent in interface HitContent
Throws:
IOException

getParseData

public ParseData getParseData(HitDetails details)
                       throws IOException
Description copied from interface: HitContent
Returns the ParseData of a hit document.

Specified by:
getParseData in interface HitContent
Throws:
IOException

getAnchors

public String[] getAnchors(HitDetails details)
                    throws IOException
Description copied from interface: HitContent
Returns the anchors of a hit document.

Specified by:
getAnchors in interface HitContent
Throws:
IOException

getFetchDate

public long getFetchDate(HitDetails details)
                  throws IOException
Description copied from interface: HitContent
Returns the anchors of a hit document.

Specified by:
getFetchDate in interface HitContent
Throws:
IOException

getParseText

public ParseText getParseText(HitDetails details)
                       throws IOException
Description copied from interface: HitContent
Returns the ParseText of a hit document.

Specified by:
getParseText in interface HitContent
Throws:
IOException

getSummary

public String getSummary(HitDetails details,
                         Query query)
                  throws IOException
Description copied from interface: HitSummarizer
Returns a summary for the given hit details.

Specified by:
getSummary in interface HitSummarizer
Parameters:
details - the details of the hit to be summarized
query - indicates what should be higlighted in the summary text
Throws:
IOException

getSummary

public String[] getSummary(HitDetails[] details,
                           Query query)
                    throws IOException
Description copied from interface: HitSummarizer
Returns summaries for a set of details. Hook for parallel IPC calls.

Specified by:
getSummary in interface HitSummarizer
Parameters:
details - the details of hits to be summarized
query - indicates what should be higlighted in the summary text
Throws:
IOException


Copyright © 2006 The Apache Software Foundation