-
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
75 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
51 changes: 51 additions & 0 deletions
51
src/main/java/de/gwdg/metadataqa/marc/definition/tags/bltags/TagMIS.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,51 @@ | ||
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; | ||
|
||
/** | ||
* Monograph in Series Flag | ||
*/ | ||
public class TagMIS extends DataFieldDefinition { | ||
|
||
private static TagMIS uniqueInstance; | ||
|
||
private TagMIS() { | ||
initialize(); | ||
postCreation(); | ||
} | ||
|
||
public static TagMIS getInstance() { | ||
if (uniqueInstance == null) | ||
uniqueInstance = new TagMIS(); | ||
return uniqueInstance; | ||
} | ||
|
||
private void initialize() { | ||
|
||
tag = "MIS"; | ||
label = "Monograph in Series Flag"; | ||
mqTag = "MonographInSeriesFlag"; | ||
cardinality = Cardinality.Nonrepeatable; | ||
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html"; | ||
// setCompilanceLevels("O"); | ||
|
||
ind1 = new Indicator(); | ||
|
||
ind2 = new Indicator(); | ||
|
||
setSubfieldsWithCardinality( | ||
"a", "Monograph in series flag", "NR" | ||
); | ||
|
||
getSubfield("a") | ||
.setCodes("BS", "Book Series") | ||
.setMqTag("monographInSeries"); | ||
// TODO: | ||
// obsolte subfield name: Monograph in series order type | ||
// obsolte codes: "SO", "Standing order", "SUB", "Subscription" | ||
// obsolte subfield name: Monograph in series flag | ||
// obsolte codes: "k-sep", "k-sep" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/TagMISTest.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,21 @@ | ||
package de.gwdg.metadataqa.marc.definition.tags.bltags; | ||
|
||
import org.junit.Test; | ||
|
||
public class TagMISTest extends BLTagTest { | ||
|
||
public TagMISTest() { | ||
super(TagMIS.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
validField("a", "BS"); | ||
} | ||
|
||
@Test | ||
public void testInvalidFields() { | ||
invalidField("1", "a", "Y"); | ||
invalidField("e", "20050944"); | ||
} | ||
} |
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