Changeset 14948 for gsdl/trunk/perllib/downloaders/OAIDownload.pm
- Timestamp:
- 2008-01-24T22:07:55+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/downloaders/OAIDownload.pm
r14941 r14948 121 121 my ($hashGeneralOptions) = @_; 122 122 123 print STDERR "here2";123 ## print STDERR "here2"; 124 124 125 125 $strWgetOptions = $self->getWgetOptions(); … … 175 175 $cmdWget .= " -q -O - \"$strBasURL?verb=ListIdentifiers&metadataPrefix=$metadata_prefix"; 176 176 177 178 177 # if $set specified, add it in to URL 179 178 my $set = $self->{'set'}; … … 182 181 $cmdWget .= "\" "; 183 182 184 183 my $accumulated_strIDs = ""; 185 184 my $strIDs = $self->useWget($cmdWget); 186 185 … … 192 191 193 192 print STDERR "<<Download Information>>\n"; 194 193 195 194 $self->parse_xml($strIDs); 196 195 197 return $strIDs; 196 $accumulated_strIDs = $strIDs; 197 198 while ($strIDs =~ m/<resumptionToken.*?>(.*?)<\/resumptionToken>/s) { 199 # top up list with further requests for IDs 200 201 my $resumption_token = $1; 202 203 $cmdWget = $wgetOptions; 204 205 $cmdWget .= " -q -O - \"$strBasURL?verb=ListIdentifiers&resumptionToken=$resumption_token\""; 206 207 $strIDs = $self->useWget($cmdWget); 208 209 $self->parse_xml($strIDs); 210 211 $accumulated_strIDs .= $strIDs; 212 213 my @accumulated_identifiers 214 = ($accumulated_strIDs =~ m/<identifier>(.*?)<\/identifier>/sg); 215 216 my $num_acc_identifiers = scalar(@accumulated_identifiers); 217 if ($num_acc_identifiers > $self->{'max_records'}) { 218 last; 219 } 220 } 221 222 return $accumulated_strIDs; 198 223 } 199 224
Note:
See TracChangeset
for help on using the changeset viewer.