|
Lines 953-959
sub BuildSummary {
Link Here
|
| 953 |
# construct UNIMARC summary, that is quite different from MARC21 one |
953 |
# construct UNIMARC summary, that is quite different from MARC21 one |
| 954 |
# accepted form |
954 |
# accepted form |
| 955 |
foreach my $field ($record->field('2..')) { |
955 |
foreach my $field ($record->field('2..')) { |
| 956 |
push @authorized, { heading => $field->as_string('abcdefghijlmnopqrstuvwxyz'), field => $field->tag() }; |
956 |
push @authorized, { |
|
|
957 |
heading => $field->as_string('abcdefghijlmnopqrstuvwxyz'), |
| 958 |
hemain => $field->subfield('a'), |
| 959 |
field => $field->tag(), |
| 960 |
}; |
| 957 |
} |
961 |
} |
| 958 |
# rejected form(s) |
962 |
# rejected form(s) |
| 959 |
foreach my $field ($record->field('3..')) { |
963 |
foreach my $field ($record->field('3..')) { |
|
Lines 961-967
sub BuildSummary {
Link Here
|
| 961 |
} |
965 |
} |
| 962 |
foreach my $field ($record->field('4..')) { |
966 |
foreach my $field ($record->field('4..')) { |
| 963 |
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : ''; |
967 |
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : ''; |
| 964 |
push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() }; |
968 |
push @seefrom, { |
|
|
969 |
heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), |
| 970 |
hemain => $field->subfield('a'), |
| 971 |
type => 'seefrom', |
| 972 |
field => $field->tag(), |
| 973 |
}; |
| 965 |
} |
974 |
} |
| 966 |
|
975 |
|
| 967 |
# see : |
976 |
# see : |
|
Lines 972-977
sub BuildSummary {
Link Here
|
| 972 |
field => $_->tag, |
981 |
field => $_->tag, |
| 973 |
type => $type, |
982 |
type => $type, |
| 974 |
heading => $heading, |
983 |
heading => $heading, |
|
|
984 |
hemain => $_->subfield('a'), |
| 975 |
search => $heading, |
985 |
search => $heading, |
| 976 |
authid => $_->subfield('9'), |
986 |
authid => $_->subfield('9'), |
| 977 |
} |
987 |
} |
|
Lines 1022-1030
sub BuildSummary {
Link Here
|
| 1022 |
$subfields_to_report = 'vxyz'; |
1032 |
$subfields_to_report = 'vxyz'; |
| 1023 |
} |
1033 |
} |
| 1024 |
if ($subfields_to_report) { |
1034 |
if ($subfields_to_report) { |
| 1025 |
push @authorized, { heading => $field->as_string($subfields_to_report), field => $tag }; |
1035 |
push @authorized, { |
|
|
1036 |
heading => $field->as_string($subfields_to_report), |
| 1037 |
hemain => $field->subfield( substr($subfields_to_report, 0, 1) ), |
| 1038 |
field => $tag, |
| 1039 |
}; |
| 1026 |
} else { |
1040 |
} else { |
| 1027 |
push @authorized, { heading => $field->as_string(), field => $tag }; |
1041 |
push @authorized, { |
|
|
1042 |
heading => $field->as_string(), |
| 1043 |
hemain => $field->subfield('a'), |
| 1044 |
field => $tag, |
| 1045 |
}; |
| 1028 |
} |
1046 |
} |
| 1029 |
} |
1047 |
} |
| 1030 |
foreach my $field ($record->field('4..')) { #See From |
1048 |
foreach my $field ($record->field('4..')) { #See From |
|
Lines 1035-1043
sub BuildSummary {
Link Here
|
| 1035 |
$type = 'earlier' if $type && $type ne 'n'; |
1053 |
$type = 'earlier' if $type && $type ne 'n'; |
| 1036 |
} |
1054 |
} |
| 1037 |
if ($type eq 'subfi') { |
1055 |
if ($type eq 'subfi') { |
| 1038 |
push @seefrom, { heading => $field->as_string($marc21subfields), type => ($field->subfield('i') || ''), field => $field->tag() }; |
1056 |
push @seefrom, { |
|
|
1057 |
heading => $field->as_string($marc21subfields), |
| 1058 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1059 |
type => ($field->subfield('i') || ''), |
| 1060 |
field => $field->tag(), |
| 1061 |
}; |
| 1039 |
} else { |
1062 |
} else { |
| 1040 |
push @seefrom, { heading => $field->as_string($marc21subfields), type => $type, field => $field->tag() }; |
1063 |
push @seefrom, { |
|
|
1064 |
heading => $field->as_string($marc21subfields), |
| 1065 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1066 |
type => $type, |
| 1067 |
field => $field->tag(), |
| 1068 |
}; |
| 1041 |
} |
1069 |
} |
| 1042 |
} |
1070 |
} |
| 1043 |
foreach my $field ($record->field('5..')) { #See Also |
1071 |
foreach my $field ($record->field('5..')) { #See Also |
|
Lines 1050-1067
sub BuildSummary {
Link Here
|
| 1050 |
if ($type eq 'subfi') { |
1078 |
if ($type eq 'subfi') { |
| 1051 |
push @seealso, { |
1079 |
push @seealso, { |
| 1052 |
heading => $field->as_string($marc21subfields), |
1080 |
heading => $field->as_string($marc21subfields), |
| 1053 |
type => $field->subfield('i'), |
1081 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1054 |
field => $field->tag(), |
1082 |
type => $field->subfield('i'), |
| 1055 |
search => $field->as_string($marc21subfields) || '', |
1083 |
field => $field->tag(), |
| 1056 |
authid => $field->subfield('9') || '' |
1084 |
search => $field->as_string($marc21subfields) || '', |
|
|
1085 |
authid => $field->subfield('9') || '' |
| 1057 |
}; |
1086 |
}; |
| 1058 |
} else { |
1087 |
} else { |
| 1059 |
push @seealso, { |
1088 |
push @seealso, { |
| 1060 |
heading => $field->as_string($marc21subfields), |
1089 |
heading => $field->as_string($marc21subfields), |
| 1061 |
type => $type, |
1090 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1062 |
field => $field->tag(), |
1091 |
type => $type, |
| 1063 |
search => $field->as_string($marc21subfields) || '', |
1092 |
field => $field->tag(), |
| 1064 |
authid => $field->subfield('9') || '' |
1093 |
search => $field->as_string($marc21subfields) || '', |
|
|
1094 |
authid => $field->subfield('9') || '' |
| 1065 |
}; |
1095 |
}; |
| 1066 |
} |
1096 |
} |
| 1067 |
} |
1097 |
} |
|
Lines 1089-1094
sub BuildSummary {
Link Here
|
| 1089 |
} |
1119 |
} |
| 1090 |
} |
1120 |
} |
| 1091 |
$summary{mainentry} = $authorized[0]->{heading}; |
1121 |
$summary{mainentry} = $authorized[0]->{heading}; |
|
|
1122 |
$summary{mainmainentry} = $authorized[0]->{hemain}; |
| 1092 |
$summary{authorized} = \@authorized; |
1123 |
$summary{authorized} = \@authorized; |
| 1093 |
$summary{notes} = \@notes; |
1124 |
$summary{notes} = \@notes; |
| 1094 |
$summary{seefrom} = \@seefrom; |
1125 |
$summary{seefrom} = \@seefrom; |