- Timestamp:
- 2009-02-17T15:36:44+13:00 (15 years ago)
- Location:
- gsdl/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/import.pl
r18507 r18528 197 197 'desc' => "{import.OIDmetadata}", 198 198 'type' => "metadata", 199 'deft' => "dc.Identifier", 199 # parsearg left "" as default 200 #'deft' => "dc.Identifier", 200 201 'reqd' => "no", 201 202 'modegli' => "2" }, … … 440 441 } 441 442 443 if ((!defined $OIDmetadata) || ($OIDmetadata eq "")) { 444 if (defined $collectcfg->{'OIDmetadata'}) { 445 $OIDmetadata = $collectcfg->{'OIDmetadata'}; 446 } else { 447 $OIDmetadata = "dc.Identifier"; # the default 448 } 449 } 450 442 451 if (defined $collectcfg->{'sortmeta'} && (!defined $sortmeta || $sortmeta eq "")) { 443 452 $sortmeta = $collectcfg->{'sortmeta'}; … … 575 584 576 585 if (!$removeold) { 586 587 &inexport::prime_doc_oid_count($archivedir); 588 589 577 590 # Can now work out which files were new, already existed, and have 578 591 # been deleted … … 620 633 &plugin::deinit($pluginfo, $processor); 621 634 635 # Store the value of OIDCount (used in doc.pm) so it can be 636 # restored correctly to this value on an incremental build 637 &inexport::store_doc_oid_count($archivedir); 638 622 639 # write out the archive information file 623 640 $processor->close_file_output() if $groupsize > 1; -
gsdl/trunk/perllib/colcfg.pm
r17109 r18528 80 80 q/archivedir|cachedir|builddir|removeold|/ . 81 81 q/textcompress|buildtype|no_text|keepold|gzip|/ . 82 q/verbosity|remove_empty_classifications|OIDtype| / .82 q/verbosity|remove_empty_classifications|OIDtype|OIDmetadata|/ . 83 83 q/groupsize|maxdocs|debug|mode|saveas|/ . 84 84 q/sortmeta|removesuffix|removeprefix|create_images|/ . … … 114 114 q/archivedir|cachedir|builddir|removeold|/ . 115 115 q/textcompress|buildtype|no_text|keepold|gzip|/ . 116 q/verbosity|remove_empty_classifications|OIDtype| /.116 q/verbosity|remove_empty_classifications|OIDtype|OIDmetadata|/. 117 117 q/groupsize|maxdocs|debug|mode|saveas|/ . 118 118 q/sortmeta|removesuffix|removeprefix|create_images|/ . -
gsdl/trunk/perllib/doc.pm
r18508 r18528 45 45 # classification 46 46 47 my$OIDcount = 0;47 our $OIDcount = 0; 48 48 49 49 sub new { -
gsdl/trunk/perllib/inexport.pm
r18508 r18528 32 32 use util; 33 33 use GDBMUtils; 34 35 36 sub prime_doc_oid_count 37 { 38 my ($archivedir) = @_; 39 my $oid_count_filename = &util::filename_cat ($archivedir, "OIDcount"); 40 41 if (-e $oid_count_filename) { 42 if (open(OIDIN,"<$oid_count_filename")) { 43 my $OIDcount = <OIDIN>; 44 chomp $OIDcount; 45 close(OIDIN); 46 47 $doc::OIDcount = $OIDcount; 48 } 49 else { 50 51 print STDERR "Warning: unable to read document OID count from $oid_count_filename\n"; 52 print STDERR "Setting value to 0\n"; 53 } 54 } 55 56 } 57 58 sub store_doc_oid_count 59 { 60 # Use the file "OIDcount" in the archives directory to record 61 # what value doc.pm got up to 62 63 my ($archivedir) = @_; 64 my $oid_count_filename = &util::filename_cat ($archivedir, "OIDcount"); 65 66 67 if (open(OIDOUT,">$oid_count_filename")) { 68 print OIDOUT $doc::OIDcount, "\n"; 69 70 close(OIDOUT); 71 } 72 else { 73 print STDERR "Warning: unable to store document OID count\n"; 74 } 75 } 76 77 34 78 35 79 sub new_vs_old_import_diff … … 160 204 161 205 if ($verbosity>1) { 162 print STDERR "$oid marked to be deleted from index on next buildcol.pl\n";206 print STDERR "$oid ($file) marked to be deleted from index on next buildcol.pl\n"; 163 207 } 164 208 $archive_info->set_status_info($oid,"D"); -
gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm
r18509 r18528 32 32 33 33 use util; 34 use doc; 34 35 use PrintInfo; 35 36 use plugin; … … 173 174 } 174 175 175 # we don't do any file blocking176 176 sub file_block_read { 177 177 178 178 my $self = shift (@_); 179 179 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_; 180 181 if ($file eq "OIDcount") { 182 my ($filename_full_path, $filename_no_path) 183 = &util::get_full_filenames($base_dir, $file); 184 $block_hash->{'file_blocks'}->{$filename_full_path} = 1; 185 return 1; 186 } 187 188 # otherwise, we don't do any file blocking 180 189 181 190 return undef; … … 287 296 } 288 297 298 289 299 # wasn't an archives directory, someone else will have to process it 290 300 return undef; -
gsdl/trunk/perllib/plugins/ReadXMLFile.pm
r18327 r18528 293 293 } 294 294 295 295 296 # Called at the beginning of the XML document. 296 297 sub xml_start_document { -
gsdl/trunk/perllib/plugouts/BasePlugout.pm
r18463 r18528 669 669 'assoc-files' => [] }; 670 670 671 my @reverse_lookups = ($source_filename);671 my %reverse_lookups = ( $source_filename => "1" ); 672 672 673 673 foreach my $assoc_file_rec (@{$doc_obj->get_assoc_files()}) { … … 687 687 } 688 688 689 push(@reverse_lookups,$real_filename);689 $reverse_lookups{$real_filename} = 1; 690 690 691 691 push(@{$oid_files->{'assoc-files'}},$full_afile); … … 715 715 chomp($doc_db_text); # remove trailing \n 716 716 717 ## 717 ##print STDERR "*** To set in db: \n\t$doc_db\n\t$oid\n\t$doc_db_text\n"; 718 718 &GDBMUtils::gdbmDatabaseSet($doc_db,$oid,$doc_db_text); 719 719 720 foreach my $rl ( @reverse_lookups) {720 foreach my $rl (keys %reverse_lookups) { 721 721 &GDBMUtils::gdbmDatabaseAppend($src_db,$rl,"<oid>$oid\n"); 722 722 }
Note:
See TracChangeset
for help on using the changeset viewer.