public abstract class BasicDocMaker extends Object implements DocMaker
| Modifier and Type | Field and Description |
|---|---|
static String |
BODY_FIELD |
static String |
BYTES_FIELD |
protected Config |
config |
static String |
DATE_FIELD |
protected boolean |
forever |
static String |
ID_FIELD |
protected Field.Index |
indexVal |
static String |
NAME_FIELD |
protected Field.Store |
storeVal |
protected Field.TermVector |
termVecVal |
static String |
TITLE_FIELD |
| Constructor and Description |
|---|
BasicDocMaker() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBytes(long n) |
protected void |
addUniqueBytes(long n) |
protected void |
collectFiles(File f,
ArrayList inputFiles) |
long |
getByteCount()
Return total byte size of docs made since last reset.
|
int |
getCount()
Return number of docs made since last reset.
|
HTMLParser |
getHtmlParser()
Returns the htmlParser.
|
protected abstract DocData |
getNextDocData()
Return the data of the next document.
|
Document |
makeDocument()
Create the next document.
|
Document |
makeDocument(int size)
Create the next document, of the given size by input bytes.
|
long |
numUniqueBytes()
Return total bytes of all available unique texts, 0 if not applicable
|
void |
printDocStatistics()
Print some statistics on docs available/added/etc.
|
void |
resetInputs()
Reset inputs so that the test run would behave, input wise, as if it just started.
|
protected void |
resetUniqueBytes() |
void |
setConfig(Config config)
Set the properties
|
void |
setHTMLParser(HTMLParser htmlParser)
Set the html parser to use, when appropriate
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnumUniqueTextsprotected boolean forever
public static final String BODY_FIELD
public static final String TITLE_FIELD
public static final String DATE_FIELD
public static final String ID_FIELD
public static final String BYTES_FIELD
public static final String NAME_FIELD
protected Config config
protected Field.Store storeVal
protected Field.Index indexVal
protected Field.TermVector termVecVal
protected abstract DocData getNextDocData() throws NoMoreDataException, Exception
if - cannot create the next doc dataNoMoreDataException - if data is exhausted (and 'forever' set to false).Exceptionpublic Document makeDocument() throws Exception
DocMakermakeDocument in interface DocMakerExceptionpublic Document makeDocument(int size) throws Exception
DocMakermakeDocument in interface DocMakersize - size of document, or 0 if there is no size requirement.Exceptionpublic void setConfig(Config config)
DocMakerpublic void resetInputs()
DocMakerresetInputs in interface DocMakerpublic long numUniqueBytes()
DocMakernumUniqueBytes in interface DocMakerpublic int getCount()
DocMakerpublic long getByteCount()
DocMakergetByteCount in interface DocMakerprotected void addUniqueBytes(long n)
protected void resetUniqueBytes()
protected void addBytes(long n)
public void printDocStatistics()
DocMakerprintDocStatistics in interface DocMakerpublic void setHTMLParser(HTMLParser htmlParser)
DocMakersetHTMLParser in interface DocMakerpublic HTMLParser getHtmlParser()
DocMakergetHtmlParser in interface DocMakerCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.