Lines 38-44
BEGIN {
Link Here
|
38 |
GetMarcSubjects |
38 |
GetMarcSubjects |
39 |
GetMarcAuthors |
39 |
GetMarcAuthors |
40 |
GetMarcSeries |
40 |
GetMarcSeries |
41 |
GetMarcHosts |
|
|
42 |
GetMarcUrls |
41 |
GetMarcUrls |
43 |
GetUsedMarcStructure |
42 |
GetUsedMarcStructure |
44 |
GetXmlBiblio |
43 |
GetXmlBiblio |
Lines 1861-1913
sub GetMarcSeries {
Link Here
|
1861 |
return \@marcseries; |
1860 |
return \@marcseries; |
1862 |
} #end getMARCseriess |
1861 |
} #end getMARCseriess |
1863 |
|
1862 |
|
1864 |
=head2 GetMarcHosts |
|
|
1865 |
|
1866 |
$marchostsarray = GetMarcHosts($record,$marcflavour); |
1867 |
|
1868 |
Get all host records (773s MARC21, 461 UNIMARC) from the MARC record and returns them in an array. |
1869 |
|
1870 |
=cut |
1871 |
|
1872 |
sub GetMarcHosts { |
1873 |
my ( $record, $marcflavour ) = @_; |
1874 |
if (!$record) { |
1875 |
carp 'GetMarcHosts called on undefined record'; |
1876 |
return; |
1877 |
} |
1878 |
|
1879 |
my ( $tag,$title_subf,$bibnumber_subf,$itemnumber_subf); |
1880 |
$marcflavour ||="MARC21"; |
1881 |
if ( $marcflavour eq "MARC21" || $marcflavour eq "NORMARC" ) { |
1882 |
$tag = "773"; |
1883 |
$title_subf = "t"; |
1884 |
$bibnumber_subf ="0"; |
1885 |
$itemnumber_subf='9'; |
1886 |
} |
1887 |
elsif ($marcflavour eq "UNIMARC") { |
1888 |
$tag = "461"; |
1889 |
$title_subf = "t"; |
1890 |
$bibnumber_subf ="0"; |
1891 |
$itemnumber_subf='9'; |
1892 |
}; |
1893 |
|
1894 |
my @marchosts; |
1895 |
|
1896 |
foreach my $field ( $record->field($tag)) { |
1897 |
|
1898 |
my @fields_loop; |
1899 |
|
1900 |
my $hostbiblionumber = $field->subfield("$bibnumber_subf"); |
1901 |
my $hosttitle = $field->subfield($title_subf); |
1902 |
my $hostitemnumber=$field->subfield($itemnumber_subf); |
1903 |
push @fields_loop, { hostbiblionumber => $hostbiblionumber, hosttitle => $hosttitle, hostitemnumber => $hostitemnumber}; |
1904 |
push @marchosts, { MARCHOSTS_FIELDS_LOOP => \@fields_loop }; |
1905 |
|
1906 |
} |
1907 |
my $marchostsarray = \@marchosts; |
1908 |
return $marchostsarray; |
1909 |
} |
1910 |
|
1911 |
=head2 UpsertMarcSubfield |
1863 |
=head2 UpsertMarcSubfield |
1912 |
|
1864 |
|
1913 |
my $record = C4::Biblio::UpsertMarcSubfield($MARC::Record, $fieldTag, $subfieldCode, $subfieldContent); |
1865 |
my $record = C4::Biblio::UpsertMarcSubfield($MARC::Record, $fieldTag, $subfieldCode, $subfieldContent); |