Merge branch 'dmp-refactoring' of code-repo.d4science.org:MaDgiK-CITE/argos into dmp-refactoring
This commit is contained in:
commit
d50613f416
|
@ -905,11 +905,11 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
|||
//region
|
||||
|
||||
@Override
|
||||
public List<String> getSemantics(String query) throws IOException {
|
||||
public List<String> getSemantics(String like) throws IOException {
|
||||
List<Semantic> semantics = this.getSemantics();
|
||||
List<String> filteredSemantics = semantics.stream().map(Semantic::getName).collect(Collectors.toList());
|
||||
if (query != null && !query.isEmpty()) {
|
||||
filteredSemantics = semantics.stream().filter(x -> x.getCategory().contains(query) || x.getName().contains(query)).map(Semantic::getName).collect(Collectors.toList());
|
||||
if (like != null && !like.isEmpty()) {
|
||||
filteredSemantics = semantics.stream().filter(x -> x.getCategory().contains(like.replaceAll("%", "")) || x.getName().contains(like.replaceAll("%", ""))).map(Semantic::getName).collect(Collectors.toList());
|
||||
}
|
||||
return filteredSemantics;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ storage:
|
|||
basePath: ${TRANSFORMER_BASE_PATH}
|
||||
static-files:
|
||||
externalUrls: dmp-backend/web/src/main/resources/externalUrls/ExternalUrls.xml
|
||||
semantics: Semantics.json
|
||||
semantics: dmp-backend/web/src/main/resources/Semantics.json
|
||||
h2020Template: documents/h2020.docx
|
||||
h2020DescriptionTemplate: documents/h2020_dataset.docx
|
||||
pidLinks: pidLinks.json
|
||||
|
|
Loading…
Reference in New Issue