lib/dwc-archive.rb in dwc-archive-0.4.2 vs lib/dwc-archive.rb in dwc-archive-0.4.3

- old
+ new

@@ -23,10 +23,13 @@ require 'dwc-archive/generator_meta_xml' require 'dwc-archive/generator_eml_xml' require 'dwc-archive/classification_normalizer' class DarwinCore + + VERSION = open(File.join(File.dirname(__FILE__), '..', 'VERSION')).readline.strip + attr_reader :archive, :core, :metadata, :extensions alias :eml :metadata DEFAULT_TMP_DIR = "/tmp" @@ -50,12 +53,12 @@ @metadata = DarwinCore::Metadata.new(@archive) @extensions = get_extensions end # generates a hash from a classification data with path to each node, list of synonyms and vernacular names. - def normalize_classification + def normalize_classification(verbose = false) return nil unless has_parent_id? - DarwinCore::ClassificationNormalizer.new(self).normalize + DarwinCore::ClassificationNormalizer.new(self, verbose).normalize end def has_parent_id? !!@core.fields.join('|').downcase.match(/highertaxonid|parentnameusageid/) end