- Timestamp:
- 2011-08-12T18:00:18+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugouts/DSpacePlugout.pm
r23824 r24402 61 61 my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 62 62 63 print STDERR "***** metadata prefix = \"", $self->{'metadata_prefix'}, "\"\n";63 # print STDERR "***** metadata prefix = \"", $self->{'metadata_prefix'}, "\"\n"; 64 64 65 65 return bless $self, $class; … … 89 89 my $metadata_hashmap = $doc_obj->get_metadata_hashmap($doc_obj->get_top_section(), 90 90 $metadata_prefix); 91 92 if(defined $metadata_prefix && $metadata_prefix ne "") { 93 # merge dc with any ex.dc 94 95 my $ex_dc_metadata_hashmap = $doc_obj->get_metadata_hashmap($doc_obj->get_top_section(), 96 "ex.dc"); 97 98 foreach my $metaname (keys %$ex_dc_metadata_hashmap) { 99 my $metaname_without_ex_prefix = $metaname; 100 $metaname_without_ex_prefix =~ s/^ex\.(.*)/$1/; # remove any ex from the ex.dc prefix 101 102 # if there's an ex.dc value for a metaname for which no dc 103 # value was assigned, put the ex.dc value into the hashmap 104 if(!defined $metadata_hashmap->{$metaname_without_ex_prefix}) { 105 $metadata_hashmap->{$metaname_without_ex_prefix} = []; 106 push(@{$metadata_hashmap->{$metaname_without_ex_prefix}},@{$ex_dc_metadata_hashmap->{$metaname}}); 107 } 108 } 109 110 } 91 111 92 112 foreach my $metaname (keys %$metadata_hashmap) { … … 217 237 218 238 my $metadata_prefix_list = $self->{'metadata_prefix'}; 219 print STDERR "***!! md prefix = $metadata_prefix_list\n";239 # print STDERR "***!! md prefix = $metadata_prefix_list\n"; 220 240 221 241 my @metadata_prefixes = split(/,\s*/,$metadata_prefix_list);
Note:
See TracChangeset
for help on using the changeset viewer.