|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.nutch.searcher.Summary
A document summary dynamically generated to match a query.
| Nested Class Summary | |
static class |
Summary.Ellipsis
An ellipsis fragment within a summary. |
static class |
Summary.Fragment
A fragment of text within a summary. |
static class |
Summary.Highlight
A highlighted fragment of text within a summary. |
| Constructor Summary | |
Summary()
Constructs an empty Summary. |
|
| Method Summary | |
void |
add(Summary.Fragment fragment)
Adds a fragment to a summary. |
boolean |
equals(Object o)
|
Summary.Fragment[] |
getFragments()
Returns an array of all of this summary's fragments. |
static Summary |
read(DataInput in)
|
void |
readFields(DataInput in)
|
String |
toHtml(boolean encode)
Returns a HTML representation of this Summary. |
String |
toString()
Returns a String representation of this Summary. |
static String[] |
toStrings(Summary[] summaries)
Helper method that return a String representation for each specified Summary. |
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Summary()
| Method Detail |
public void add(Summary.Fragment fragment)
public Summary.Fragment[] getFragments()
public String toString()
public String toHtml(boolean encode)
<span class="highlight">highlight's text</span>,
for Ellipsis fragments is
<span class="highlight"> ... </span>, for generic
Fragment is simply the fragment's text.
encode - specifies if the summary's entities should be encoded.public boolean equals(Object o)
public static String[] toStrings(Summary[] summaries)
public static Summary read(DataInput in)
throws IOException
IOException
public void write(DataOutput out)
throws IOException
write in interface WritableIOException
public void readFields(DataInput in)
throws IOException
readFields in interface WritableIOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||