-
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
110 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
52 changes: 52 additions & 0 deletions
52
src/main/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag950.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,52 @@ | ||
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; | ||
|
||
/** | ||
* Library of Congress Subject (Cross-Reference) | ||
*/ | ||
public class Tag950 extends DataFieldDefinition { | ||
|
||
private static Tag950 uniqueInstance; | ||
|
||
private Tag950() { | ||
initialize(); | ||
postCreation(); | ||
} | ||
|
||
public static Tag950 getInstance() { | ||
if (uniqueInstance == null) | ||
uniqueInstance = new Tag950(); | ||
return uniqueInstance; | ||
} | ||
|
||
private void initialize() { | ||
|
||
tag = "950"; | ||
label = "Library of Congress Subject (Cross-Reference)"; | ||
mqTag = "locSubjectCrossReference"; | ||
cardinality = Cardinality.Repeatable; | ||
// descriptionUrl = "https://www.loc.gov/marc/bibliographic/bd037.html"; | ||
// setCompilanceLevels("O"); | ||
|
||
ind1 = new Indicator(); | ||
|
||
ind2 = new Indicator(); | ||
|
||
setSubfieldsWithCardinality( | ||
"a", "Topical term or geographic name entry element", "R", | ||
"s", "See/See also", "R", | ||
"x", "Subject or form subdivision", "R", | ||
"y", "Chronological subdivision", "R", | ||
"z", "Geographic subdivision", "R" | ||
); | ||
|
||
getSubfield("a").setMqTag("topicalTerm"); | ||
getSubfield("s").setMqTag("see"); | ||
getSubfield("x").setMqTag("subject"); | ||
getSubfield("y").setMqTag("chronological"); | ||
getSubfield("z").setMqTag("geographic"); | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag950Test.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,56 @@ | ||
package de.gwdg.metadataqa.marc.definition.tags.bltags; | ||
|
||
import de.gwdg.metadataqa.marc.DataField; | ||
import org.junit.Test; | ||
|
||
public class Tag950Test extends BLTagTest { | ||
|
||
public Tag950Test() { | ||
super(Tag950.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
validField(new DataField(tag, " ", " ", "a", "Mudia (Indic people)", | ||
"s", "See", | ||
"a", "Muria (Indic people)")); | ||
validField(new DataField(tag, " ", " ", "a", "Yanadi (Indic people)", | ||
"s", "See also", | ||
"a", "Nakkala (Indic people)")); | ||
validField(new DataField(tag, " ", " ", "a", "Ethiopian-Italian War, 1935-1936", | ||
"s", "See", | ||
"a", "Italo-Ethiopian War, 1935-1936")); | ||
validField(new DataField(tag, " ", " ", "a", "Italy", | ||
"x", "History", | ||
"y", "War in Ethiopia, 1935-1936", | ||
"s", "See", | ||
"a", "Italo-Ethiopian War, 1935-1936")); | ||
validField(new DataField(tag, " ", " ", "a", "African Americans", | ||
"s", "See", | ||
"a", "Afro-Americans")); | ||
validField(new DataField(tag, " ", " ", "a", "Black Americans", | ||
"s", "See", | ||
"a", "Afro-Americans")); | ||
validField(new DataField(tag, " ", " ", "a", "Colored people (United States)", | ||
"s", "See", | ||
"a", "Afro-Americans")); | ||
validField(new DataField(tag, " ", " ", "a", "Arabs", | ||
"x", "History", | ||
"y", "622-1517", | ||
"s", "See", | ||
"a", "Islamic Empire")); | ||
validField(new DataField(tag, " ", " ", "a", "Kuchipudi Bharatam", | ||
"s", "See", | ||
"a", "Kuchipudi (Dance)")); | ||
validField(new DataField(tag, " ", " ", "a", "Dance", | ||
"z", "India", | ||
"s", "See also", | ||
"a", "Bharata natyam; Kathak (Dance); Kuchipudi (Dance); Odissi dance")); | ||
} | ||
|
||
@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