Skip to content

Commit

Permalink
Implementing MARC Update No. 38 (June 2024) #545
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Nov 11, 2024
1 parent a9c1d6d commit a0eca8a
Show file tree
Hide file tree
Showing 13 changed files with 130 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package de.gwdg.metadataqa.marc.definition.general.codelist;

import de.gwdg.metadataqa.marc.Utils;

/**
* Accessibility Content Source Codes
* https://www.loc.gov/standards/sourcelist/accessibility.html
*/
public class AccessibilityContentSourceCodes extends CodeList {

private void initialize() {
name = "Accessibility Content Source Codes";
url = "https://www.loc.gov/standards/sourcelist/accessibility.html";
codes = Utils.generateCodes(
"sapdv", "Schema.org Accessibility Properties for Discoverability Vocabulary (Accessibility Discoverability Vocabulary for Schema.org Community Group)"
);
indexCodes();
}

private static AccessibilityContentSourceCodes uniqueInstance;

private AccessibilityContentSourceCodes() {
initialize();
}

public static AccessibilityContentSourceCodes getInstance() {
if (uniqueInstance == null)
uniqueInstance = new AccessibilityContentSourceCodes();
return uniqueInstance;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ private void initialize() {
.setMqTag("heldByLAC")
.setFrbrFunctions(DiscoverySelect, DiscoveryObtain);

ind2 = new Indicator("Type, completeness, source of class/call number")
ind2 = new Indicator("Type, completeness, source of call/class number")
.setCodes(
"0", "LC-based call number assigned by LAC",
"1", "Complete LC class number assigned by LAC",
"2", "Incomplete LC class number assigned by LAC",
"3", "LC-based call number assigned by the contributing library",
"4", "Complete LC class number assigned by the contributing library",
"5", "Incomplete LC class number assigned by the contributing library",
"0", "LCC (or LCC-compatible) call number assigned by LAC",
"1", "Complete LCC (or LCC-compatible) class number assigned by LAC",
"2", "Incomplete LCC (or LCC-compatible) class number assigned by LAC",
"3", "LCC (or LCC-compatible) call number assigned by a Canadian organization other than LAC",
"4", "Complete LCC (or LCC-compatible) class number assigned by a Canadian organization other than LAC",
"5", "Incomplete LCC (or LCC-compatible) class number assigned by a Canadian organization other than LAC",
"6", "Other call number assigned by LAC",
"7", "Other class number assigned by LAC",
"8", "Other call number assigned by the contributing library",
"9", "Other class number assigned by the contributing library"
"8", "Other call number assigned by a Canadian organization other than LAC",
"9", "Other class number assigned by a Canadian organization other than LAC"
)
.setMqTag("type")
.setFrbrFunctions(ManagementIdentify, ManagementProcess);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
import de.gwdg.metadataqa.marc.definition.general.parser.RecordControlNumberParser;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.general.codelist.OrganizationCodes;
Expand Down Expand Up @@ -74,6 +75,8 @@ private void initialize() {
"b", "Item number", "NR",
"m", "Standard or optional designation", "NR",
"q", "Assigning agency", "NR",
"0", "Authority record control number or standard number", "R",
"1", "Real World Object URI", "R",
"2", "Edition information", "NR",
"6", "Linkage", "NR",
"7", "Data provenance", "R",
Expand Down Expand Up @@ -102,6 +105,13 @@ private void initialize() {
.setBibframeTag("source")
.setCompilanceLevels("O");

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

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

getSubfield("2")
.setBibframeTag("edition")
.setFrbrFunctions(ManagementIdentify, ManagementProcess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
import de.gwdg.metadataqa.marc.definition.general.parser.RecordControlNumberParser;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.general.codelist.OrganizationCodes;
Expand Down Expand Up @@ -54,6 +55,8 @@ private void initialize() {
"q", "Assigning agency", "NR",
"y", "Table sequence number for internal subarrangement or add table", "R",
"z", "Table identification", "R",
"0", "Authority record control number or standard number", "R",
"1", "Real World Object URI", "R",
"2", "Edition information", "NR",
"6", "Linkage", "NR",
"7", "Data provenance", "R",
Expand Down Expand Up @@ -87,6 +90,13 @@ private void initialize() {
getSubfield("z")
.setMqTag("tableId");

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

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

getSubfield("2")
.setMqTag("edition")
.setCompilanceLevels("M");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
import de.gwdg.metadataqa.marc.definition.general.codelist.AccessibilityContentSourceCodes;
import de.gwdg.metadataqa.marc.definition.general.codelist.CountryCodes;
import de.gwdg.metadataqa.marc.definition.general.parser.LinkageParser;
import de.gwdg.metadataqa.marc.definition.general.parser.RecordControlNumberParser;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.structure.SubfieldDefinition;
Expand Down Expand Up @@ -51,6 +54,8 @@ private void initialize() {
"c", "Visual assistive features", "R",
"d", "Auditory assistive features", "R",
"e", "Tactile assistive features", "R",
"0", "Authority record control number or standard number", "R",
"1", "Real World Object URI", "R",
"2", "Source", "NR",
"3", "Materials specified", "NR",
"6", "Linkage", "NR",
Expand All @@ -72,8 +77,16 @@ private void initialize() {
getSubfield("e")
.setMqTag("tactileAssistiveFeatures");

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

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

getSubfield("2")
.setBibframeTag("source");
.setBibframeTag("source")
.setCodeList(AccessibilityContentSourceCodes.getInstance());

getSubfield("3")
.setMqTag("materialsSpecified");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Arrays;

/**
* Numeric Designation of Musical Work
* Numeric Designation of Musical Work or Expression
* https://www.loc.gov/marc/bibliographic/bd383.html
*/
public class Tag383 extends DataFieldDefinition {
Expand All @@ -30,12 +30,18 @@ public static Tag383 getInstance() {

private void initialize() {
tag = "383";
label = "Numeric Designation of Musical Work";
label = "Numeric Designation of Musical Work or Expression";
cardinality = Cardinality.Repeatable;
descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd383.html";
setCompilanceLevels("O");

ind1 = new Indicator();
ind1 = new Indicator("Type of entity")
.setCodes(
" ", "No information provided",
"0", "Work",
"1", "Expression"
)
.setMqTag("typeOfEntity");
ind2 = new Indicator();

setSubfieldsWithCardinality(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
import de.gwdg.metadataqa.marc.definition.general.codelist.OrganizationCodes;
import de.gwdg.metadataqa.marc.definition.general.parser.LinkageParser;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
Expand Down Expand Up @@ -45,6 +46,7 @@ private void initialize() {

setSubfieldsWithCardinality(
"a", "Linking entry complexity note", "NR",
"5", "Institution to which field applies", "NR",
"6", "Linkage", "NR",
"8", "Field link and sequence number", "R"
);
Expand All @@ -55,6 +57,10 @@ private void initialize() {
.setMqTag("rdf:value")
.setCompilanceLevels("M");

getSubfield("5")
.setMqTag("institution")
.setCodeList(OrganizationCodes.getInstance());

getSubfield("6")
.setBibframeTag("linkage")
.setFrbrFunctions(ManagementIdentify, ManagementProcess)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.gwdg.metadataqa.marc.definition.tags.tags6xx;

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.general.codelist.RelatorCodes;
import de.gwdg.metadataqa.marc.definition.general.parser.RecordControlNumberParser;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
Expand All @@ -11,6 +12,8 @@

import java.util.Arrays;

import static de.gwdg.metadataqa.marc.definition.FRBRFunction.DiscoveryIdentify;

/**
* Subject Added Entry - Named Event
* https://www.loc.gov/marc/bibliographic/bd647.html
Expand Down Expand Up @@ -55,6 +58,7 @@ private void initialize() {
"a", "Named event", "NR",
"c", "Location of named event", "R",
"d", "Date of named event", "NR",
"e", "Relator term", "R",
"g", "Miscellaneous information", "R",
"v", "Form subdivision", "R",
"x", "General subdivision", "R",
Expand All @@ -64,6 +68,7 @@ private void initialize() {
"1", "Real World Object URI", "R",
"2", "Source of heading or term", "NR",
"3", "Materials specified", "NR",
"4", "Relationship", "R",
"6", "Linkage", "NR",
"8", "Field link and sequence number", "R"
);
Expand All @@ -79,6 +84,9 @@ private void initialize() {
getSubfield("d")
.setMqTag("date");

getSubfield("e")
.setMqTag("relatorTerm");

getSubfield("g")
.setMqTag("miscellaneous");

Expand Down Expand Up @@ -107,6 +115,10 @@ private void initialize() {
getSubfield("3")
.setMqTag("materialsSpecified");

getSubfield("4")
.setMqTag("relationship")
.setCodeList(RelatorCodes.getInstance());

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.gwdg.metadataqa.marc.EncodedValue;
import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.general.codelist.RelatorCodes;
import de.gwdg.metadataqa.marc.definition.general.parser.RecordControlNumberParser;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
Expand Down Expand Up @@ -72,6 +73,7 @@ private void initialize() {

setSubfieldsWithCardinality(
"a", "Chronological term", "NR",
"e", "Relator term", "R",
"v", "Form subdivision", "R",
"x", "General subdivision", "R",
"y", "Chronological subdivision", "R",
Expand All @@ -80,6 +82,7 @@ private void initialize() {
"1", "Real World Object URI", "R",
"2", "Source of heading or term", "NR",
"3", "Materials specified", "NR",
"4", "Relationship", "R",
"6", "Linkage", "NR",
"7", "Data provenance", "R",
"8", "Field link and sequence number", "R"
Expand All @@ -94,6 +97,9 @@ private void initialize() {
.setFrbrFunctions(DiscoverySearch, DiscoveryIdentify)
.setCompilanceLevels("M");

getSubfield("e")
.setMqTag("relatorTerm");

getSubfield("v")
.setBibframeTag("formGenre").setMqTag("formSubdivision")
.setFrbrFunctions(DiscoverySearch, DiscoveryIdentify)
Expand Down Expand Up @@ -132,6 +138,10 @@ private void initialize() {
.setFrbrFunctions(DiscoveryIdentify)
.setCompilanceLevels("O");

getSubfield("4")
.setMqTag("relationship")
.setCodeList(RelatorCodes.getInstance());

getSubfield("6")
.setBibframeTag("linkage")
.setFrbrFunctions(ManagementIdentify, ManagementProcess)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.gwdg.metadataqa.marc.definition.tags.tags76x;

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.general.codelist.OrganizationCodes;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
Expand Down Expand Up @@ -90,6 +91,7 @@ private void initialize() {
"z", "International Standard Book Number", "R",
"3", "Materials specified", "NR",
"4", "Relationship", "R",
"5", "Institution to which field applies", "NR",
"6", "Linkage", "NR",
"7", "Control subfield", "NR",
"8", "Field link and sequence number", "R"
Expand Down Expand Up @@ -213,6 +215,10 @@ private void initialize() {
.setCodeList(RelatorCodes.getInstance())
.setCompilanceLevels("O");

getSubfield("5")
.setMqTag("institution")
.setCodeList(OrganizationCodes.getInstance());

getSubfield("6")
.setBibframeTag("linkage")
.setFrbrFunctions(ManagementIdentify, ManagementProcess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.MarcVersion;
import de.gwdg.metadataqa.marc.definition.general.codelist.OrganizationCodes;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.general.Tag76xSubfield7PositionsGenerator;
Expand Down Expand Up @@ -89,6 +90,7 @@ private void initialize() {
"y", "CODEN designation", "NR",
"z", "International Standard Book Number", "R",
"4", "Relationship", "R",
"5", "Institution to which field applies", "NR",
"6", "Linkage", "NR",
"7", "Control subfield", "NR",
"8", "Field link and sequence number", "R"
Expand Down Expand Up @@ -200,6 +202,10 @@ private void initialize() {
.setCodeList(RelatorCodes.getInstance())
.setCompilanceLevels("O");

getSubfield("5")
.setMqTag("institution")
.setCodeList(OrganizationCodes.getInstance());

getSubfield("6")
.setBibframeTag("linkage")
.setFrbrFunctions(ManagementIdentify, ManagementProcess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private void initialize() {
"y", "CODEN designation", "NR",
"z", "International Standard Book Number", "R",
"4", "Relationship", "R",
"5", "Institution to which field applies", "NR",
"6", "Linkage", "NR",
"7", "Control subfield", "NR",
"8", "Field link and sequence number", "R"
Expand Down Expand Up @@ -195,6 +196,9 @@ private void initialize() {
.setCodeList(RelatorCodes.getInstance())
.setCompilanceLevels("O");

getSubfield("5")
.setMqTag("institution");

getSubfield("6")
.setBibframeTag("linkage")
.setFrbrFunctions(ManagementIdentify, ManagementProcess)
Expand Down
Loading

0 comments on commit a0eca8a

Please sign in to comment.