Changeset 12691


Ignore:
Timestamp:
2006-09-06T16:36:47+12:00 (18 years ago)
Author:
kjdon
Message:

added OIDtype and OIDmetadata to the option list. it was using OIDtype anyway, just not allowing it as an option. added assigned and dirname to the options.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/export.pl

    r12598 r12691  
    6161my $oidtype_list =
    6262    [ { 'name' => "hash",
    63         'desc' => "{export.OIDtype.hash}" },
     63        'desc' => "{import.OIDtype.hash}" },
    6464      { 'name' => "incremental",
    65         'desc' => "{export.OIDtype.incremental}" } ];
     65        'desc' => "{import.OIDtype.incremental}" },
     66      { 'name' => "assigned",
     67        'desc' => "{import.OIDtype.assigned}" },
     68      { 'name' => "dirname",
     69        'desc' => "{import.OIDtype.dirname}" } ];
    6670
    6771#** define to use the METS format or DSpace format
     
    121125        'hiddengli' => "yes" },
    122126      { 'name' => "listall",
    123     'desc' => "{scripts.listall}",
     127    'desc' => "{export.listall}",
    124128    'type' => "flag",
    125129    'reqd' => "no" },
     
    156160    'range' => "1,",
    157161    'modegli' => "1" },
     162      { 'name' => "OIDtype",
     163    'desc' => "{import.OIDtype}",
     164    'type' => "enum",
     165    'list' => $oidtype_list,
     166    # parsearg left "" as default
     167    #'deft' => "hash",
     168    'reqd' => "no",
     169    'modegli' => "3" },
     170      { 'name' => "OIDmetadata",
     171    'desc' => "{import.OIDmetadata}",
     172    'type' => "metadata",
     173    'deft' => "dc.Identifier",
     174    'reqd' => "no",
     175    'modegli' => "3" },
    158176      { 'name' => "out",
    159177    'desc' => "{export.out}",
     
    231249    # params
    232250    my ($language, $verbosity, $importdir, $exportdir, $keepold, $listall,
    233     $removeold, $saveas, $saveas_version, $debug,
     251    $removeold, $saveas, $saveas_version, $debug, $OIDtype, $OIDmetadata,
    234252    $maxdocs, $statsfile, $xsltfile, $mapping_file, $out, $faillog, $collectdir, $gli,$xslt_mets,$xslt_txt,$group_marc);
    235253    my $xml = 0;
     
    260278    my $gzip = undef;
    261279    my $groupsize = 1;
    262     my $OIDtype = undef;
     280    #my $OIDtype = undef;
    263281    my $sortmeta = undef;
    264282
     
    388406        }
    389407        }
    390         if (!defined $OIDtype || ($OIDtype !~ /^(hash|incremental)$/)) {
     408        if (!defined $OIDtype || ($OIDtype !~ /^(hash|incremental|assigned|dirname)$/)) {
    391409        if (defined $collectcfg->{'OIDtype'} && $collectcfg->{'OIDtype'} =~ /^(hash|incremental)$/) {
    392410            $OIDtype = $collectcfg->{'OIDtype'};
     
    441459        # read the export information file
    442460        if (!$debug) {
    443         # Export to DSpace Arhive format or METs format
     461        # Export to DSpace Archive format or METs format
    444462        # If saveas=DSpace, a "contents" file will be created, otherwise "export.inf"
    445463       
     
    470488            $plugout_name = $saveas;
    471489        }
    472              
    473           my $opts=[];
    474 
    475              
    476           push @$opts,("-output_info",$export_info) if (defined $export_info);
     490       
     491        my $opts=[];
     492       
     493       
     494        push @$opts,("-output_info",$export_info) if (defined $export_info);
    477495
    478496            push @$opts,("-verbosity",$verbosity) if (defined $verbosity);
     
    492510       
    493511        $processor->set_sortmeta ($sortmeta) if defined $sortmeta;
    494         $processor->set_OIDtype ($OIDtype);
     512        $processor->set_OIDtype ($OIDtype, $OIDmetadata);
    495513   
    496514        } else {
Note: See TracChangeset for help on using the changeset viewer.