Changeset 20577
- Timestamp:
- 2009-09-10T10:50:05+12:00 (15 years ago)
- Location:
- gsdl/trunk/perllib/plugins
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm
r19759 r20577 146 146 } 147 147 148 # called if we are doing incremental building149 sub set_incremental {150 my $self = shift(@_);151 my ($incremental) = @_;152 153 $self->{'incremental'} = $incremental;154 }155 148 156 149 # return 1 if this class might recurse using $pluginfo -
gsdl/trunk/perllib/plugins/BasePlugin.pm
r20451 r20577 337 337 } 338 338 339 sub set_incremental {340 my $self = shift(@_);341 my ($incremental) = @_;342 343 $self->{'incremental'} = $incremental;344 }345 339 346 340 # this function should be overridden to return 1 … … 941 935 # can we process this file?? 942 936 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 937 943 938 return undef unless $self->can_process_this_file($filename_full_path); 944 939 -
gsdl/trunk/perllib/plugins/DirectoryPlugin.pm
r19623 r20577 148 148 149 149 150 # called if we are doing incremental building151 sub set_incremental {152 my $self = shift(@_);153 my ($incremental) = @_;154 155 $self->{'incremental'} = $incremental;156 }157 150 158 151 # return 1 if this class might recurse using $pluginfo … … 283 276 284 277 $block_hash->{'all_files'} = {} unless defined $block_hash->{'all_files'}; 278 $block_hash->{'metadata_files'} = {} unless defined $block_hash->{'metadata_files'}; 285 279 286 280 $block_hash->{'file_blocks'} = {} unless defined $block_hash->{'file_blocks'}; … … 597 591 } 598 592 599 600 593 if (defined $self->{'inf_timestamp'}) { 601 594 # Look to see if it's a completely new file … … 608 601 if (! -d $full_filename) { 609 602 if (!$block_hash->{'reindex_files'}->{$full_filename}) { 610 # filename has been around for longer than inf 603 # filename has been around for longer than inf_timestamp 611 604 print $outhandle "**** Skipping $subfile\n" if ($verbosity >3); 612 605 next; -
gsdl/trunk/perllib/plugins/MetadataXMLPlugin.pm
r19493 r20577 164 164 165 165 166 sub file_block_read { 167 my $self = shift (@_); 168 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_; 169 170 my $filename = &util::filename_cat($base_dir, $file); 171 if ($filename !~ /metadata\.xml$/ || !-f $filename) { 172 return undef; 173 } 174 175 $block_hash->{'metadata_files'}->{$filename} = 1; 176 177 return 1; 178 } 179 166 180 sub metadata_read 167 181 { … … 179 193 $self->{'metadata-filename'} = $filename; 180 194 195 181 196 my $outhandle = $self->{'outhandle'}; 182 197 … … 185 200 # add the file to the block list so that it won't be processed in read, as we will do all we can with it here 186 201 $block_hash->{'file_blocks'}->{$filename} = 1; 202 187 203 $self->{'metadataref'} = $extrametadata; 188 204 $self->{'metafileref'} = $extrametafile; -
gsdl/trunk/perllib/plugins/PrintInfo.pm
r16639 r20577 106 106 #sub init { 107 107 #} 108 109 110 sub set_incremental { 111 my $self = shift(@_); 112 my ($incremental_mode) = @_; 113 114 if (!defined $incremental_mode) { 115 $self->{'incremental'} = 0; 116 $self->{'incremental_mode'} = "none"; 117 } 118 elsif ($incremental_mode eq "none") { 119 $self->{'incremental'} = 0; 120 $self->{'incremental_mode'} = "none"; 121 } 122 else { 123 $self->{'incremental'} = 1; 124 $self->{'incremental_mode'} = $incremental_mode; 125 } 126 } 108 127 109 128 sub get_arguments
Note:
See TracChangeset
for help on using the changeset viewer.