Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed Sep 18, 2023
1 parent 15424d8 commit 1f48123
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 35 deletions.
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,6 @@
<version>1.2.1</version>
<configuration>
<sourceDirectory>${basedir}/src/main/resources/json-schema/</sourceDirectory>
<!-- <sourcePaths>-->
<!-- <sourcePath>-->
<!-- ${basedir}/src/main/resources/json-schema/digital-specimen.json-->
<!-- </sourcePath>-->
<!-- </sourcePaths>-->
<targetPackage>eu.dissco.core.translator.schema</targetPackage>
<generateBuilders>true</generateBuilders>
<includeDynamicBuilders>true</includeDynamicBuilders>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ private void processDigitalSpecimen(Collection<ObjectNode> fullRecords)
private List<DigitalMediaObject> processMedia(String recordId, JsonNode fullDigitalSpecimen,
String organisationId) throws OrganisationNotRorId {
var extensions = fullDigitalSpecimen.get(EXTENSIONS);
var orgId = termMapper.retrieveFromDWCA(new OrganisationId(), fullDigitalSpecimen);
if (fullDigitalSpecimen.get(DWC_ASSOCIATED_MEDIA) != null) {
return publishAssociatedMedia(recordId,
fullDigitalSpecimen.get(DWC_ASSOCIATED_MEDIA).asText(), organisationId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,6 @@ private static String getDiscipline(String basisOfRecord, String kingdom) {
}
}

@Override
public String retrieveFromDWCA(JsonNode unit) {
var basisOfRecord = new BasisOfRecord().retrieveFromDWCA(unit);
var kingdom = new Kingdom().retrieveFromDWCA(unit);
return getCategory(basisOfRecord, kingdom);
}

@Override
public String retrieveFromABCD(JsonNode unit) {
var basisOfRecord = new BasisOfRecord().retrieveFromABCD(unit);
var kingdom = new Kingdom().retrieveFromABCD(unit);
return getCategory(basisOfRecord, kingdom);
}

@Override
public String getTerm() {
return TERM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ private void givenInsertRecords(String mapping) {
.set(MAPPING.MAPPING_, JSONB.valueOf(mapping))
.set(MAPPING.CREATED, Instant.parse("2022-09-16T08:25:01.00Z"))
.set(MAPPING.CREATOR, "e2befba6-9324-4bb4-9f41-d7dfae4a44b0")
.set(MAPPING.SOURCEDATASTANDARD, "dwc")
.execute();

context.insertInto(SOURCE_SYSTEM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private static Stream<Arguments> arguments() {
return Stream.of(
Arguments.of("FossilSpecimen", null, "Palaeontology"),
Arguments.of("MeteoriteSpecimen", null, "Astrogeology"),
Arguments.of("RockSpecimen", null, "Earth System"),
Arguments.of("RockSpecimen", null, "Geology"),
Arguments.of("PreservedSpecimen", "Animalia", "Zoology"),
Arguments.of("PreservedSpecimen", "Plantae", "Botany"),
Arguments.of("PreservedSpecimen", "Bacteria", "Microbiology"),
Expand All @@ -44,19 +44,6 @@ void testRetrieveFromDWCA(String basisOfRecord, String kingdom, String expected)
assertThat(result).isEqualTo(expected);
}

private static Stream<Arguments> arguments() {
return Stream.of(
Arguments.of("FossilSpecimen", null, "Palaeontology"),
Arguments.of("MeteoriteSpecimen", null, "Astrogeology"),
Arguments.of("RockSpecimen", null, "Geology"),
Arguments.of("PreservedSpecimen", "Animalia", "Zoology"),
Arguments.of("PreservedSpecimen", "Plantae", "Botany"),
Arguments.of("PreservedSpecimen", "Bacteria", "Microbiology"),
Arguments.of("PreservedSpecimen", "incertae sedis", "Unclassified"),
Arguments.of("Other", null, "Unclassified")
);
}

@ParameterizedTest
@MethodSource("arguments")
void testRetrieveFromABCD(String basisOfRecord, String kingdom, String expected) {
Expand Down

0 comments on commit 1f48123

Please sign in to comment.