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

it.tidalwave.bluebill.taxonomy.birds.ebn.italia.EbnItalia2003Generator 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: EbnItalia2003Generator.java,v d3b28eab0cdd 2010/08/01 20:17:04 fabrizio $
 *
 **********************************************************************************************************************/
package it.tidalwave.bluebill.taxonomy.birds.ebn.italia;

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

/***********************************************************************************************************************
 *
 * @author  Fabrizio Giudici
 * @version $Id: $
 *
 **********************************************************************************************************************/
public class EbnItalia2003Generator extends GeneratorSupport
  {
    public static final String TAXONOMY_NAME = "EBNItalia 2003";
    public static final String TAXONOMY_FILE_NAME = "EBNItalia2003";

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

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

    @Nonnull
    public BirdTaxonomyImporter run()
      throws Exception
      {
        final EbnItalia2003Importer importer = new EbnItalia2003Importer();
        importer.setCatalogueOfLifeTranslator(new DefaultTranslator(EbnItalia2003Importer.class, "EbnItalia2003ToCatalogueOfLifeTranslations.config"));
        importer.setBirdLocaleInfo(new EbnItaliaLocaleInfo("CrampBWPi_master_06_ITALIANO.csv"));
        importer.setIdentifierMapFile(new File(resourcesFolder, "artifacts/TaxonIdMap.txt.gz"));
        importer.setSourceResourceName("wpcl.csv");
        importer.run(repository, TAXONOMY_NAME, ID_TAXONOMY_PREFIX + "EBNItalia/2003");

        return importer;
      }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy