|
Lines 1021-1027
sub BuildSummary {
Link Here
|
| 1021 |
# construct UNIMARC summary, that is quite different from MARC21 one |
1021 |
# construct UNIMARC summary, that is quite different from MARC21 one |
| 1022 |
# accepted form |
1022 |
# accepted form |
| 1023 |
foreach my $field ($record->field('2..')) { |
1023 |
foreach my $field ($record->field('2..')) { |
| 1024 |
push @authorized, { heading => $field->as_string('abcdefghijlmnopqrstuvwxyz'), field => $field->tag() }; |
1024 |
push @authorized, { |
|
|
1025 |
heading => $field->as_string('abcdefghijlmnopqrstuvwxyz'), |
| 1026 |
hemain => $field->subfield('a'), |
| 1027 |
field => $field->tag(), |
| 1028 |
}; |
| 1025 |
} |
1029 |
} |
| 1026 |
# rejected form(s) |
1030 |
# rejected form(s) |
| 1027 |
foreach my $field ($record->field('3..')) { |
1031 |
foreach my $field ($record->field('3..')) { |
|
Lines 1029-1035
sub BuildSummary {
Link Here
|
| 1029 |
} |
1033 |
} |
| 1030 |
foreach my $field ($record->field('4..')) { |
1034 |
foreach my $field ($record->field('4..')) { |
| 1031 |
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : ''; |
1035 |
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : ''; |
| 1032 |
push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() }; |
1036 |
push @seefrom, { |
|
|
1037 |
heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), |
| 1038 |
hemain => $field->subfield('a'), |
| 1039 |
type => 'seefrom', |
| 1040 |
field => $field->tag(), |
| 1041 |
}; |
| 1033 |
} |
1042 |
} |
| 1034 |
|
1043 |
|
| 1035 |
# see : |
1044 |
# see : |
|
Lines 1040-1045
sub BuildSummary {
Link Here
|
| 1040 |
field => $_->tag, |
1049 |
field => $_->tag, |
| 1041 |
type => $type, |
1050 |
type => $type, |
| 1042 |
heading => $heading, |
1051 |
heading => $heading, |
|
|
1052 |
hemain => $_->subfield('a'), |
| 1043 |
search => $heading, |
1053 |
search => $heading, |
| 1044 |
authid => $_->subfield('9'), |
1054 |
authid => $_->subfield('9'), |
| 1045 |
} |
1055 |
} |
|
Lines 1090-1098
sub BuildSummary {
Link Here
|
| 1090 |
$subfields_to_report = 'vxyz'; |
1100 |
$subfields_to_report = 'vxyz'; |
| 1091 |
} |
1101 |
} |
| 1092 |
if ($subfields_to_report) { |
1102 |
if ($subfields_to_report) { |
| 1093 |
push @authorized, { heading => $field->as_string($subfields_to_report), field => $tag }; |
1103 |
push @authorized, { |
|
|
1104 |
heading => $field->as_string($subfields_to_report), |
| 1105 |
hemain => $field->subfield( substr($subfields_to_report, 0, 1) ), |
| 1106 |
field => $tag, |
| 1107 |
}; |
| 1094 |
} else { |
1108 |
} else { |
| 1095 |
push @authorized, { heading => $field->as_string(), field => $tag }; |
1109 |
push @authorized, { |
|
|
1110 |
heading => $field->as_string(), |
| 1111 |
hemain => $field->subfield('a'), |
| 1112 |
field => $tag, |
| 1113 |
}; |
| 1096 |
} |
1114 |
} |
| 1097 |
} |
1115 |
} |
| 1098 |
foreach my $field ($record->field('4..')) { #See From |
1116 |
foreach my $field ($record->field('4..')) { #See From |
|
Lines 1103-1111
sub BuildSummary {
Link Here
|
| 1103 |
$type = 'earlier' if $type && $type ne 'n'; |
1121 |
$type = 'earlier' if $type && $type ne 'n'; |
| 1104 |
} |
1122 |
} |
| 1105 |
if ($type eq 'subfi') { |
1123 |
if ($type eq 'subfi') { |
| 1106 |
push @seefrom, { heading => $field->as_string($marc21subfields), type => ($field->subfield('i') || ''), field => $field->tag() }; |
1124 |
push @seefrom, { |
|
|
1125 |
heading => $field->as_string($marc21subfields), |
| 1126 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1127 |
type => ($field->subfield('i') || ''), |
| 1128 |
field => $field->tag(), |
| 1129 |
}; |
| 1107 |
} else { |
1130 |
} else { |
| 1108 |
push @seefrom, { heading => $field->as_string($marc21subfields), type => $type, field => $field->tag() }; |
1131 |
push @seefrom, { |
|
|
1132 |
heading => $field->as_string($marc21subfields), |
| 1133 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1134 |
type => $type, |
| 1135 |
field => $field->tag(), |
| 1136 |
}; |
| 1109 |
} |
1137 |
} |
| 1110 |
} |
1138 |
} |
| 1111 |
foreach my $field ($record->field('5..')) { #See Also |
1139 |
foreach my $field ($record->field('5..')) { #See Also |
|
Lines 1118-1135
sub BuildSummary {
Link Here
|
| 1118 |
if ($type eq 'subfi') { |
1146 |
if ($type eq 'subfi') { |
| 1119 |
push @seealso, { |
1147 |
push @seealso, { |
| 1120 |
heading => $field->as_string($marc21subfields), |
1148 |
heading => $field->as_string($marc21subfields), |
| 1121 |
type => $field->subfield('i'), |
1149 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1122 |
field => $field->tag(), |
1150 |
type => $field->subfield('i'), |
| 1123 |
search => $field->as_string($marc21subfields) || '', |
1151 |
field => $field->tag(), |
| 1124 |
authid => $field->subfield('9') || '' |
1152 |
search => $field->as_string($marc21subfields) || '', |
|
|
1153 |
authid => $field->subfield('9') || '' |
| 1125 |
}; |
1154 |
}; |
| 1126 |
} else { |
1155 |
} else { |
| 1127 |
push @seealso, { |
1156 |
push @seealso, { |
| 1128 |
heading => $field->as_string($marc21subfields), |
1157 |
heading => $field->as_string($marc21subfields), |
| 1129 |
type => $type, |
1158 |
hemain => $field->subfield( substr($marc21subfields, 0, 1) ), |
| 1130 |
field => $field->tag(), |
1159 |
type => $type, |
| 1131 |
search => $field->as_string($marc21subfields) || '', |
1160 |
field => $field->tag(), |
| 1132 |
authid => $field->subfield('9') || '' |
1161 |
search => $field->as_string($marc21subfields) || '', |
|
|
1162 |
authid => $field->subfield('9') || '' |
| 1133 |
}; |
1163 |
}; |
| 1134 |
} |
1164 |
} |
| 1135 |
} |
1165 |
} |
|
Lines 1157-1162
sub BuildSummary {
Link Here
|
| 1157 |
} |
1187 |
} |
| 1158 |
} |
1188 |
} |
| 1159 |
$summary{mainentry} = $authorized[0]->{heading}; |
1189 |
$summary{mainentry} = $authorized[0]->{heading}; |
|
|
1190 |
$summary{mainmainentry} = $authorized[0]->{hemain}; |
| 1160 |
$summary{authorized} = \@authorized; |
1191 |
$summary{authorized} = \@authorized; |
| 1161 |
$summary{notes} = \@notes; |
1192 |
$summary{notes} = \@notes; |
| 1162 |
$summary{seefrom} = \@seefrom; |
1193 |
$summary{seefrom} = \@seefrom; |