au.org.ala.names.search
Class DwcaNameIndexer

java.lang.Object
  extended by au.org.ala.names.search.ALANameIndexer
      extended by au.org.ala.names.search.DwcaNameIndexer

public class DwcaNameIndexer
extends ALANameIndexer

Create a name index from a DWCA. All the required names should exist in the supplied DWCA. The indexer will create a temporary index in order to generate the higher level classification and nested sets for the hierarchy

The main method uses the following options:

  • load - flag to indicate that only the load index should be created
  • search - flag to indicate that only the search index should be created
  • all - flag to indicate that both the load and search index should be created
  • irmng - optional param that is used to specify where the IRMNG dwca archive is located. When this is NOT provided no homonym index is created.
  • dwca - compulsory param that provides the unzipped location of the DWCA for the scientific names
  • target - optional param to provide the target location for the name matching index. This value will default to /data/namematching when not provided
  • tmp - optional param to provide the location for the temporary index. This value will default to /data/tmp/lucene/nmload when not provided
  • common - optional param to specify when the common name CSV file is located. When this is NOT provided no common name index is created.
  • Author:
    Natasha Quimby (natasha.quimby@csiro.au)

    Nested Class Summary
     
    Nested classes/interfaces inherited from class au.org.ala.names.search.ALANameIndexer
    ALANameIndexer.IndexField
     
    Field Summary
    protected static org.apache.commons.logging.Log log
               
     
    Constructor Summary
    DwcaNameIndexer()
               
     
    Method Summary
     void create(boolean loadingIndex, boolean sciIndex, java.lang.String indexDirectory, java.lang.String tmpLoadIndex, java.lang.String namesDwc, java.lang.String irmngDwc, java.lang.String commonNameFile)
              Creates the name matching index based on a complete list of names supplied in a single DwCA
    static void main(java.lang.String[] args)
               
     
    Methods inherited from class au.org.ala.names.search.ALANameIndexer
    addAdditionalName, commit, commit, createALAIndexDocument, createALAIndexDocument, createALASynonymDocument, createIndex, createIndex, createIndexWriter, createIrmngIndex, deleteName, getCommonNameDocument, getCommonNameDocument, getIndexDirectory, indexIrmngDwcA, init, setIndexDirectory
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    log

    protected static org.apache.commons.logging.Log log
    Constructor Detail

    DwcaNameIndexer

    public DwcaNameIndexer()
    Method Detail

    create

    public void create(boolean loadingIndex,
                       boolean sciIndex,
                       java.lang.String indexDirectory,
                       java.lang.String tmpLoadIndex,
                       java.lang.String namesDwc,
                       java.lang.String irmngDwc,
                       java.lang.String commonNameFile)
                throws java.lang.Exception
    Creates the name matching index based on a complete list of names supplied in a single DwCA

    Parameters:
    loadingIndex - True when the loading index should be created. This is necessary to generate the index, but you may wish to skip this step if it has be generated earlier
    sciIndex - True when the name matching index should be generated
    indexDirectory - The directory in which to create the name matching index
    tmpLoadIndex - The directory in which to create the temporary loading index
    namesDwc - The absolute path to the directory that contains the unzipped DWC archive to index
    irmngDwc - The absolute path to the directory that contains the unzipped IRMNG DWCA
    commonNameFile -
    Throws:
    java.lang.Exception

    main

    public static void main(java.lang.String[] args)


    Copyright © 2014. All Rights Reserved.