|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.org.ala.names.search.ALANameIndexer
public class ALANameIndexer
Creates the Lucene index based on the names that are exported from http://code.google.com/p/ala-portal/source/browse/trunk/ala-names-generator/src/main/resources/create-dumps.sql
| Nested Class Summary | |
|---|---|
static class |
ALANameIndexer.IndexField
|
| Constructor Summary | |
|---|---|
ALANameIndexer()
|
|
| Method Summary | |
|---|---|
void |
addAdditionalName(java.lang.String lsid,
java.lang.String scientificName,
java.lang.String author,
LinnaeanRankClassification cl)
|
void |
commit()
|
void |
commit(boolean close,
boolean merge)
|
org.apache.lucene.document.Document |
createALAIndexDocument(java.lang.String name,
java.lang.String id,
java.lang.String lsid,
java.lang.String author,
LinnaeanRankClassification cl)
|
org.apache.lucene.document.Document |
createALAIndexDocument(java.lang.String name,
java.lang.String id,
java.lang.String lsid,
java.lang.String author,
java.lang.String rank,
java.lang.String rankId,
java.lang.String left,
java.lang.String right,
LinnaeanRankClassification cl)
|
protected org.apache.lucene.document.Document |
createALASynonymDocument(java.lang.String scientificName,
java.lang.String author,
java.lang.String id,
java.lang.String lsid,
java.lang.String nameLsid,
java.lang.String acceptedLsid,
java.lang.String acceptedId,
float boost,
java.lang.String synonymType)
|
void |
createIndex(java.lang.String exportsDir,
java.lang.String indexDir,
boolean generateSciNames,
boolean generateCommonNames)
Creates the index from the specified checklist bank names usage export file into the specified index directory. |
void |
createIndex(java.lang.String exportsDir,
java.lang.String indexDir,
java.lang.String acceptedFile,
java.lang.String synonymFile,
java.lang.String irmngDwca,
boolean generateSciNames,
boolean generateCommonNames)
|
protected org.apache.lucene.index.IndexWriter |
createIndexWriter(java.io.File directory,
org.apache.lucene.analysis.Analyzer analyzer,
boolean replace)
Creates an index writer in the specified directory. |
void |
createIrmngIndex(java.lang.String exportsDir,
java.lang.String indexDir)
Creates the IRMNG homonym index based on the DWCA and species homonyms supplied from the NSL |
void |
deleteName(java.lang.String lsid)
Deletes the entry that has the supplied lsid. |
protected org.apache.lucene.document.Document |
getCommonNameDocument(java.lang.String cn,
java.lang.String sn,
java.lang.String lsid,
float boost)
|
protected org.apache.lucene.document.Document |
getCommonNameDocument(java.lang.String cn,
java.lang.String sn,
java.lang.String lsid,
float boost,
boolean checkAccepted)
|
java.lang.String |
getIndexDirectory()
|
protected void |
indexIrmngDwcA(org.apache.lucene.index.IndexWriter iw,
java.lang.String archiveDirectory)
Indexes the IRMNG homonyms from the supplied DWCA direcory |
void |
init()
|
static void |
main(java.lang.String[] args)
Generates the Lucene index required for the name matching API. |
void |
setIndexDirectory(java.lang.String indexDirectory)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ALANameIndexer()
| Method Detail |
|---|
public void init()
throws java.lang.Exception
java.lang.Exception
public void createIndex(java.lang.String exportsDir,
java.lang.String indexDir,
boolean generateSciNames,
boolean generateCommonNames)
throws java.lang.Exception
exportsDir - The directory that contains the exports that are necesary to generate the index.indexDir - The directory in which the 2 indices will be created.generateSciNames - true when the scientific name index should be createdgenerateCommonNames - true when the common name index should be generated
java.lang.Exception
public void createIrmngIndex(java.lang.String exportsDir,
java.lang.String indexDir)
throws java.lang.Exception
exportsDir - indexDir -
java.lang.Exception
public void createIndex(java.lang.String exportsDir,
java.lang.String indexDir,
java.lang.String acceptedFile,
java.lang.String synonymFile,
java.lang.String irmngDwca,
boolean generateSciNames,
boolean generateCommonNames)
throws java.lang.Exception
java.lang.Exception
protected org.apache.lucene.index.IndexWriter createIndexWriter(java.io.File directory,
org.apache.lucene.analysis.Analyzer analyzer,
boolean replace)
throws java.lang.Exception
directory - analyzer -
java.lang.Exception
public void addAdditionalName(java.lang.String lsid,
java.lang.String scientificName,
java.lang.String author,
LinnaeanRankClassification cl)
throws java.lang.Exception
java.lang.Exception
public void deleteName(java.lang.String lsid)
throws java.lang.Exception
lsid -
java.lang.Exception
public void commit()
throws java.lang.Exception
java.lang.Exception
public void commit(boolean close,
boolean merge)
throws java.lang.Exception
merge - whether or not to merge the indexclose - whether or not to close the index
java.lang.Exception
protected void indexIrmngDwcA(org.apache.lucene.index.IndexWriter iw,
java.lang.String archiveDirectory)
throws java.lang.Exception
iw - The index writer to write the lucene docs toarchiveDirectory - The directory in which the IRMNG DWCA has been unzipped.
java.lang.Exception
protected org.apache.lucene.document.Document getCommonNameDocument(java.lang.String cn,
java.lang.String sn,
java.lang.String lsid,
float boost)
protected org.apache.lucene.document.Document getCommonNameDocument(java.lang.String cn,
java.lang.String sn,
java.lang.String lsid,
float boost,
boolean checkAccepted)
public org.apache.lucene.document.Document createALAIndexDocument(java.lang.String name,
java.lang.String id,
java.lang.String lsid,
java.lang.String author,
LinnaeanRankClassification cl)
public org.apache.lucene.document.Document createALAIndexDocument(java.lang.String name,
java.lang.String id,
java.lang.String lsid,
java.lang.String author,
java.lang.String rank,
java.lang.String rankId,
java.lang.String left,
java.lang.String right,
LinnaeanRankClassification cl)
protected org.apache.lucene.document.Document createALASynonymDocument(java.lang.String scientificName,
java.lang.String author,
java.lang.String id,
java.lang.String lsid,
java.lang.String nameLsid,
java.lang.String acceptedLsid,
java.lang.String acceptedId,
float boost,
java.lang.String synonymType)
public java.lang.String getIndexDirectory()
public void setIndexDirectory(java.lang.String indexDirectory)
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||