diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c20cb33a..ecab610e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ 690, 692, 852$a (code list), 859, 909, 916, 917, 945, 950, 954, 955, 957, 959, 960, 961, 962, 963, 964, 966, 968, 970, 975, 976, 979, 980, 985, 990, 992, 996, 997, A02, AQN, BGT, BUF, CFI, CNF, DGM, DRT, EST, EXP, FFP, FIN, LAS, LCS, LDO, LEO, LET, - MIS, MNI, MPX, NEG, NID, OBJ, OHC, ONS, ONX, PLR, RSC, SRC, SSD, TOC, UNO, VIT + MIS, MNI, MPX, NEG, NID, OBJ, OHC, ONS, ONX, PLR, RSC, SRC, SSD, TOC, UNO, VIT, WII - new general parameters - ignorableFields - ignorableRecords diff --git a/src/main/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionLister.java b/src/main/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionLister.java index add7c04d3..2386f90ee 100644 --- a/src/main/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionLister.java +++ b/src/main/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionLister.java @@ -121,10 +121,11 @@ public void prepareBaseline() { processFunctions(indicator.getFrbrFunctions(), fieldTag.getTag() + "$" + indicator.getIndicatorFlag()); } - for (SubfieldDefinition subfield : fieldTag.getSubfields()) { - if (isCore) coreSubfields++; else localSubfields++; - processFunctions(subfield.getFrbrFunctions(), fieldTag.getTag() + "$" + subfield.getCode()); - } + if (fieldTag.getSubfields() != null) + for (SubfieldDefinition subfield : fieldTag.getSubfields()) { + if (isCore) coreSubfields++; else localSubfields++; + processFunctions(subfield.getFrbrFunctions(), fieldTag.getTag() + "$" + subfield.getCode()); + } } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { diff --git a/src/test/java/de/gwdg/metadataqa/marc/cli/FunctionalAnalysisTest.java b/src/test/java/de/gwdg/metadataqa/marc/cli/FunctionalAnalysisTest.java index 23f581ef3..68d1f8a4c 100644 --- a/src/test/java/de/gwdg/metadataqa/marc/cli/FunctionalAnalysisTest.java +++ b/src/test/java/de/gwdg/metadataqa/marc/cli/FunctionalAnalysisTest.java @@ -22,5 +22,4 @@ public void test() throws Exception { MarcRecord record = MarcFactory.createFromMarc4j(marc4jRecord); analysis.processRecord(record, 1); } - } diff --git a/src/test/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionListerTest.java b/src/test/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionListerTest.java index ba10bfdde..f9d2f05a5 100644 --- a/src/test/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionListerTest.java +++ b/src/test/java/de/gwdg/metadataqa/marc/utils/FrbrFunctionListerTest.java @@ -38,16 +38,16 @@ public void test() { } } - for (SubfieldDefinition subfield : fieldTag.getSubfields()) { - functions = subfield.getFrbrFunctions(); - if (functions != null) { - // System.err.printf("%s$%s: %s%n", fieldTag.getTag(), subfield.getCode(), StringUtils.join(functions)); - for (FRBRFunction function : functions) { - count(function, counter); + if (fieldTag.getSubfields() != null) + for (SubfieldDefinition subfield : fieldTag.getSubfields()) { + functions = subfield.getFrbrFunctions(); + if (functions != null) { + // System.err.printf("%s$%s: %s%n", fieldTag.getTag(), subfield.getCode(), StringUtils.join(functions)); + for (FRBRFunction function : functions) { + count(function, counter); + } } } - } - } catch (NoSuchMethodException | IllegalAccessException diff --git a/src/test/java/de/gwdg/metadataqa/marc/utils/MarcTagListerTest.java b/src/test/java/de/gwdg/metadataqa/marc/utils/MarcTagListerTest.java index f767ce37b..d94655474 100644 --- a/src/test/java/de/gwdg/metadataqa/marc/utils/MarcTagListerTest.java +++ b/src/test/java/de/gwdg/metadataqa/marc/utils/MarcTagListerTest.java @@ -21,7 +21,7 @@ public void testListTag() { List> tags = MarcTagLister.listTags(); assertNotNull(tags); assertNotEquals(0, tags.size()); - assertEquals(398, tags.size()); + assertEquals(399, tags.size()); assertEquals("Tag010", tags.get(0).getSimpleName()); Map versionCounter = new HashMap<>(); Map versionCounter2 = new HashMap<>();