|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.indexedfiles.FlatFileIndexWriter | +--uk.org.ogsadai.activity.indexedfiles.OMIMIndexWriter
Indexes OMIM data files.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private java.util.HashMap |
mFields
Fields (line types) that are being indexed |
Fields inherited from class uk.org.ogsadai.activity.indexedfiles.FlatFileIndexWriter |
DATA_FILE_NAME, DATA_LENGTH, DATA_OFFSET, mIndexWriter |
Constructor Summary | |
OMIMIndexWriter(org.apache.lucene.index.IndexWriter indexwriter)
|
Method Summary | |
java.lang.String[] |
getFields()
Gets the indexed fields. |
private void |
indexFile(java.io.File file,
java.lang.String relativePath)
Indexes a OMIM data file. |
void |
indexFiles(java.io.File[] files,
java.lang.String[] dirs)
Indexes an array of flat files. |
void |
setFields(java.lang.String[] fields)
Sets the fields for indexing |
Methods inherited from class uk.org.ogsadai.activity.indexedfiles.FlatFileIndexWriter |
getIndexWriter, setIndexWriter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private java.util.HashMap mFields
Constructor Detail |
public OMIMIndexWriter(org.apache.lucene.index.IndexWriter indexwriter)
Method Detail |
public void indexFiles(java.io.File[] files, java.lang.String[] dirs) throws java.io.FileNotFoundException, java.io.IOException
FlatFileIndexWriter
indexFiles
in class FlatFileIndexWriter
files
- An array of flat files to be indexeddirs
- Directories containing the files such
that files[i]
is located in
relativeDirectories[i]
.
java.io.FileNotFoundException
- If any file is not found.
java.io.IOException
- If there is a problem encountered when indexing a file.public java.lang.String[] getFields()
FlatFileIndexWriter
getFields
in class FlatFileIndexWriter
public void setFields(java.lang.String[] fields)
FlatFileIndexWriter
setFields
in class FlatFileIndexWriter
fields
- The fields that are being indexed.private void indexFile(java.io.File file, java.lang.String relativePath) throws java.io.FileNotFoundException, java.io.IOException
FIELD
line. Whenever the field name is contained in the fields known
to this object the field is stored in the index.
file
- The flat file to be indexedrelativePath
- The relative path of the data file
java.io.FileNotFoundException
- If the file is not found.
java.io.IOException
- If there is a problem encountered when indexing the file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |