-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# pom.xml # registry-persistence/src/main/java/org/gbif/registry/persistence/mapper/collections/dto/SearchDto.java # registry-persistence/src/main/java/org/gbif/registry/persistence/mapper/collections/params/SearchParams.java # registry-persistence/src/main/resources/liquibase/137-featured-image-attribution-grscicoll.xml # registry-persistence/src/main/resources/liquibase/138-dataset-occurrence-download-created-index.xml # registry-persistence/src/main/resources/liquibase/139-dataset-occurrence-download-created-index.xml # registry-persistence/src/main/resources/liquibase/master.xml # registry-search/src/main/java/org/gbif/registry/search/dataset/service/collections/CollectionsSearchService.java # registry-ws/src/main/java/org/gbif/registry/ws/export/CsvWriter.java
- Loading branch information
Showing
92 changed files
with
5,954 additions
and
984 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
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
70 changes: 70 additions & 0 deletions
70
...y-integration-tests/src/test/java/org/gbif/registry/test/mocks/NubResourceClientMock.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,70 @@ | ||
package org.gbif.registry.test.mocks; | ||
|
||
import java.util.Arrays; | ||
import org.gbif.api.model.checklistbank.NameUsageMatch; | ||
import org.gbif.api.model.common.LinneanClassification; | ||
import org.gbif.api.v2.NameUsageMatch2; | ||
import org.gbif.api.v2.RankedName; | ||
import org.gbif.api.vocabulary.Rank; | ||
import org.gbif.checklistbank.ws.client.NubResourceClient; | ||
|
||
public class NubResourceClientMock implements NubResourceClient { | ||
|
||
public static final RankedName DEFAULT_USAGE = new RankedName(100, "usage", Rank.SPECIES); | ||
public static final RankedName DEFAULT_HIGHEST_USAGE = | ||
new RankedName(1, "superHigherUsage", Rank.KINGDOM); | ||
|
||
@Override | ||
public NameUsageMatch match( | ||
String s, | ||
String s1, | ||
String s2, | ||
String s3, | ||
String s4, | ||
String s5, | ||
String s6, | ||
String s7, | ||
LinneanClassification linneanClassification, | ||
Boolean aBoolean, | ||
Boolean aBoolean1) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public NameUsageMatch2 match2( | ||
String scientificName2, | ||
String scientificName, | ||
String authorship2, | ||
String authorship, | ||
String rank2, | ||
String rank, | ||
String genericName, | ||
String specificEpithet, | ||
String infraspecificEpithet, | ||
LinneanClassification classification, | ||
Boolean strict, | ||
Boolean verbose) { | ||
|
||
if ("Aves".equalsIgnoreCase(scientificName)) { | ||
NameUsageMatch2 nameUsageMatch2 = new NameUsageMatch2(); | ||
nameUsageMatch2.setUsage(new RankedName(212, "Aves", Rank.CLASS)); | ||
nameUsageMatch2.setClassification( | ||
Arrays.asList( | ||
new RankedName(1, "Animalia", Rank.KINGDOM), | ||
new RankedName(44, "Chordata", Rank.PHYLUM), | ||
new RankedName(212, "Aves", Rank.CLASS))); | ||
NameUsageMatch2.Diagnostics diagnostics = new NameUsageMatch2.Diagnostics(); | ||
diagnostics.setMatchType(NameUsageMatch.MatchType.EXACT); | ||
nameUsageMatch2.setDiagnostics(diagnostics); | ||
return nameUsageMatch2; | ||
} | ||
|
||
NameUsageMatch2 nameUsageMatch2 = new NameUsageMatch2(); | ||
nameUsageMatch2.setUsage(DEFAULT_USAGE); | ||
|
||
nameUsageMatch2.setClassification( | ||
Arrays.asList(new RankedName(50, "higherUsage", Rank.GENUS), DEFAULT_HIGHEST_USAGE)); | ||
|
||
return nameUsageMatch2; | ||
} | ||
} |
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
Oops, something went wrong.