-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag597.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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; | ||
|
||
/** | ||
* National Bibliography Issue Number | ||
*/ | ||
public class Tag597 extends DataFieldDefinition { | ||
|
||
private static Tag597 uniqueInstance; | ||
|
||
private Tag597() { | ||
initialize(); | ||
postCreation(); | ||
} | ||
|
||
public static Tag597 getInstance() { | ||
if (uniqueInstance == null) | ||
uniqueInstance = new Tag597(); | ||
return uniqueInstance; | ||
} | ||
|
||
private void initialize() { | ||
|
||
tag = "597"; | ||
label = "Editing or Error Message"; | ||
mqTag = "editingOrErrorMessage"; | ||
cardinality = Cardinality.Repeatable; | ||
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html"; | ||
// setCompilanceLevels("O"); | ||
|
||
ind1 = new Indicator(); | ||
ind2 = new Indicator(); | ||
|
||
setSubfieldsWithCardinality( | ||
"a", "Unconverted legacy field or Message relating to conversion, deduplication and enhancement", "NR", | ||
"b", "Information relating to record enhancement", "NR" | ||
); | ||
|
||
getSubfield("a") | ||
.setMqTag("legacyFieldOrMessage"); | ||
|
||
getSubfield("b") | ||
.setMqTag("recordEnhancement"); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag597Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Tag597Test extends BLTagTest { | ||
|
||
public Tag597Test() { | ||
super(Tag597.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
validField("a", "MP13/700"); | ||
validField("b", "ISSN"); | ||
validField(new DataField(tag, " ", " ", "a", "Enhanced", "b", "ISSN")); | ||
} | ||
|
||
@Test | ||
public void testInvalidFields() { | ||
invalidField("c", "NLS copy dimensions: 16 cm."); | ||
invalidField("1", "a", "NLS copy dimensions: 16 cm."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters