-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from DiSSCo/feature/add-additional-terms
Feature/add additional terms
- Loading branch information
Showing
86 changed files
with
1,673 additions
and
143 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
68 changes: 53 additions & 15 deletions
68
src/main/java/eu/dissco/core/translator/terms/BaseDigitalObjectDirector.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
22 changes: 22 additions & 0 deletions
22
src/main/java/eu/dissco/core/translator/terms/specimen/RecordedById.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 eu.dissco.core.translator.terms.specimen; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import eu.dissco.core.translator.terms.Term; | ||
import java.util.List; | ||
|
||
public class RecordedById extends Term { | ||
|
||
public static final String TERM = DWC_PREFIX + "recordedByID"; | ||
|
||
private final List<String> dwcaTerms = List.of("dwc:recordedByID"); | ||
|
||
@Override | ||
public String retrieveFromDWCA(JsonNode unit) { | ||
return super.searchJsonForTerm(unit, dwcaTerms); | ||
} | ||
|
||
@Override | ||
public String getTerm() { | ||
return TERM; | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
src/main/java/eu/dissco/core/translator/terms/specimen/VerbatimLabel.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,28 @@ | ||
package eu.dissco.core.translator.terms.specimen; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import eu.dissco.core.translator.terms.Term; | ||
import java.util.List; | ||
|
||
public class VerbatimLabel extends Term { | ||
|
||
public static final String TERM = DWC_PREFIX + "verbatimLabel"; | ||
private final List<String> dwcaTerms = List.of(TERM); | ||
private final List<String> abcdUnitTerms = List.of( | ||
"abcd:specimenUnit/marks/mark/0/markText/value"); | ||
|
||
@Override | ||
public String retrieveFromDWCA(JsonNode unit) { | ||
return super.searchJsonForTerm(unit, dwcaTerms); | ||
} | ||
|
||
@Override | ||
public String retrieveFromABCD(JsonNode unit) { | ||
return searchJsonForTerm(unit, abcdUnitTerms); | ||
} | ||
|
||
@Override | ||
public String getTerm() { | ||
return TERM; | ||
} | ||
} |
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
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
22 changes: 22 additions & 0 deletions
22
src/main/java/eu/dissco/core/translator/terms/specimen/identification/IdentifiedById.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 eu.dissco.core.translator.terms.specimen.identification; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import eu.dissco.core.translator.terms.Term; | ||
import java.util.List; | ||
|
||
public class IdentifiedById extends Term { | ||
|
||
public static final String TERM = DWC_PREFIX + "identifiedById"; | ||
|
||
private final List<String> dwcaTerms = List.of(TERM); | ||
|
||
@Override | ||
public String retrieveFromDWCA(JsonNode unit) { | ||
return super.searchJsonForTerm(unit, dwcaTerms); | ||
} | ||
|
||
@Override | ||
public String getTerm() { | ||
return TERM; | ||
} | ||
} |
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
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
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
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
21 changes: 21 additions & 0 deletions
21
...va/eu/dissco/core/translator/terms/specimen/identification/taxonomy/ScientificNameId.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 eu.dissco.core.translator.terms.specimen.identification.taxonomy; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import eu.dissco.core.translator.terms.Term; | ||
import java.util.List; | ||
|
||
public class ScientificNameId extends Term { | ||
|
||
public static final String TERM = DWC_PREFIX + "scientificNameID"; | ||
private final List<String> dwcaTerms = List.of(TERM); | ||
|
||
@Override | ||
public String retrieveFromDWCA(JsonNode unit) { | ||
return super.searchJsonForTerm(unit, dwcaTerms); | ||
} | ||
|
||
@Override | ||
public String getTerm() { | ||
return TERM; | ||
} | ||
} |
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
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
28 changes: 28 additions & 0 deletions
28
...a/eu/dissco/core/translator/terms/specimen/identification/taxonomy/VerbatimTaxonRank.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,28 @@ | ||
package eu.dissco.core.translator.terms.specimen.identification.taxonomy; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import java.util.List; | ||
|
||
public class VerbatimTaxonRank extends AbstractTaxonomy { | ||
|
||
public static final String TERM = DWC_PREFIX + "verbatimTaxonRank"; | ||
|
||
private final List<String> dwcaTerms = List.of(TERM); | ||
private final List<String> abcdTerms = List.of( | ||
"result/taxonIdentified/scientificName/nameAtomised/botanical/rank"); | ||
|
||
@Override | ||
public String retrieveFromDWCA(JsonNode unit) { | ||
return super.searchJsonForTerm(unit, dwcaTerms); | ||
} | ||
|
||
@Override | ||
public String retrieveFromABCD(JsonNode unit) { | ||
return searchJsonForTerm(unit, abcdTerms); | ||
} | ||
|
||
@Override | ||
public String getTerm() { | ||
return TERM; | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
src/main/java/eu/dissco/core/translator/terms/specimen/location/LocationId.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 eu.dissco.core.translator.terms.specimen.location; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import eu.dissco.core.translator.terms.Term; | ||
import java.util.List; | ||
|
||
public class LocationId extends Term { | ||
|
||
public static final String TERM = DWC_PREFIX + "locationID"; | ||
|
||
private final List<String> dwcaTerms = List.of(TERM); | ||
|
||
@Override | ||
public String retrieveFromDWCA(JsonNode unit) { | ||
return super.searchJsonForTerm(unit, dwcaTerms); | ||
} | ||
|
||
@Override | ||
public String getTerm() { | ||
return TERM; | ||
} | ||
} |
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
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
Oops, something went wrong.