Lines 959-964
sub BuildSummary {
Link Here
|
959 |
'i' => 'subfi', |
959 |
'i' => 'subfi', |
960 |
't' => 'parent' |
960 |
't' => 'parent' |
961 |
); |
961 |
); |
|
|
962 |
my %unimarc_relation_from_code = ( |
963 |
g => 'broader', |
964 |
h => 'narrower', |
965 |
a => 'seealso', |
966 |
); |
962 |
my %thesaurus; |
967 |
my %thesaurus; |
963 |
$thesaurus{'1'}="Peuples"; |
968 |
$thesaurus{'1'}="Peuples"; |
964 |
$thesaurus{'2'}="Anthroponymes"; |
969 |
$thesaurus{'2'}="Anthroponymes"; |
Lines 1023-1061
sub BuildSummary {
Link Here
|
1023 |
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : ''; |
1028 |
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : ''; |
1024 |
push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() }; |
1029 |
push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() }; |
1025 |
} |
1030 |
} |
1026 |
# see : |
1031 |
|
1027 |
foreach my $field ($record->field('5..')) { |
1032 |
# see : |
1028 |
if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) { |
1033 |
@seealso = map { |
1029 |
push @seealso, { |
1034 |
my $type = $unimarc_relation_from_code{$_->subfield('5') || 'a'}; |
1030 |
heading => $field->as_string('abcdefgjxyz'), |
1035 |
my $heading = $_->as_string('abcdefgjxyz'); |
1031 |
type => 'broader', |
1036 |
{ |
1032 |
field => $field->tag(), |
1037 |
field => $_->tag, |
1033 |
search => $field->as_string('abcdefgjxyz'), |
1038 |
type => $type, |
1034 |
authid => $field->subfield('9') |
1039 |
heading => $heading, |
1035 |
}; |
1040 |
search => $heading, |
1036 |
} elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){ |
1041 |
authid => $_->subfield('9'), |
1037 |
push @seealso, { |
|
|
1038 |
heading => $field->as_string('abcdefgjxyz'), |
1039 |
type => 'narrower', |
1040 |
field => $field->tag(), |
1041 |
search => $field->as_string('abcdefgjxyz'), |
1042 |
authid => $field->subfield('9') |
1043 |
}; |
1044 |
} elsif ($field->subfield('a')) { |
1045 |
push @seealso, { |
1046 |
heading => $field->as_string('abcdefgxyz'), |
1047 |
type => 'seealso', |
1048 |
field => $field->tag(), |
1049 |
search => $field->as_string('abcdefgjxyz'), |
1050 |
authid => $field->subfield('9') |
1051 |
}; |
1052 |
} |
1042 |
} |
1053 |
} |
1043 |
} $record->field('5..'); |
1054 |
# // form |
1044 |
|
1055 |
foreach my $field ($record->field('7..')) { |
1045 |
# Other forms |
1056 |
my $lang = substr($field->subfield('8'),3,3); |
1046 |
@otherscript = map { { |
1057 |
push @otherscript, { lang => $lang, term => $field->subfield('a'), direction => 'ltr', field => $field->tag() }; |
1047 |
lang => $_->subfield('8') || '', |
1058 |
} |
1048 |
term => $_->subfield('a'), |
|
|
1049 |
direction => 'ltr', |
1050 |
field => $_->tag, |
1051 |
} } $record->field('7..'); |
1052 |
|
1059 |
} else { |
1053 |
} else { |
1060 |
# construct MARC21 summary |
1054 |
# construct MARC21 summary |
1061 |
# FIXME - looping over 1XX is questionable |
1055 |
# FIXME - looping over 1XX is questionable |