Skip to content

Commit

Permalink
fix: adapt to vocabulary core API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Jul 30, 2024
1 parent e13a253 commit 2266308
Showing 1 changed file with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import io.goobi.vocabulary.exchange.VocabularySchema;
import io.goobi.workflow.api.vocabulary.VocabularyAPIManager;
import io.goobi.workflow.api.vocabulary.helper.ExtendedVocabulary;
import io.goobi.workflow.api.vocabulary.helper.ExtendedVocabularyRecord;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -361,13 +360,7 @@ private void initDisplayFields(SubnodeConfiguration config) {
vocabularyUrl = vocabulary.getURI();

vocabularyRecords = vocabularyAPI.vocabularyRecords()
.list(vocabulary.getId())
.all()
.request()
.getContent()
.stream()
.map(r -> new SelectItem(String.valueOf(r.getId()), r.getMainValue()))
.collect(Collectors.toList());
.getRecordSelectItems(vocabulary.getId());
} else {
if (fields.size() > 1) {
Helper.setFehlerMeldung("vocabularyList with multiple fields is not supported right now");
Expand Down Expand Up @@ -396,14 +389,9 @@ private void initDisplayFields(SubnodeConfiguration config) {
}

vocabularyRecords = vocabularyAPI.vocabularyRecords()
.list(vocabulary.getId())
.search(searchField.get().getId() + ":" + searchFieldValue)
.all()
.request()
.getContent()
.stream()
.map(r -> new SelectItem(String.valueOf(r.getId()), r.getMainValue()))
.collect(Collectors.toList());
.getRecordSelectItems(vocabularyAPI.vocabularyRecords()
.list(vocabulary.getId())
.search(searchField.get().getId() + ":" + searchFieldValue));
}
}

Expand Down

0 comments on commit 2266308

Please sign in to comment.