-
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
81 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
54 changes: 54 additions & 0 deletions
54
src/main/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag955.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,54 @@ | ||
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; | ||
|
||
/** | ||
* Shelving Location | ||
*/ | ||
public class Tag955 extends DataFieldDefinition { | ||
|
||
private static Tag955 uniqueInstance; | ||
|
||
private Tag955() { | ||
initialize(); | ||
postCreation(); | ||
} | ||
|
||
public static Tag955 getInstance() { | ||
if (uniqueInstance == null) | ||
uniqueInstance = new Tag955(); | ||
return uniqueInstance; | ||
} | ||
|
||
private void initialize() { | ||
|
||
tag = "955"; | ||
label = "Shelving Location"; | ||
mqTag = "shelvingLocation"; | ||
cardinality = Cardinality.Repeatable; | ||
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html"; | ||
// setCompilanceLevels("O"); | ||
|
||
ind1 = new Indicator(); | ||
|
||
ind2 = new Indicator(); | ||
|
||
setSubfieldsWithCardinality( | ||
"a", "Shelfmark", "NR", | ||
"b", "Location", "NR" | ||
); | ||
|
||
getSubfield("a") | ||
.setMqTag("shelfmark"); | ||
|
||
getSubfield("b") | ||
.setCodes( | ||
"MSS", "Manuscripts", | ||
"OH", "Orbit House", | ||
"SS", "Store Street" | ||
) | ||
.setMqTag("location"); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag955Test.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,25 @@ | ||
package de.gwdg.metadataqa.marc.definition.tags.bltags; | ||
|
||
import de.gwdg.metadataqa.marc.DataField; | ||
import org.junit.Test; | ||
|
||
public class Tag955Test extends BLTagTest { | ||
|
||
public Tag955Test() { | ||
super(Tag955.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
validField(new DataField(tag, " ", " ", | ||
"a", "913", "b", "OH")); | ||
validField(new DataField(tag, " ", " ", | ||
"a", "13.c.f.", "b", "SS")); | ||
} | ||
|
||
@Test | ||
public void testInvalidFields() { | ||
invalidField("2", "a", "Priority processing"); | ||
invalidField("b", "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