Skip to content

Commit

Permalink
Update KBR custom schema #404: add 997
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Jan 16, 2024
1 parent 41c9b1e commit 59f8097
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.gwdg.metadataqa.marc.definition.Cardinality;
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
import de.gwdg.metadataqa.marc.definition.structure.Indicator;
import de.gwdg.metadataqa.marc.definition.structure.SubfieldDefinition;

/**
* Item information
Expand Down Expand Up @@ -35,23 +36,27 @@ private void initialize() {
ind2 = new Indicator();

setSubfieldsWithCardinality(
"*", "Link with identifier", "NR", // (number)
"a", "Barcode number", "NR", // (number)
"c", "Library (holding institution)", "NR", // (text, mostly 'KBR')
"d", "Section (department of holding institution)", "NR", // (text, like 'M-MAN' for (manuscripts))
"g", "Call Number", "NR", // (text)
"h", "Rating2", "NR", // (text)
"i", "Rating3", "NR", // (text)
"t", "Document type", "NR" // (text)
"t", "Document type", "NR", // (text)
"*", "Link with identifier", "NR", // (number)
"@", "Language of field", "NR",
"#", "number/occurrence of field", "NR" // (number)
);

getSubfield("*").setMqTag("link");
getSubfield("a").setMqTag("barcode");
getSubfield("c").setMqTag("library");
getSubfield("d").setMqTag("section");
getSubfield("g").setMqTag("callNumber");
getSubfield("h").setMqTag("rating2");
getSubfield("i").setMqTag("rating3");
getSubfield("t").setMqTag("documentType");
getSubfield("*").setMqTag("link");
getSubfield("@").setMqTag("language");
getSubfield("#").setMqTag("number");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void testStatistics() {
assertEquals(2667, statistics.get(DataElementType.coreSubfields));
assertEquals( 215, statistics.get(DataElementType.localFields));
assertEquals( 28, statistics.get(DataElementType.localIndicators));
assertEquals(1751, statistics.get(DataElementType.localSubfields));
assertEquals(5292, statistics.total());
assertEquals(1753, statistics.get(DataElementType.localSubfields));
assertEquals(5294, statistics.total());
}
}

0 comments on commit 59f8097

Please sign in to comment.