Changeset 14941

Show
Ignore:
Timestamp:
11.01.2008 14:10:27 (12 years ago)
Author:
dmn
Message:

updates for qualified DC

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/downloaders/OAIDownload.pm

    r14926 r14941  
    5050    'type' => "string", 
    5151    'reqd' => "yes"}, 
     52      { 'name' => "metadata_prefix",  
     53    'disp' => "{OAIDownload.metadata_prefix_disp}", 
     54    'desc' => "{OAIDownload.metadata_prefix}", 
     55    'type' => "string", 
     56    'deft' => "oai_dc", 
     57    'reqd' => "no"}, 
    5258      { 'name' => "set",  
    5359    'disp' => "{OAIDownload.set_disp}", 
     
    166172    print STDERR  "Gathering OAI identifiers.....\n"; 
    167173 
    168     if($self->{'set'} ne "") 
    169     { 
    170     $cmdWget .= " -q -O - \"$strBasURL?verb=ListIdentifiers&metadataPrefix=oai_dc&set=$self->{'set'}\" "; 
    171     } 
    172     else 
    173     { 
    174     $cmdWget .= " -q -O - \"$strBasURL?verb=ListIdentifiers&metadataPrefix=oai_dc\" "; 
    175     } 
     174    my $metadata_prefix = $self->{'metadata_prefix'}; 
     175    $cmdWget .= " -q -O - \"$strBasURL?verb=ListIdentifiers&metadataPrefix=$metadata_prefix"; 
     176 
     177 
     178    # if $set specified, add it in to URL 
     179    my $set = $self->{'set'}; 
     180    $cmdWget .= "&set=$set" if ($set ne ""); 
     181 
     182    $cmdWget .= "\" "; 
    176183 
    177184  
     
    277284    my $intDocCounter = 0; 
    278285 
     286    my $metadata_prefix = $self->{'metadata_prefix'}; 
     287 
    279288    foreach my $strID ( @$aryIDs) 
    280289    { 
    281290    print  STDERR "Gathering OAI record with ID:$strID.....\n"; 
    282291        
    283     my $cmdWget= $strWgetOptions." -q -O - \"$strBasURL?verb=GetRecord&metadataPrefix=oai_dc&identifier=$strID\""; 
     292    my $cmdWget= $strWgetOptions." -q -O - \"$strBasURL?verb=GetRecord&metadataPrefix=$metadata_prefix&identifier=$strID\""; 
    284293 
    285294    my $strRecord =  $self->useWget($cmdWget);