Skip to content

Commit

Permalink
Implementing MARC Update No. 33 (November 2021) #330
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Oct 23, 2023
1 parent ec48172 commit 7f065aa
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

## v0.8.0

- [\#326](https://github.com/pkiraly/metadata-qa-marc/issues/326) Use GETOPT for the command line scripts
- [\#326](https://github.com/pkiraly/qa-catalogue/issues/326) Use GETOPT for the command line scripts
- [\#103](https://github.com/pkiraly/qa-catalogue/issues/103) Implementing MARC Update No. 31, December 2020
- [\#104](https://github.com/pkiraly/qa-catalogue/issues/104) Implementing MARC Update No. 32, June 2021
- [\#330](https://github.com/pkiraly/qa-catalogue/issues/330) Implementing MARC Update No. 33 (November 2021)

## v0.5.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import static de.gwdg.metadataqa.marc.definition.FRBRFunction.UseOperate;

/**
* Capture and storage technique
* Original capture and storage technique
* https://www.loc.gov/marc/bibliographic/bd007s.html
*/
public class Tag007soundRecording13 extends ControlfieldPositionDefinition {
Expand All @@ -28,18 +28,18 @@ public static Tag007soundRecording13 getInstance() {
}

private void initialize() {
label = "Capture and storage technique";
label = "Original capture and storage technique";
id = "007soundRecording13";
mqTag = "captureAndStorageTechnique";
positionStart = 13;
positionEnd = 14;
descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd007s.html";
codes = Utils.generateCodes(
"a", "Acoustical capture, direct storage",
"b", "Direct storage, not acoustical",
"d", "Digital storage",
"e", "Analog electrical storage",
"u", "Unknown",
"a", "Acoustical capture, analog direct storage",
"b", "Electrical capture, analog direct storage",
"d", "Electrical capture, digital storage",
"e", "Electrical capture, analog electrical storage",
"u", "Unknown capture and storage",
"z", "Other",
"|", "No attempt to code"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private void initialize() {
"g", "Configuration of playback channels", "R",
"h", "Special playback characteristics", "R",
"i", "Sound content", "R",
"j", "Original capture and storage technique", "R",
"0", "Authority record control number or standard number", "R",
"1", "Real World Object URI", "R",
"2", "Source", "NR",
Expand Down Expand Up @@ -82,6 +83,12 @@ private void initialize() {
getSubfield("h")
.setBibframeTag("playbackCharacteristic");

getSubfield("i")
.setMqTag("soundContent");

getSubfield("j")
.setMqTag("originalCaptureAndStorageTechnique");

getSubfield("0")
.setMqTag("authorityRecordControlNumber")
.setContentParser(RecordControlNumberParser.getInstance());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ private void initialize() {
"l", "Library of Congress call number", "NR",
"v", "Volume/sequential designation", "R",
"x", "International Standard Serial Number", "R",
"y", "Incorrect ISSN", "R",
"z", "Canceled ISSN", "R",
"3", "Materials specified", "NR",
"6", "Linkage", "NR",
"8", "Field link and sequence number", "R"
);

getSubfield("6").setContentParser(LinkageParser.getInstance());
getSubfield("x").setValidator(ISSNValidator.getInstance());
getSubfield("z").setValidator(ISSNValidator.getInstance());

getSubfield("a")
.setBibframeTag("rdfs:label").setMqTag("rdf:value")
Expand All @@ -89,7 +92,13 @@ private void initialize() {
.setFrbrFunctions(DiscoverySearch, DiscoveryIdentify, DiscoverySelect, DiscoveryObtain)
.setCompilanceLevels("A", "A");

getSubfield("3")
getSubfield("y")
.setMqTag("incorrectISSN");

getSubfield("z")
.setMqTag("canceledISSN");

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

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/de/gwdg/metadataqa/marc/dao/Control007Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,10 @@ public void testSoundRecording() {
assertEquals("Digital recording", field.getSoundRecording12().resolve());

subfield = field.getSubfieldByPosition(13);
assertEquals("Capture and storage technique", subfield.getLabel());
assertEquals("Original capture and storage technique", subfield.getLabel());
assertEquals("d", field.getMap().get(subfield));
assertEquals("Digital storage", field.resolve(subfield));
assertEquals("Digital storage", field.getSoundRecording13().resolve());
assertEquals("Electrical capture, digital storage", field.resolve(subfield));
assertEquals("Electrical capture, digital storage", field.getSoundRecording13().resolve());

ControlFieldValidator validator = new ControlFieldValidator();
assertFalse(validator.validate(field));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public void testStatistics() {
assertEquals( 212, statistics.get(DataElementType.controlFieldPositions));
assertEquals( 225, statistics.get(DataElementType.coreFields));
assertEquals( 179, statistics.get(DataElementType.coreIndicators));
assertEquals(2493, statistics.get(DataElementType.coreSubfields));
assertEquals(2496, statistics.get(DataElementType.coreSubfields));
assertEquals( 214, statistics.get(DataElementType.localFields));
assertEquals( 28, statistics.get(DataElementType.localIndicators));
assertEquals(1731, statistics.get(DataElementType.localSubfields));
assertEquals(5088, statistics.total());
assertEquals(5091, statistics.total());
}
}

0 comments on commit 7f065aa

Please sign in to comment.