-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(data): Optimisation of data search with a new searchDataListByTar…
…gets service OpenSILEX/opensilex-dev!1197
- Loading branch information
Showing
47 changed files
with
2,839 additions
and
653 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
393 changes: 262 additions & 131 deletions
393
opensilex-core/src/main/java/org/opensilex/core/data/api/DataAPI.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
43 changes: 43 additions & 0 deletions
43
opensilex-core/src/main/java/org/opensilex/core/data/api/DataGetDetailsDTO.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,43 @@ | ||
//****************************************************************************** | ||
// DataGetDTO.java | ||
// OpenSILEX - Licence AGPL V3.0 - https://www.gnu.org/licenses/agpl-3.0.en.html | ||
// Copyright © INRAE 2020 | ||
// Contact: anne.tireau@inrae.fr, pascal.neveu@inrae.fr | ||
//****************************************************************************** | ||
package org.opensilex.core.data.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import org.opensilex.core.data.dal.DataModel; | ||
import org.opensilex.security.user.api.UserGetDTO; | ||
|
||
import java.net.URI; | ||
import java.util.Set; | ||
|
||
/** | ||
* | ||
* @author rcolin | ||
* Specialized DTO which store detailed information about the publisher | ||
*/ | ||
@JsonPropertyOrder({"uri", "date","timezone", "target", "variable", "value", "confidence", "provenance", "metadata", "publisher"}) | ||
|
||
public class DataGetDetailsDTO extends DataGetDTO { | ||
|
||
@JsonProperty("publisher") | ||
private UserGetDTO publisher; | ||
|
||
public UserGetDTO getPublisher() { | ||
return publisher; | ||
} | ||
|
||
public void setPublisher(UserGetDTO publisher) { | ||
this.publisher = publisher; | ||
} | ||
|
||
public static DataGetDetailsDTO getDtoFromModel(DataModel model, Set<URI> dateVariables) { | ||
DataGetDetailsDTO dto = new DataGetDetailsDTO(); | ||
dto.fromModel(model, dateVariables); | ||
return dto; | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
opensilex-core/src/main/java/org/opensilex/core/data/api/DataGetSearchDTO.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,43 @@ | ||
/* | ||
* ************************************************************************************* | ||
* DataGetSearchDTO.java | ||
* OpenSILEX - Licence AGPL V3.0 - https://www.gnu.org/licenses/agpl-3.0.en.html | ||
* Copyright @ INRAE 2024 | ||
* Contact : user@inrae.fr, anne.tireau@inrae.fr, pascal.neveu@inrae.fr | ||
* ************************************************************************************ | ||
*/ | ||
|
||
package org.opensilex.core.data.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import org.opensilex.core.data.dal.DataModel; | ||
|
||
import java.net.URI; | ||
import java.util.Set; | ||
|
||
/** | ||
* | ||
* @author rcolin | ||
* DTO which for data search | ||
*/ | ||
@JsonPropertyOrder({"uri", "date","timezone", "target", "variable", "value", "confidence", "provenance", "metadata", "publisher"}) | ||
public class DataGetSearchDTO extends DataGetDTO { | ||
|
||
@JsonProperty("publisher") | ||
private URI publisher; | ||
|
||
public URI getPublisher() { | ||
return publisher; | ||
} | ||
|
||
public void setPublisher(URI publisher) { | ||
this.publisher = publisher; | ||
} | ||
|
||
public static DataGetSearchDTO getDtoFromModel(DataModel model, Set<URI> dateVariables) { | ||
DataGetSearchDTO dto = new DataGetSearchDTO(); | ||
dto.fromModel(model, dateVariables); | ||
return dto; | ||
} | ||
} |
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.