com.hrstc.lucene.query
Class QueryGenerator
java.lang.Object
com.hrstc.lucene.query.QueryGenerator
public class QueryGenerator
- extends java.lang.Object
- Author:
- Neil O. Rouben
Field Summary |
(package private) java.io.File |
file
|
static java.lang.String |
FLD_DESCRIPTION
|
static java.lang.String |
FLD_TITLE
|
(package private) java.io.File |
qFile
|
(package private) java.lang.String |
qFld
|
Constructor Summary |
QueryGenerator(java.lang.String[] args)
Creates a new instance of QueryGenerator |
Method Summary |
void |
generate()
Generates queries |
java.lang.String |
getQuery(java.io.BufferedReader reader)
|
java.lang.String |
getQueryFromDescription(java.io.BufferedReader reader)
Extracts field |
java.lang.String |
getQueryFromTitle(java.io.BufferedReader reader)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FLD_TITLE
public static final java.lang.String FLD_TITLE
- See Also:
- Constant Field Values
FLD_DESCRIPTION
public static final java.lang.String FLD_DESCRIPTION
- See Also:
- Constant Field Values
file
java.io.File file
qFile
java.io.File qFile
qFld
java.lang.String qFld
QueryGenerator
public QueryGenerator(java.lang.String[] args)
- Creates a new instance of QueryGenerator
generate
public void generate()
throws java.io.IOException
- Generates queries
- Parameters:
fld
- from which to extract query
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Parameters:
args
- the command line arguments
0 - fileName to the query file
1 - from which field to extract query (see static finals for options)
- Throws:
java.io.IOException
getQueryFromDescription
public java.lang.String getQueryFromDescription(java.io.BufferedReader reader)
throws java.io.IOException
- Extracts field
- Throws:
java.io.IOException
getQueryFromTitle
public java.lang.String getQueryFromTitle(java.io.BufferedReader reader)
throws java.io.IOException
- Throws:
java.io.IOException
getQuery
public java.lang.String getQuery(java.io.BufferedReader reader)
throws java.io.IOException
- Throws:
java.io.IOException