-
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
68 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
45 changes: 45 additions & 0 deletions
45
src/main/java/de/gwdg/metadataqa/marc/definition/tags/bltags/TagLEO.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,45 @@ | ||
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; | ||
|
||
/** | ||
* LEO (Library Export Operations) Identifier | ||
*/ | ||
public class TagLEO extends DataFieldDefinition { | ||
|
||
private static TagLEO uniqueInstance; | ||
|
||
private TagLEO() { | ||
initialize(); | ||
postCreation(); | ||
} | ||
|
||
public static TagLEO getInstance() { | ||
if (uniqueInstance == null) | ||
uniqueInstance = new TagLEO(); | ||
return uniqueInstance; | ||
} | ||
|
||
private void initialize() { | ||
|
||
tag = "LEO"; | ||
label = "LEO (Library Export Operations) Identifier"; | ||
mqTag = "LibraryExportOperationsIdentifier"; | ||
cardinality = Cardinality.Repeatable; | ||
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html"; | ||
// setCompilanceLevels("O"); | ||
obsolete = true; | ||
|
||
ind1 = new Indicator(); | ||
|
||
ind2 = new Indicator(); | ||
|
||
setSubfieldsWithCardinality( | ||
"a", "LEO identifier", "NR" | ||
); | ||
|
||
getSubfield("a").setMqTag("identifier"); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/TagLEOTest.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 TagLEOTest extends BLTagTest { | ||
|
||
public TagLEOTest() { | ||
super(TagLEO.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
validField("a", "MP13.0002486527"); | ||
} | ||
|
||
@Test | ||
public void testInvalidFields() { | ||
invalidField("3", "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