Skip to content

Commit

Permalink
#615 added missing params
Browse files Browse the repository at this point in the history
(cherry picked from commit 4723370)
  • Loading branch information
marcos-lg committed Sep 10, 2024
1 parent f21e7b6 commit 7b82d7e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ public class CollectionListParams extends ListParams {
@Nullable List<String> preservationTypes;
@Nullable List<String> accessionStatus;
@Nullable Boolean personalCollection;
@Nullable String sourceId;
@Nullable Source source;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ public class InstitutionListParams extends ListParams {
@Nullable List<String> types;
@Nullable List<String> institutionalGovernances;
@Nullable List<String> disciplines;
@Nullable String sourceId;
@Nullable Source source;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.gbif.api.vocabulary.IdentifierType;
import org.gbif.api.vocabulary.SortOrder;
import org.gbif.api.vocabulary.collections.MasterSourceType;
import org.gbif.api.vocabulary.collections.Source;

@Getter
@SuperBuilder
Expand All @@ -50,6 +51,8 @@ public abstract class ListParams {
@Nullable RangeParam occurrenceCount;
@Nullable RangeParam typeSpecimenCount;
@Nullable List<UUID> institutionKeys;
@Nullable Source source;
@Nullable String sourceId;
@Nullable CollectionsSortField sortBy;
@Nullable SortOrder sortOrder;
@Nullable private Boolean deleted;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ private void buildCommonParams(
.code(searchRequest.getCode())
.name(searchRequest.getName())
.alternativeCode(searchRequest.getAlternativeCode())
.machineTagNamespace(searchRequest.getMachineTagNamespace())
.machineTagName(searchRequest.getMachineTagName())
.machineTagValue(searchRequest.getMachineTagValue())
.identifierType(searchRequest.getIdentifierType())
.identifier(searchRequest.getIdentifier())
.countries(searchRequest.getCountry())
.regionCountries(parseGbifRegion(searchRequest))
.city(searchRequest.getCity())
Expand All @@ -321,8 +326,11 @@ private void buildCommonParams(
.masterSourceType(searchRequest.getMasterSourceType())
.numberSpecimens(parseIntegerRangeParameter(searchRequest.getNumberSpecimens()))
.displayOnNHCPortal(searchRequest.getDisplayOnNHCPortal())
.replacedBy(searchRequest.getReplacedBy())
.occurrenceCount(parseIntegerRangeParameter(searchRequest.getOccurrenceCount()))
.typeSpecimenCount(parseIntegerRangeParameter(searchRequest.getTypeSpecimenCount()))
.sourceId(searchRequest.getSourceId())
.source(searchRequest.getSource())
.sortBy(searchRequest.getSortBy())
.sortOrder(searchRequest.getSortOrder())
.highlight(searchRequest.getHl())
Expand Down Expand Up @@ -382,7 +390,8 @@ private void addHighlights(BaseSearchResponse response, BaseSearchDto dto) {
.ifPresent(highlights::add);
createHighlightMatch(dto.getDescriptorGroupTitleHighlight(), "descriptorGroup.title")
.ifPresent(highlights::add);
createHighlightMatch(dto.getDescriptorGroupDescriptionHighlight(), "descriptorGroup.description")
createHighlightMatch(
dto.getDescriptorGroupDescriptionHighlight(), "descriptorGroup.description")
.ifPresent(highlights::add);

Optional<Highlight> nameMatch = createHighlightMatch(dto.getNameHighlight(), "name");
Expand Down

0 comments on commit 7b82d7e

Please sign in to comment.