org.opensolaris.opengrok.search.context
Class Context

java.lang.Object
  extended by 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
 

Constructor Detail

Context

public Context(org.apache.lucene.search.Query query)
Constructs a context generator

Parameters:
query - the query to generate the result for
Method Detail

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 matched
out - to write the context
morePrefix - to link to more... page
path - path of the file
tags - format to highlight defs.
limit - should the number of matching lines be limited?
Returns:
Did it get any matching context?