Skip to content

Commit

Permalink
issue #544: Implementing MARC Update No. 37 (December 2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Nov 11, 2024
1 parent 1abcb5b commit 25d9f9d
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ private void initialize() {

setSubfieldsWithCardinality(
"a", "International Standard Serial Number", "NR",
"l", "ISSN-L", "NR",
"m", "Canceled ISSN-L", "R",
// "l", "ISSN-L", "NR",
// "m", "Canceled ISSN-L", "R",
"y", "Incorrect ISSN", "R",
"z", "Canceled ISSN", "R",
"0", "Authority record control number or standard number", "R",
"0", "Authority record control number or standard number", "NR",
"1", "Real World Object URI", "R",
"2", "Source", "NR",
"6", "Linkage", "NR",
Expand All @@ -82,13 +82,15 @@ private void initialize() {
.setFrbrFunctions(DiscoverySearch, DiscoveryIdentify, DiscoveryObtain)
.setCompilanceLevels("A", "A");

/* Obsolete
getSubfield("l")
.setBibframeTag("issnL")
.setCompilanceLevels("A", "A");
getSubfield("m")
.setMqTag("canceledIssnL")
.setCompilanceLevels("A", "A");
*/

getSubfield("y")
.setMqTag("incorrect")
Expand Down Expand Up @@ -124,7 +126,9 @@ private void initialize() {

setHistoricalSubfields(
"b", "Form of issue [OBSOLETE] [CAN/MARC only]",
"c", "Price [OBSOLETE] [CAN/MARC only]"
"c", "Price [OBSOLETE] [CAN/MARC only]",
"l", "ISSN-L [OBSOLETE, 2023]. Subfield $l was made obsolete in favor of recording ISSN-L in field 023.",
"m", "Canceled ISSN-L [OBSOLETE, 2023] Subfield $m was made obsolete in favor of recording canceled ISSN-L in field 023."
);

putVersionSpecificSubfields(MarcVersion.KBR, Arrays.asList(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package de.gwdg.metadataqa.marc.definition.tags.tags01x;

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
import de.gwdg.metadataqa.marc.definition.general.parser.LinkageParser;
import de.gwdg.metadataqa.marc.definition.general.parser.RecordControlNumberParser;
import de.gwdg.metadataqa.marc.definition.general.validator.ISSNValidator;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.structure.SubfieldDefinition;

import java.util.Arrays;

/**
* Cluster ISSN
* https://www.loc.gov/marc/bibliographic/bd023.html
*/
public class Tag023 extends DataFieldDefinition {

private static Tag023 uniqueInstance;

private Tag023() {
initialize();
postCreation();
}

public static Tag023 getInstance() {
if (uniqueInstance == null)
uniqueInstance = new Tag023();
return uniqueInstance;
}

private void initialize() {

tag = "023";
label = "Cluster ISSN";
mqTag = "ClusterIssn";
cardinality = Cardinality.Repeatable;
descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd020.html";
setCompilanceLevels("A", "A");

ind1 = new Indicator("Type of Cluster ISSN")
.setCodes(
"0", "ISSN-L",
"1", "ISSN-H"
);
ind2 = new Indicator();

setSubfieldsWithCardinality(
"a", "Cluster ISSN", "NR",
"y", "Incorrect Cluster ISSN", "R",
"z", "Canceled Cluster ISSN", "R",
"0", "Authority record control number or standard number", "NR",
"1", "Real World Object URI", "R",
"2", "Source", "NR",
"6", "Linkage", "NR",
"8", "Field link and sequence number", "R"
);
// TODO validation ISO 2108

getSubfield("6").setContentParser(LinkageParser.getInstance());

getSubfield("a")
.setBibframeTag("rdf:value")
.setValidator(ISSNValidator.getInstance());

getSubfield("y")
.setBibframeTag("acquisitionTerms")
.setValidator(ISSNValidator.getInstance());

getSubfield("z")
.setBibframeTag("canceledClusterISSN")
.setValidator(ISSNValidator.getInstance());

getSubfield("0")
.setMqTag("authorityRecordControlNumber")
.setContentParser(RecordControlNumberParser.getInstance());

getSubfield("1")
.setMqTag("uri");

getSubfield("2")
.setMqTag("source");
// TODO
// Code from: ISSN Manual, Annex 3: List of ISSN Centre codes [PDF, 199 KB].

getSubfield("6")
.setBibframeTag("linkage");

getSubfield("8")
.setMqTag("fieldLink");

putVersionSpecificSubfields(MarcVersion.KBR, Arrays.asList(
new SubfieldDefinition("*", "Link with identifier", "NR").setMqTag("link"),
new SubfieldDefinition("@", "Language of field", "NR").setMqTag("language"),
new SubfieldDefinition("#", "number/occurrence of field", "NR").setMqTag("number")
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ private void initialize() {

setSubfieldsWithCardinality(
"a", "Summary of accessibility", "NR",
"3", "Materials specified", "NR",
"6", "Linkage", "NR",
"8", "Field link and sequence number", "R"
);

getSubfield("a")
.setMqTag("summary");

getSubfield("3")
.setMqTag("materialsSpecified");

getSubfield("6")
.setBibframeTag("linkage")
.setContentParser(LinkageParser.getInstance());
Expand Down

0 comments on commit 25d9f9d

Please sign in to comment.