All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.tidalwave.bluebill.taxonomy.birds.aou.Aou7thGenerator Maven / Gradle / Ivy

There is a newer version: 1.0.18
Show newest version
/***********************************************************************************************************************
 *
 * blueBill Mobile - open source birdwatching
 * ==========================================
 *
 * Copyright (C) 2009, 2010 by Tidalwave s.a.s. (http://www.tidalwave.it)
 * http://bluebill.tidalwave.it/mobile/
 *
 ***********************************************************************************************************************
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 *
 ***********************************************************************************************************************
 *
 * $Id: Aou7thGenerator.java,v d3b28eab0cdd 2010/08/01 20:17:04 fabrizio $
 *
 **********************************************************************************************************************/
package it.tidalwave.bluebill.taxonomy.birds.aou;

import it.tidalwave.bluebill.taxonomy.birds.BirdTaxonomyImporter;
import it.tidalwave.bluebill.taxonomy.birds.DefaultTranslator;
import it.tidalwave.bluebill.taxonomy.birds.GeneratorSupport;
import java.io.File;
import javax.annotation.Nonnull;

/***********************************************************************************************************************
 *
 * @author  Fabrizio Giudici
 * @version $Id: $
 *
 **********************************************************************************************************************/
public class Aou7thGenerator extends GeneratorSupport
  {
    public static final String TAXONOMY_NAME = "AOU 7th edition";
    public static final String TAXONOMY_FILE_NAME = "AOU7th";

    public static void main (final @Nonnull String ... args)
      throws Exception
      {
        new Aou7thGenerator(args[0]).execute();
      }

    public Aou7thGenerator (final @Nonnull String baseDir)
      {
        super(baseDir, TAXONOMY_NAME, TAXONOMY_FILE_NAME);
      }

    @Nonnull
    public BirdTaxonomyImporter run()
      throws Exception
      {
        final Aou7thImporter importer = new Aou7thImporter();
        importer.setCatalogueOfLifeTranslator(new DefaultTranslator(Aou7thImporter.class, "Aou7thEditionToCatalogueOfLifeTranslations.config"));
        importer.setIdentifierMapFile(new File(resourcesFolder, "artifacts/TaxonIdMap.txt.gz"));
        importer.run(repository, taxonomyName);

        return importer;
      }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy