org.opensolaris.opengrok.search.context
Class Context
java.lang.Object
org.opensolaris.opengrok.search.context.Context
public class Context
- extends java.lang.Object
Constructor Summary |
Context(org.apache.lucene.search.Query query)
Constructs a context generator |
Method Summary |
boolean |
getContext(java.io.Reader in,
java.io.Writer out,
java.lang.String urlPrefix,
java.lang.String morePrefix,
java.lang.String path,
Definitions tags,
boolean limit,
java.util.List<Hit> hits)
|
boolean |
isEmpty()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Context
public Context(org.apache.lucene.search.Query query)
- Constructs a context generator
- Parameters:
query
- the query to generate the result for
isEmpty
public boolean isEmpty()
getContext
public boolean getContext(java.io.Reader in,
java.io.Writer out,
java.lang.String urlPrefix,
java.lang.String morePrefix,
java.lang.String path,
Definitions tags,
boolean limit,
java.util.List<Hit> hits)
- Parameters:
in
- File to be matchedout
- to write the contextmorePrefix
- to link to more... pagepath
- path of the filetags
- format to highlight defs.limit
- should the number of matching lines be limited?
- Returns:
- Did it get any matching context?