|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExcerptProvider
ExcerptProvider
defines an interface to create an excerpt for
a matching node. The format of the excerpt is implementation specific.
Field Summary | |
---|---|
static Name |
REP_EXCERPT
Name of the rep:excerpt function. |
Method Summary | |
---|---|
String |
getExcerpt(NodeId id,
int maxFragments,
int maxFragmentSize)
Returns the XML excerpt for the node with id . |
void |
init(org.apache.lucene.search.Query query,
SearchIndex index)
Initializes this excerpt provider. |
Field Detail |
---|
static final Name REP_EXCERPT
Method Detail |
---|
void init(org.apache.lucene.search.Query query, SearchIndex index) throws IOException
query
- excerpts will be based on this query.index
- provides access to the search index.
IOException
- if an error occurs while initializing this excerpt
provider.String getExcerpt(NodeId id, int maxFragments, int maxFragmentSize) throws IOException
id
.
id
- a node id.maxFragments
- the maximum number of fragments to create.maxFragmentSize
- the maximum number of characters in a fragment.
null
if there is no node with
id
.
IOException
- if an error occurs while creating the excerpt.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |