Changeset 19619


Ignore:
Timestamp:
05/27/09 13:58:48 (12 years ago)
Author:
kjdon
Message:

just look for a single mappign file, not for a list of them. collection version should override the main one. and use util::tidy_up_oid for assigned ids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/MARCXMLPlugin.pm

    r18900 r19619  
    117117    }
    118118
    119     # read in the metadata mapping files
    120     my $mm_files = &util::locate_config_files($self->{'metadata_mapping_file'});
    121 
    122 
    123     if (scalar(@$mm_files)==0)
     119    # read in the metadata mapping file
     120    my $mm_file = &util::locate_config_file($self->{'metadata_mapping_file'});
     121
     122    if (! defined $mm_file)
    124123    {
    125124    my $msg = "MARCXMLPlugin ERROR: Can't locate mapping file \"" .
     
    134133    }
    135134    else {
    136     $self->{'metadata_mapping'} = &marcmapping::parse_marc_metadata_mapping($mm_files, $outhandle);
     135    $self->{'metadata_mapping'} = &marcmapping::parse_marc_metadata_mapping($mm_file, $outhandle);
    137136    }
    138137
     
    426425    if (defined $identifier && $identifier ne "") {
    427426        $full_id = $identifier;
    428         $full_id =~ s/\.//g; #remove any periods
    429         if ($full_id =~ /^[\d]*$/) {
    430         $full_id = "D" . $full_id;
    431         print STDERR "OID only contains numbers, adding a D\n";
    432         }
     427        $full_id = &util::tidy_up_oid($full_id);
    433428    }
    434429    }
Note: See TracChangeset for help on using the changeset viewer.