Changeset 8913
- Timestamp:
- 2005-01-20T10:10:54+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/DSpacePlug.pm
r8891 r8913 90 90 my $primary_doc_lookup = { 'text/html' => '(?i)\.(gif|jpe?g|jpe|jpg|png|css)$' }; 91 91 92 my ($self); 92 # Important variation to regular plugin structure. Need to declare 93 # $self as global variable to file so XMLParser callback routines 94 # can access the content of the object. 95 my ($self); 96 93 97 sub new { 94 98 my $class = shift (@_); … … 119 123 }); 120 124 $self->{'parser'} = $parser; 121 122 125 $self->{'extra_blocks'} = {}; 123 126 124 127 return bless $self, $class; 125 128 } 126 127 129 128 130 sub get_default_process_exp { … … 254 256 # return 0 if $self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/; 255 257 256 #my $block_files = $self->{'img_blocks'}->{$filename};257 258 258 if ($filename !~ /dublin_core\.xml$/ || !-f $filename) { 259 259 return undef; … … 276 276 my ($doc_file_mimes, $assoc_file_mimes) = $self->read_content($dir, $only_first_doc, $first_inorder_ext, 277 277 $first_inorder_mime, $mimetype_list); 278 278 279 my $file_re = $self->filemime_list_to_re($doc_file_mimes); 279 280 … … 305 306 if (defined $pd_lookup) { 306 307 my $filter_re = $pd_lookup; 307 308 308 @$assoc_file_mimes = grep { $_->{'file'} !~ m/$filter_re/ } @$assoc_file_mimes; 309 309 } … … 314 314 315 315 } 316 316 317 317 $extrametadata->{$file_re} = $self->{'saved_metadata'}; 318 318 … … 369 369 if ($element eq "dublin_core") { 370 370 $self->{'saved_metadata'} = {}; 371 } 372 elsif ($element eq "dcvalue") { 371 } elsif ($element eq "dcvalue") { 373 372 my $metaname = $_{'element'}; 374 373 my $qualifier = $_{'qualifier'}; 375 374 if ($metaname ne "description") { 376 375 $metaname .= "^$qualifier" if ($qualifier ne "none"); 377 378 376 $self->{'metaname'} = "dc.\u$metaname"; 379 377 } … … 387 385 $self->{'metaname'} = ""; 388 386 } 389 390 387 } 391 388
Note:
See TracChangeset
for help on using the changeset viewer.