Skip to content

Commit

Permalink
issue #75: add tag 961
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Dec 9, 2020
1 parent b0ee25c commit ef70c97
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
### Added

- British Library tags: 039, 091, 509, 539, 590, 591, 592, 594, 595, 596, 597, 598, 599,
690, 692, 852$a (code list), 859, 909, 916, 917, 945, 950, 954, 955, 957, 959, 960
690, 692, 852$a (code list), 859, 909, 916, 917, 945, 950, 954, 955, 957, 959, 960,
961
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package de.gwdg.metadataqa.marc.definition.tags.bltags;

import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.Indicator;

/**
* Sheet Index Note
*/
public class Tag961 extends DataFieldDefinition {

private static Tag961 uniqueInstance;

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

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

private void initialize() {

tag = "961";
label = "Sheet Index Note";
mqTag = "sheetIndexNote";
cardinality = Cardinality.Repeatable;
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html";
// setCompilanceLevels("O");

ind1 = new Indicator();

ind2 = new Indicator();

setSubfieldsWithCardinality(
"a", "Sheet index note", "NR",
"b", "Shelfmark", "NR"
);

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

getSubfield("b")
.setMqTag("shelfmark");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package de.gwdg.metadataqa.marc.definition.tags.bltags;

import de.gwdg.metadataqa.marc.DataField;
import org.junit.Test;

public class Tag961Test extends BLTagTest {

public Tag961Test() {
super(Tag961.getInstance());
}

@Test
public void testValidFields() {
validField(new DataField(tag, " ", " ",
"a", "PLEASE CONSULT SHEET INDEX IN READING ROOM TO IDENTIFY REQUIRED SHEET WITHIN SERIES",
"b", "Maps Index 1./OR.4264."));
}

@Test
public void testInvalidFields() {
invalidField("2", "a", "Priority processing");
invalidField("c", "Priority processing");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void testListTag() {
List<Class<? extends DataFieldDefinition>> tags = MarcTagLister.listTags();
assertNotNull(tags);
assertNotEquals(0, tags.size());
assertEquals(349, tags.size());
assertEquals(350, tags.size());
assertEquals("Tag010", tags.get(0).getSimpleName());
Map<String, Integer> versionCounter = new HashMap<>();
Map<MarcVersion, Integer> versionCounter2 = new HashMap<>();
Expand Down

0 comments on commit ef70c97

Please sign in to comment.