-
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
5 changed files
with
83 additions
and
3 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
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
46 changes: 46 additions & 0 deletions
46
src/main/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag959.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,46 @@ | ||
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; | ||
import de.gwdg.metadataqa.marc.definition.general.validator.RegexValidator; | ||
|
||
/** | ||
* Document Supply Status Flag | ||
*/ | ||
public class Tag959 extends DataFieldDefinition { | ||
|
||
private static Tag959 uniqueInstance; | ||
|
||
private Tag959() { | ||
initialize(); | ||
postCreation(); | ||
} | ||
|
||
public static Tag959 getInstance() { | ||
if (uniqueInstance == null) | ||
uniqueInstance = new Tag959(); | ||
return uniqueInstance; | ||
} | ||
|
||
private void initialize() { | ||
|
||
tag = "959"; | ||
label = "Document Supply Status Flag"; | ||
mqTag = "documentSupplyStatus"; | ||
cardinality = Cardinality.Repeatable; | ||
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html"; | ||
// setCompilanceLevels("O"); | ||
|
||
ind1 = new Indicator(); | ||
|
||
ind2 = new Indicator(); | ||
|
||
setSubfieldsWithCardinality( | ||
"f", "Document Supply status", "NR" | ||
); | ||
|
||
getSubfield("f") | ||
.setMqTag("status"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag959Test.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,22 @@ | ||
package de.gwdg.metadataqa.marc.definition.tags.bltags; | ||
|
||
import org.junit.Test; | ||
|
||
public class Tag959Test extends BLTagTest { | ||
|
||
public Tag959Test() { | ||
super(Tag959.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
validField("f", "Held but not currently received"); | ||
} | ||
|
||
@Test | ||
public void testInvalidFields() { | ||
invalidField("2", "a", "Priority processing"); | ||
invalidField("s", "17"); | ||
invalidField("e", "Priority processing"); | ||
} | ||
} |
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