Merge branch 'Development' of code-repo.d4science.org:MaDgiK-CITE/argos into Development
This commit is contained in:
commit
4425a0bb5d
|
@ -7,6 +7,7 @@ import eu.eudat.queryable.queryableentity.DataEntity;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@ public class DatabaseService<T extends DataEntity> {
|
||||||
return this.databaseCtx.getQueryable(tClass);
|
return this.databaseCtx.getQueryable(tClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public T createOrUpdate(T item, Class<T> tClass) {
|
public T createOrUpdate(T item, Class<T> tClass) {
|
||||||
return this.databaseCtx.createOrUpdate(item, tClass);
|
return this.databaseCtx.createOrUpdate(item, tClass);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.persistence.criteria.Join;
|
import javax.persistence.criteria.Join;
|
||||||
import javax.persistence.criteria.JoinType;
|
import javax.persistence.criteria.JoinType;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -106,6 +107,7 @@ public class DMPDaoImpl extends DatabaseAccess<DMP> implements DMPDao {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public DMP createOrUpdate(DMP item) {
|
public DMP createOrUpdate(DMP item) {
|
||||||
return this.getDatabaseService().createOrUpdate(item, DMP.class);
|
return this.getDatabaseService().createOrUpdate(item, DMP.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,8 +317,12 @@ public class Dmp implements ElasticEntity<Dmp> {
|
||||||
if (fields.get(MapKey.GRANTSTATUS.getName()) != null) {
|
if (fields.get(MapKey.GRANTSTATUS.getName()) != null) {
|
||||||
this.grantStatus = Short.valueOf(fields.get(MapKey.GRANTSTATUS.getName()).toString());
|
this.grantStatus = Short.valueOf(fields.get(MapKey.GRANTSTATUS.getName()).toString());
|
||||||
}
|
}
|
||||||
|
if (fields.containsKey(MapKey.CREATED.getName())) {
|
||||||
this.created = Date.from(Instant.parse(fields.get(MapKey.CREATED.getName()).toString()));
|
this.created = Date.from(Instant.parse(fields.get(MapKey.CREATED.getName()).toString()));
|
||||||
|
}
|
||||||
|
if (fields.containsKey(MapKey.MODIFIED.getName())) {
|
||||||
this.modified = Date.from(Instant.parse(fields.get(MapKey.MODIFIED.getName()).toString()));
|
this.modified = Date.from(Instant.parse(fields.get(MapKey.MODIFIED.getName()).toString()));
|
||||||
|
}
|
||||||
if (fields.get(MapKey.FINALIZEDAT.getName()) != null) {
|
if (fields.get(MapKey.FINALIZEDAT.getName()) != null) {
|
||||||
this.finalizedAt = Date.from(Instant.parse(fields.get(MapKey.FINALIZEDAT.getName()).toString()));
|
this.finalizedAt = Date.from(Instant.parse(fields.get(MapKey.FINALIZEDAT.getName()).toString()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class DmpRepository extends ElasticRepository<Dmp, DmpCriteria> {
|
||||||
|
|
||||||
}
|
}
|
||||||
searchSourceBuilder.query(boolQuery).from(criteria.getOffset()).fetchSource("id", null);
|
searchSourceBuilder.query(boolQuery).from(criteria.getOffset()).fetchSource("id", null);
|
||||||
if (criteria.getSize() > 0) {
|
if (criteria.getSize() != null && criteria.getSize() > 0) {
|
||||||
searchSourceBuilder.size(criteria.getSize());
|
searchSourceBuilder.size(criteria.getSize());
|
||||||
}
|
}
|
||||||
sortBuilders.forEach(searchSourceBuilder::sort);
|
sortBuilders.forEach(searchSourceBuilder::sort);
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package eu.eudat.cache;
|
||||||
|
|
||||||
|
import eu.eudat.logic.proxy.config.ExternalUrlCriteria;
|
||||||
|
import org.springframework.cache.interceptor.KeyGenerator;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
public class ExternalUrlsKeyGenerator implements KeyGenerator {
|
||||||
|
@Override
|
||||||
|
public Object generate(Object o, Method method, Object... params) {
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
stringBuffer.append(o.getClass().getSimpleName()).append("_");
|
||||||
|
stringBuffer.append(method.getName()).append("_");
|
||||||
|
for (Object param: params) {
|
||||||
|
if (param instanceof ExternalUrlCriteria) {
|
||||||
|
ExternalUrlCriteria externalUrlCriteria = (ExternalUrlCriteria) param;
|
||||||
|
stringBuffer.append(externalUrlCriteria);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return stringBuffer.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cache.CacheManager;
|
import org.springframework.cache.CacheManager;
|
||||||
import org.springframework.cache.annotation.EnableCaching;
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
import org.springframework.cache.caffeine.CaffeineCache;
|
import org.springframework.cache.caffeine.CaffeineCache;
|
||||||
|
import org.springframework.cache.interceptor.KeyGenerator;
|
||||||
import org.springframework.cache.support.SimpleCacheManager;
|
import org.springframework.cache.support.SimpleCacheManager;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -47,4 +48,9 @@ public class ResponsesCache {
|
||||||
return simpleCacheManager;
|
return simpleCacheManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean(name = "externalUrlsKeyGenerator")
|
||||||
|
private KeyGenerator externalUrlsKeyGenerator() {
|
||||||
|
return new ExternalUrlsKeyGenerator();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class DashBoardController extends BaseController {
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<RecentActivityModel>>().status(ApiMessageCode.NO_MESSAGE).payload(statistics));
|
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<RecentActivityModel>>().status(ApiMessageCode.NO_MESSAGE).payload(statistics));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
@RequestMapping(method = RequestMethod.GET, value = {"/user/recentActivity"}, produces = "application/json")
|
@RequestMapping(method = RequestMethod.GET, value = {"/user/recentActivity"}, produces = "application/json")
|
||||||
public ResponseEntity<ResponseItem<RecentActivity>> getRecentActivity(@RequestParam(name = "numOfActivities", required = false, defaultValue = "5") Integer numberOfActivities, Principal principal) {
|
public ResponseEntity<ResponseItem<RecentActivity>> getRecentActivity(@RequestParam(name = "numOfActivities", required = false, defaultValue = "5") Integer numberOfActivities, Principal principal) {
|
||||||
RecentActivity statistics = dashBoardManager.getRecentActivity(principal, numberOfActivities);
|
RecentActivity statistics = dashBoardManager.getRecentActivity(principal, numberOfActivities);
|
||||||
|
|
|
@ -39,11 +39,11 @@ import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.persistence.NoResultException;
|
import javax.persistence.NoResultException;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -121,7 +121,7 @@ public class Datasets extends BaseController {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@javax.transaction.Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.GET, value = {"{id}"}, produces = "application/json")
|
@RequestMapping(method = RequestMethod.GET, value = {"{id}"}, produces = "application/json")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity getSingle(@PathVariable String id, @RequestHeader("Content-Type") String contentType, @ClaimedAuthorities(claims = {Authorities.ADMIN, Authorities.MANAGER, Authorities.USER, Authorities.ANONYMOUS}) Principal principal) throws IllegalAccessException, IOException, InstantiationException {
|
ResponseEntity getSingle(@PathVariable String id, @RequestHeader("Content-Type") String contentType, @ClaimedAuthorities(claims = {Authorities.ADMIN, Authorities.MANAGER, Authorities.USER, Authorities.ANONYMOUS}) Principal principal) throws IllegalAccessException, IOException, InstantiationException {
|
||||||
|
@ -246,7 +246,7 @@ public class Datasets extends BaseController {
|
||||||
* Data Management
|
* Data Management
|
||||||
* */
|
* */
|
||||||
|
|
||||||
@javax.transaction.Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
|
@RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity<ResponseItem<DatasetWizardModel>> createOrUpdate(@RequestBody DatasetWizardModel profile, Principal principal) throws Exception {
|
ResponseEntity<ResponseItem<DatasetWizardModel>> createOrUpdate(@RequestBody DatasetWizardModel profile, Principal principal) throws Exception {
|
||||||
|
@ -262,7 +262,7 @@ public class Datasets extends BaseController {
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<Dataset>().status(ApiMessageCode.SUCCESS_MESSAGE).message(this.getApiContext().getHelpersService().getMessageSource().getMessage("dataset.public", new Object[]{}, locale)));
|
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<Dataset>().status(ApiMessageCode.SUCCESS_MESSAGE).message(this.getApiContext().getHelpersService().getMessageSource().getMessage("dataset.public", new Object[]{}, locale)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@javax.transaction.Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = {"/delete/{id}"}, produces = "application/json")
|
@RequestMapping(method = RequestMethod.DELETE, value = {"/delete/{id}"}, produces = "application/json")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity<ResponseItem<Dataset>> delete(@PathVariable(value = "id") UUID id, Principal principal) throws Exception {
|
ResponseEntity<ResponseItem<Dataset>> delete(@PathVariable(value = "id") UUID id, Principal principal) throws Exception {
|
||||||
|
@ -270,7 +270,7 @@ public class Datasets extends BaseController {
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<Dataset>().status(ApiMessageCode.SUCCESS_MESSAGE).message("Deleted"));
|
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<Dataset>().status(ApiMessageCode.SUCCESS_MESSAGE).message("Deleted"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@javax.transaction.Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.GET, value = {"/{id}/unlock"}, produces = "application/json")
|
@RequestMapping(method = RequestMethod.GET, value = {"/{id}/unlock"}, produces = "application/json")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity<ResponseItem<Dataset>> unlock(@PathVariable(value = "id") UUID id, Principal principal) throws Exception {
|
ResponseEntity<ResponseItem<Dataset>> unlock(@PathVariable(value = "id") UUID id, Principal principal) throws Exception {
|
||||||
|
@ -318,7 +318,7 @@ public class Datasets extends BaseController {
|
||||||
* Data Index
|
* Data Index
|
||||||
* */
|
* */
|
||||||
|
|
||||||
@javax.transaction.Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.POST, value = {"/index"})
|
@RequestMapping(method = RequestMethod.POST, value = {"/index"})
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity<ResponseItem<Dataset>> generateIndex(Principal principal) throws Exception {
|
ResponseEntity<ResponseItem<Dataset>> generateIndex(Principal principal) throws Exception {
|
||||||
|
@ -326,7 +326,7 @@ public class Datasets extends BaseController {
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<eu.eudat.data.entities.Dataset>().status(ApiMessageCode.SUCCESS_MESSAGE).message("Generated").payload(null));
|
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<eu.eudat.data.entities.Dataset>().status(ApiMessageCode.SUCCESS_MESSAGE).message("Generated").payload(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@javax.transaction.Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = {"/index"})
|
@RequestMapping(method = RequestMethod.DELETE, value = {"/index"})
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity<ResponseItem<Dataset>> clearIndex(Principal principal) throws Exception {
|
ResponseEntity<ResponseItem<Dataset>> clearIndex(Principal principal) throws Exception {
|
||||||
|
|
|
@ -50,8 +50,11 @@ public class UserInvitationController extends BaseController {
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.POST, value = {"/getUsers"}, consumes = "application/json", produces = "application/json")
|
@RequestMapping(method = RequestMethod.POST, value = {"/getUsers"}, consumes = "application/json", produces = "application/json")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ResponseEntity<ResponseItem<List<UserInfoInvitationModel>>> getUsers(Principal principal) throws IllegalAccessException, InstantiationException {
|
// ResponseEntity<ResponseItem<List<UserInfoInvitationModel>>> getUsers(Principal principal) throws IllegalAccessException, InstantiationException {
|
||||||
List<UserInfoInvitationModel> users = invitationsManager.getUsers(principal);
|
ResponseEntity<ResponseItem<List<UserInfoInvitationModel>>> getUsers(Principal principal, @RequestBody UserInfoRequestItem userInfoRequestItem) throws IllegalAccessException, InstantiationException {
|
||||||
|
System.out.println(userInfoRequestItem.getCriteria().getLike());
|
||||||
|
// List<UserInfoInvitationModel> users = invitationsManager.getUsers(principal);
|
||||||
|
List<UserInfoInvitationModel> users = invitationsManager.getUsersWithCriteria(principal, userInfoRequestItem);
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<UserInfoInvitationModel>>().status(ApiMessageCode.SUCCESS_MESSAGE).payload(users));
|
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<UserInfoInvitationModel>>().status(ApiMessageCode.SUCCESS_MESSAGE).payload(users));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class DashBoardManager {
|
||||||
if ((dmps == null || dmps == 0L) && (datasets == null || datasets == 0L)) {
|
if ((dmps == null || dmps == 0L) && (datasets == null || datasets == 0L)) {
|
||||||
CompletableFuture dmpFuture = dataManagementPlanRepository.getAuthenticated(dataManagementPlanRepository.getWithCriteria(dataManagementPlanCriteria), principal.getId(), roles).distinct().countAsync()
|
CompletableFuture dmpFuture = dataManagementPlanRepository.getAuthenticated(dataManagementPlanRepository.getWithCriteria(dataManagementPlanCriteria), principal.getId(), roles).distinct().countAsync()
|
||||||
.whenComplete((dmpsStats, throwable) -> statistics.setTotalDataManagementPlanCount(dmpsStats));
|
.whenComplete((dmpsStats, throwable) -> statistics.setTotalDataManagementPlanCount(dmpsStats));
|
||||||
CompletableFuture datasetFuture = datasetRepository.getAuthenticated( datasetRepository.getWithCriteria(datasetCriteria), user, roles).countAsync()
|
CompletableFuture datasetFuture = datasetRepository.getAuthenticated( datasetRepository.getWithCriteria(datasetCriteria), user, roles).distinct().countAsync()
|
||||||
.whenComplete((datasetsStats, throwable) -> statistics.setTotalDataSetCount(datasetsStats));
|
.whenComplete((datasetsStats, throwable) -> statistics.setTotalDataSetCount(datasetsStats));
|
||||||
CompletableFuture.allOf(dmpFuture, datasetFuture).join();
|
CompletableFuture.allOf(dmpFuture, datasetFuture).join();
|
||||||
} else {
|
} else {
|
||||||
|
@ -168,6 +168,7 @@ public class DashBoardManager {
|
||||||
return statistics;
|
return statistics;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public RecentActivity getRecentActivity(Principal principal, Integer numberofactivities) {
|
public RecentActivity getRecentActivity(Principal principal, Integer numberofactivities) {
|
||||||
RecentActivity activity = new RecentActivity();
|
RecentActivity activity = new RecentActivity();
|
||||||
DMPDao dataManagementPlanRepository = databaseRepository.getDmpDao();
|
DMPDao dataManagementPlanRepository = databaseRepository.getDmpDao();
|
||||||
|
@ -190,7 +191,7 @@ public class DashBoardManager {
|
||||||
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
|
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
|
||||||
.whenComplete((dmpActivities, throwable) -> activity.setRecentDmpActivities(dmpActivities));
|
.whenComplete((dmpActivities, throwable) -> activity.setRecentDmpActivities(dmpActivities));
|
||||||
|
|
||||||
CompletableFuture<List<RecentActivityData>> datasets = datasetRepository.getAuthenticated(datasetRepository.getWithCriteria(datasetCriteria), user, roles)
|
CompletableFuture<List<RecentActivityData>> datasets = datasetRepository.getAuthenticated(datasetRepository.getWithCriteria(datasetCriteria), user, roles).distinct()
|
||||||
.withHint("datasetRecentActivity")
|
.withHint("datasetRecentActivity")
|
||||||
.orderBy((builder, root) -> builder.desc(root.get("modified")))
|
.orderBy((builder, root) -> builder.desc(root.get("modified")))
|
||||||
.take(numberofactivities)
|
.take(numberofactivities)
|
||||||
|
@ -312,7 +313,7 @@ public class DashBoardManager {
|
||||||
roles.add(UserDMP.UserDMPRoles.USER.getValue());
|
roles.add(UserDMP.UserDMPRoles.USER.getValue());
|
||||||
roles.add(UserDMP.UserDMPRoles.OWNER.getValue());
|
roles.add(UserDMP.UserDMPRoles.OWNER.getValue());
|
||||||
dmpList = dataManagementPlanRepository.getAuthenticated(dmpList, principal.getId(), roles);
|
dmpList = dataManagementPlanRepository.getAuthenticated(dmpList, principal.getId(), roles);
|
||||||
datasetList = datasetRepository.getAuthenticated(datasetList, user, roles);
|
datasetList = datasetRepository.getAuthenticated(datasetList, user, roles).distinct();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,9 +325,11 @@ public class DashBoardManager {
|
||||||
recentActivityModels.addAll(dmps1.stream().map(dmp -> {
|
recentActivityModels.addAll(dmps1.stream().map(dmp -> {
|
||||||
DatasetCriteria datasetCriteria1 = new DatasetCriteria();
|
DatasetCriteria datasetCriteria1 = new DatasetCriteria();
|
||||||
datasetCriteria1.setDmpIds(Collections.singletonList(dmp.getId()));
|
datasetCriteria1.setDmpIds(Collections.singletonList(dmp.getId()));
|
||||||
|
datasetCriteria1.setAllVersions(false);
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
dmp.setDataset(retrieveRelevantDatasets(datasetCriteria1, principal.getId()));
|
dmp.setDataset(retrieveRelevantDatasets(datasetCriteria1, principal.getId()));
|
||||||
} else {
|
} else {
|
||||||
|
datasetCriteria1.setIsPublic(true);
|
||||||
dmp.setDataset(retrieveRelevantDatasets(datasetCriteria1));
|
dmp.setDataset(retrieveRelevantDatasets(datasetCriteria1));
|
||||||
}
|
}
|
||||||
return new RecentDmpModel().fromDataModel(dmp);
|
return new RecentDmpModel().fromDataModel(dmp);
|
||||||
|
@ -446,14 +449,14 @@ public class DashBoardManager {
|
||||||
roles.add(1);
|
roles.add(1);
|
||||||
datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getAuthenticated(datasetItems, userInfo, roles);
|
datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getAuthenticated(datasetItems, userInfo, roles);
|
||||||
}
|
}
|
||||||
Long maxDatasets = datasetItems.count();
|
Long maxDatasets = datasetItems.distinct().count();
|
||||||
DatasetTableRequest datasetTableRequest = new DatasetTableRequest();
|
DatasetTableRequest datasetTableRequest = new DatasetTableRequest();
|
||||||
datasetTableRequest.setOffset(0);
|
datasetTableRequest.setOffset(0);
|
||||||
datasetTableRequest.setLength(3);
|
datasetTableRequest.setLength(3);
|
||||||
Set<Dataset> datasetsSet = new LinkedHashSet<>();
|
Set<Dataset> datasetsSet = new LinkedHashSet<>();
|
||||||
try {
|
try {
|
||||||
datasetItems = PaginationManager.applyPaging(datasetItems, datasetTableRequest);
|
datasetItems = PaginationManager.applyPaging(datasetItems, datasetTableRequest);
|
||||||
List<Dataset> datasets = datasetItems.toList();
|
List<Dataset> datasets = datasetItems.distinct().toList();
|
||||||
datasetsSet.addAll(datasets);
|
datasetsSet.addAll(datasets);
|
||||||
for (int i = 0; i < maxDatasets - datasets.size(); i++) {
|
for (int i = 0; i < maxDatasets - datasets.size(); i++) {
|
||||||
Dataset fakedataset = new Dataset();
|
Dataset fakedataset = new Dataset();
|
||||||
|
|
|
@ -79,6 +79,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
import javax.xml.bind.JAXBContext;
|
import javax.xml.bind.JAXBContext;
|
||||||
import javax.xml.bind.JAXBException;
|
import javax.xml.bind.JAXBException;
|
||||||
import javax.xml.bind.Unmarshaller;
|
import javax.xml.bind.Unmarshaller;
|
||||||
|
@ -184,6 +185,8 @@ public class DataManagementPlanManager {
|
||||||
dataTable.setData(dmps1.stream().map(dmp -> {
|
dataTable.setData(dmps1.stream().map(dmp -> {
|
||||||
DatasetCriteria datasetCriteria = new DatasetCriteria();
|
DatasetCriteria datasetCriteria = new DatasetCriteria();
|
||||||
datasetCriteria.setDmpIds(Collections.singletonList(dmp.getId()));
|
datasetCriteria.setDmpIds(Collections.singletonList(dmp.getId()));
|
||||||
|
datasetCriteria.setAllVersions(false);
|
||||||
|
datasetCriteria.setIsPublic(dataManagementPlanTableRequest.getCriteria().getIsPublic());
|
||||||
dmp.setDataset(retrieveRelevantDatasets(datasetCriteria, principalID));
|
dmp.setDataset(retrieveRelevantDatasets(datasetCriteria, principalID));
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,14 +252,14 @@ public class DataManagementPlanManager {
|
||||||
roles.add(1);
|
roles.add(1);
|
||||||
datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getAuthenticated(datasetItems, userInfo, roles);
|
datasetItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getAuthenticated(datasetItems, userInfo, roles);
|
||||||
}
|
}
|
||||||
Long maxDatasets = datasetItems.count();
|
Long maxDatasets = datasetItems.distinct().count();
|
||||||
DatasetTableRequest datasetTableRequest = new DatasetTableRequest();
|
DatasetTableRequest datasetTableRequest = new DatasetTableRequest();
|
||||||
datasetTableRequest.setOffset(0);
|
datasetTableRequest.setOffset(0);
|
||||||
datasetTableRequest.setLength(3);
|
datasetTableRequest.setLength(3);
|
||||||
Set<Dataset> datasetsSet = new LinkedHashSet<>();
|
Set<Dataset> datasetsSet = new LinkedHashSet<>();
|
||||||
try {
|
try {
|
||||||
datasetItems = PaginationManager.applyPaging(datasetItems, datasetTableRequest);
|
datasetItems = PaginationManager.applyPaging(datasetItems, datasetTableRequest);
|
||||||
List<Dataset> datasets = datasetItems.toList();
|
List<Dataset> datasets = datasetItems.distinct().toList();
|
||||||
datasetsSet.addAll(datasets);
|
datasetsSet.addAll(datasets);
|
||||||
for (int i = 0; i < maxDatasets - datasets.size(); i++) {
|
for (int i = 0; i < maxDatasets - datasets.size(); i++) {
|
||||||
Dataset fakedataset = new Dataset();
|
Dataset fakedataset = new Dataset();
|
||||||
|
@ -598,6 +601,9 @@ public class DataManagementPlanManager {
|
||||||
datasets.add(dataset);
|
datasets.add(dataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UUID dmpId = result.getId();
|
||||||
|
result.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
|
|
||||||
this.updateIndex(result);
|
this.updateIndex(result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -709,6 +715,8 @@ public class DataManagementPlanManager {
|
||||||
DatasetCriteria criteria1 = new DatasetCriteria();
|
DatasetCriteria criteria1 = new DatasetCriteria();
|
||||||
criteria1.setDmpIds(Collections.singletonList(newDmp.getId()));
|
criteria1.setDmpIds(Collections.singletonList(newDmp.getId()));
|
||||||
newDmp.setDataset(new HashSet<>(databaseRepository.getDatasetDao().getWithCriteria(criteria1).toList()));
|
newDmp.setDataset(new HashSet<>(databaseRepository.getDatasetDao().getWithCriteria(criteria1).toList()));
|
||||||
|
UUID dmpId = newDmp.getId();
|
||||||
|
newDmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
|
|
||||||
this.updateIndex(newDmp);
|
this.updateIndex(newDmp);
|
||||||
metricsManager.increaseValue(MetricNames.DMP, 1, MetricNames.DRAFT);
|
metricsManager.increaseValue(MetricNames.DMP, 1, MetricNames.DRAFT);
|
||||||
|
@ -739,12 +747,16 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
oldDmp.setStatus(DMP.DMPStatus.DELETED.getValue());
|
oldDmp.setStatus(DMP.DMPStatus.DELETED.getValue());
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(oldDmp);
|
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(oldDmp);
|
||||||
|
UUID dmpId = oldDmp.getId();
|
||||||
|
oldDmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.updateIndex(oldDmp);
|
this.updateIndex(oldDmp);
|
||||||
DataManagementPlanCriteria criteria1 = new DataManagementPlanCriteria();
|
DataManagementPlanCriteria criteria1 = new DataManagementPlanCriteria();
|
||||||
criteria1.setAllVersions(true);
|
criteria1.setAllVersions(true);
|
||||||
criteria1.setGroupIds(Collections.singletonList(oldDmp.getGroupId()));
|
criteria1.setGroupIds(Collections.singletonList(oldDmp.getGroupId()));
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().getWithCriteria(criteria1).toList().forEach(dmp -> {
|
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().getWithCriteria(criteria1).toList().forEach(dmp -> {
|
||||||
try {
|
try {
|
||||||
|
UUID tdmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), tdmpId)).toList()));
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
@ -756,6 +768,7 @@ public class DataManagementPlanManager {
|
||||||
if (elastic != null) {
|
if (elastic != null) {
|
||||||
tags = elastic.getTags();
|
tags = elastic.getTags();
|
||||||
}
|
}
|
||||||
|
dataset.setDmp(dmp);
|
||||||
this.datasetManager.updateTags(dataset, tags);
|
this.datasetManager.updateTags(dataset, tags);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
@ -890,7 +903,8 @@ public class DataManagementPlanManager {
|
||||||
if (elastic != null) {
|
if (elastic != null) {
|
||||||
tags = elastic.getTags();
|
tags = elastic.getTags();
|
||||||
}
|
}
|
||||||
|
UUID dmpId = tempDataset.getDmp().getId();
|
||||||
|
tempDataset.getDmp().setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.datasetManager.updateTags(tempDataset, tags);
|
this.datasetManager.updateTags(tempDataset, tags);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
@ -1007,6 +1021,8 @@ public class DataManagementPlanManager {
|
||||||
throw new Exception("DMP is not finalized");
|
throw new Exception("DMP is not finalized");
|
||||||
dmp.setPublic(true);
|
dmp.setPublic(true);
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
|
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
|
||||||
|
UUID dmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
metricsManager.increaseValue(MetricNames.DMP, 1, MetricNames.PUBLISHED);
|
metricsManager.increaseValue(MetricNames.DMP, 1, MetricNames.PUBLISHED);
|
||||||
DataManagementPlanCriteria criteria = new DataManagementPlanCriteria();
|
DataManagementPlanCriteria criteria = new DataManagementPlanCriteria();
|
||||||
|
@ -1020,6 +1036,8 @@ public class DataManagementPlanManager {
|
||||||
if (elastic != null) {
|
if (elastic != null) {
|
||||||
tags = elastic.getTags();
|
tags = elastic.getTags();
|
||||||
}
|
}
|
||||||
|
UUID tmdmpId = dataset.getDmp().getId();
|
||||||
|
dataset.getDmp().setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), tmdmpId)).toList()));
|
||||||
this.datasetManager.updateTags(dataset, tags);
|
this.datasetManager.updateTags(dataset, tags);
|
||||||
metricsManager.increaseValue(MetricNames.DATASET, 1, MetricNames.PUBLISHED);
|
metricsManager.increaseValue(MetricNames.DATASET, 1, MetricNames.PUBLISHED);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1034,6 +1052,7 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public void makeFinalize(UUID id, Principal principal, DatasetsToBeFinalized datasetsToBeFinalized) throws Exception {
|
public void makeFinalize(UUID id, Principal principal, DatasetsToBeFinalized datasetsToBeFinalized) throws Exception {
|
||||||
DMP dmp = this.apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().find(id);
|
DMP dmp = this.apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().find(id);
|
||||||
if (!isUserOwnerOfDmp(dmp, principal))
|
if (!isUserOwnerOfDmp(dmp, principal))
|
||||||
|
@ -1104,6 +1123,8 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
dmp.setStatus(DMP.DMPStatus.FINALISED.getValue());
|
dmp.setStatus(DMP.DMPStatus.FINALISED.getValue());
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
|
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
|
||||||
|
UUID dmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
UserInfo user = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
|
UserInfo user = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
|
||||||
sendNotification(dmp, user, NotificationType.DMP_FINALISED);
|
sendNotification(dmp, user, NotificationType.DMP_FINALISED);
|
||||||
|
@ -1122,6 +1143,8 @@ public class DataManagementPlanManager {
|
||||||
throw new Exception("DMP is already Active");
|
throw new Exception("DMP is already Active");
|
||||||
dmp.setStatus(DMP.DMPStatus.ACTIVE.getValue());
|
dmp.setStatus(DMP.DMPStatus.ACTIVE.getValue());
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
|
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().createOrUpdate(dmp);
|
||||||
|
UUID dmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
metricsManager.decreaseValue(MetricNames.DMP, 1, MetricNames.FINALIZED);
|
metricsManager.decreaseValue(MetricNames.DMP, 1, MetricNames.FINALIZED);
|
||||||
metricsManager.increaseValue(MetricNames.DMP, 1, MetricNames.DRAFT);
|
metricsManager.increaseValue(MetricNames.DMP, 1, MetricNames.DRAFT);
|
||||||
|
@ -1322,7 +1345,7 @@ public class DataManagementPlanManager {
|
||||||
eu.eudat.data.entities.DMP dmp = databaseRepository.getDmpDao().find(UUID.fromString(id));
|
eu.eudat.data.entities.DMP dmp = databaseRepository.getDmpDao().find(UUID.fromString(id));
|
||||||
if (!dmp.isPublic() && dmp.getUsers().stream().filter(userInfo -> userInfo.getUser().getId() == principal.getId()).collect(Collectors.toList()).size() == 0)
|
if (!dmp.isPublic() && dmp.getUsers().stream().filter(userInfo -> userInfo.getUser().getId() == principal.getId()).collect(Collectors.toList()).size() == 0)
|
||||||
throw new UnauthorisedException();
|
throw new UnauthorisedException();
|
||||||
List<Dataset> datasets = dmp.getDataset().stream().collect(Collectors.toList());
|
List<Dataset> datasets = dmp.getDataset().stream().filter(dataset -> dataset.getStatus() != Dmp.DMPStatus.DELETED.getValue()).collect(Collectors.toList());
|
||||||
/*String fileName = dmp.getLabel();
|
/*String fileName = dmp.getLabel();
|
||||||
fileName = fileName.replaceAll("[^a-zA-Z0-9+ ]", "");*/
|
fileName = fileName.replaceAll("[^a-zA-Z0-9+ ]", "");*/
|
||||||
String uuid = UUID.randomUUID().toString();
|
String uuid = UUID.randomUUID().toString();
|
||||||
|
@ -1731,6 +1754,8 @@ public class DataManagementPlanManager {
|
||||||
databaseRepository.getDmpDao().createOrUpdate(dmp);
|
databaseRepository.getDmpDao().createOrUpdate(dmp);
|
||||||
assignUser(dmp, me);
|
assignUser(dmp, me);
|
||||||
if (this.apiContext.getOperationsContext().getElasticRepository().getDmpRepository().getClient() != null) {
|
if (this.apiContext.getOperationsContext().getElasticRepository().getDmpRepository().getClient() != null) {
|
||||||
|
UUID dmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
}
|
}
|
||||||
dmp.getDataset().forEach(dataset -> {
|
dmp.getDataset().forEach(dataset -> {
|
||||||
|
@ -1753,13 +1778,13 @@ public class DataManagementPlanManager {
|
||||||
try {
|
try {
|
||||||
List<Tag> tags = new ArrayList<>();
|
List<Tag> tags = new ArrayList<>();
|
||||||
eu.eudat.elastic.entities.Dataset elastic = apiContext.getOperationsContext().getElasticRepository().getDatasetRepository().findDocument(dataset.getId().toString());
|
eu.eudat.elastic.entities.Dataset elastic = apiContext.getOperationsContext().getElasticRepository().getDatasetRepository().findDocument(dataset.getId().toString());
|
||||||
|
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
||||||
if (elastic != null) {
|
if (elastic != null) {
|
||||||
tags = elastic.getTags();
|
tags = elastic.getTags();
|
||||||
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
|
||||||
datasetWizardModel.setTags(tags);
|
datasetWizardModel.setTags(tags);
|
||||||
|
}
|
||||||
datasetManager.getTagsFromProfile(datasetWizardModel, dataset);
|
datasetManager.getTagsFromProfile(datasetWizardModel, dataset);
|
||||||
datasetManager.updateTags(dataset, datasetWizardModel.getTags());
|
datasetManager.updateTags(dataset, datasetWizardModel.getTags());
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
@ -1822,6 +1847,9 @@ public class DataManagementPlanManager {
|
||||||
try {
|
try {
|
||||||
if (dmp.getUsers() != null) {
|
if (dmp.getUsers() != null) {
|
||||||
logger.info(dmp.getUsers().toString());
|
logger.info(dmp.getUsers().toString());
|
||||||
|
} else {
|
||||||
|
UUID dmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
}
|
}
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -1839,6 +1867,8 @@ public class DataManagementPlanManager {
|
||||||
if (elastic != null) {
|
if (elastic != null) {
|
||||||
tags = elastic.getTags();
|
tags = elastic.getTags();
|
||||||
}
|
}
|
||||||
|
UUID dmpId = dataset.getDmp().getId();
|
||||||
|
dataset.getDmp().setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.datasetManager.updateTags(dataset, tags);
|
this.datasetManager.updateTags(dataset, tags);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
@ -1859,6 +1889,8 @@ public class DataManagementPlanManager {
|
||||||
List<DMP> dmps = apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().asQueryable().toList();
|
List<DMP> dmps = apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().asQueryable().toList();
|
||||||
dmps.forEach(dmp -> {
|
dmps.forEach(dmp -> {
|
||||||
try {
|
try {
|
||||||
|
UUID dmpId = dmp.getId();
|
||||||
|
dmp.setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
this.updateIndex(dmp);
|
this.updateIndex(dmp);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
@ -2093,10 +2125,10 @@ public class DataManagementPlanManager {
|
||||||
}
|
}
|
||||||
dataBuilder.append(" }\n").append("}");
|
dataBuilder.append(" }\n").append("}");
|
||||||
createData = dataBuilder.toString();
|
createData = dataBuilder.toString();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
/*ObjectMapper mapper = new ObjectMapper();
|
||||||
mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);
|
mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true);
|
||||||
JsonNode createDataJSON = mapper.readTree(createData);
|
JsonNode createDataJSON = mapper.readTree(createData);*/
|
||||||
HttpEntity<JsonNode> request = new HttpEntity<>(createDataJSON, headers);
|
HttpEntity<String> request = new HttpEntity<>(createData, headers);
|
||||||
Map createResponse = null;
|
Map createResponse = null;
|
||||||
LinkedHashMap<String, String> links = null;
|
LinkedHashMap<String, String> links = null;
|
||||||
String previousDOI = this.getPreviousDOI(dmp.getGroupId(), dmp.getId());
|
String previousDOI = this.getPreviousDOI(dmp.getGroupId(), dmp.getId());
|
||||||
|
|
|
@ -192,7 +192,7 @@ public class DatasetManager {
|
||||||
if (datasetTableRequest.getCriteria().getRole() != null) {
|
if (datasetTableRequest.getCriteria().getRole() != null) {
|
||||||
roles.add(datasetTableRequest.getCriteria().getRole());
|
roles.add(datasetTableRequest.getCriteria().getRole());
|
||||||
}
|
}
|
||||||
authItems = databaseRepository.getDatasetDao().getAuthenticated(items, userInfo, roles);
|
authItems = databaseRepository.getDatasetDao().getAuthenticated(items, userInfo, roles).distinct();
|
||||||
pagedItems = PaginationManager.applyPaging(authItems, datasetTableRequest);
|
pagedItems = PaginationManager.applyPaging(authItems, datasetTableRequest);
|
||||||
} else {
|
} else {
|
||||||
if (principal.getId() != null && datasetTableRequest.getCriteria().getRole() != null) {
|
if (principal.getId() != null && datasetTableRequest.getCriteria().getRole() != null) {
|
||||||
|
@ -598,6 +598,8 @@ public class DatasetManager {
|
||||||
}
|
}
|
||||||
dataset1.setProfile(this.apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(datasetWizardModel.getProfile().getId()));
|
dataset1.setProfile(this.apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(datasetWizardModel.getProfile().getId()));
|
||||||
// datasetWizardModel.setDatasetProfileDefinition(getPagedProfile(datasetWizardModel, dataset1));
|
// datasetWizardModel.setDatasetProfileDefinition(getPagedProfile(datasetWizardModel, dataset1));
|
||||||
|
UUID dmpId = dataset1.getDmp().getId();
|
||||||
|
dataset1.getDmp().setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
updateTags(dataset1, datasetWizardModel.getTags());
|
updateTags(dataset1, datasetWizardModel.getTags());
|
||||||
if (sendNotification) {
|
if (sendNotification) {
|
||||||
if (dataset1.getStatus() != Dataset.Status.FINALISED.getValue()) {
|
if (dataset1.getStatus() != Dataset.Status.FINALISED.getValue()) {
|
||||||
|
@ -1014,6 +1016,8 @@ public class DatasetManager {
|
||||||
datasetEntities.forEach(datasetEntity -> {
|
datasetEntities.forEach(datasetEntity -> {
|
||||||
try {
|
try {
|
||||||
eu.eudat.elastic.entities.Dataset dataset = apiContext.getOperationsContext().getElasticRepository().getDatasetRepository().findDocument(datasetEntity.getId().toString());
|
eu.eudat.elastic.entities.Dataset dataset = apiContext.getOperationsContext().getElasticRepository().getDatasetRepository().findDocument(datasetEntity.getId().toString());
|
||||||
|
UUID dmpId = datasetEntity.getDmp().getId();
|
||||||
|
datasetEntity.getDmp().setUsers(new HashSet<>(apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where((builder, root) -> builder.equal(root.get("dmp").get("id"), dmpId)).toList()));
|
||||||
updateTags(datasetEntity, dataset != null ? dataset.getTags() : null);
|
updateTags(datasetEntity, dataset != null ? dataset.getTags() : null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class DatasetProfileManager {
|
||||||
response = restTemplate.exchange(url, HttpMethod.GET, entity, Object.class);
|
response = restTemplate.exchange(url, HttpMethod.GET, entity, Object.class);
|
||||||
jsonContext = JsonPath.parse(response.getBody());
|
jsonContext = JsonPath.parse(response.getBody());
|
||||||
jsonItems = jsonContext.read(singleData.getOptionsRoot() + "['" + singleData.getAutoCompleteOptions().getLabel() + "','" + singleData.getAutoCompleteOptions().getValue() + "','" + singleData.getAutoCompleteOptions().getSource() + "','" + "uri" + "']");
|
jsonItems = jsonContext.read(singleData.getOptionsRoot() + "['" + singleData.getAutoCompleteOptions().getLabel() + "','" + singleData.getAutoCompleteOptions().getValue() + "','" + singleData.getAutoCompleteOptions().getSource() + "','" + "uri" + "']");
|
||||||
jsonItems.forEach(item -> result.add(new ExternalAutocompleteFieldModel(item.get(singleData.getAutoCompleteOptions().getValue()), item.get(singleData.getAutoCompleteOptions().getLabel()), item.get(singleData.getAutoCompleteOptions().getSource()) != null ? item.get(singleData.getAutoCompleteOptions().getSource()) : singleData.getAutoCompleteOptions().getSource(), item.get("uri"))));
|
jsonItems.forEach(item -> result.add(new ExternalAutocompleteFieldModel(parseItem(item.get(singleData.getAutoCompleteOptions().getValue())), parseItem(item.get(singleData.getAutoCompleteOptions().getLabel())), item.get(singleData.getAutoCompleteOptions().getSource()) != null ? parseItem(item.get(singleData.getAutoCompleteOptions().getSource())) : singleData.getAutoCompleteOptions().getSource(), parseItem(item.get("uri")))));
|
||||||
break;
|
break;
|
||||||
case CACHED:
|
case CACHED:
|
||||||
headers.setAccept(Collections.singletonList(MediaType.valueOf("text/plain; charset=utf-8")));
|
headers.setAccept(Collections.singletonList(MediaType.valueOf("text/plain; charset=utf-8")));
|
||||||
|
@ -202,6 +202,20 @@ public class DatasetProfileManager {
|
||||||
//return result;
|
//return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String parseItem(Object item) {
|
||||||
|
if (item instanceof String) {
|
||||||
|
return (String) item;
|
||||||
|
}
|
||||||
|
if (item instanceof List) {
|
||||||
|
List listedItems = (List) item;
|
||||||
|
return parseItem(listedItems.get(0));
|
||||||
|
}
|
||||||
|
if (item instanceof Map) {
|
||||||
|
return (String) ((Map)item).get("$");
|
||||||
|
}
|
||||||
|
return item != null ? item.toString() : null;
|
||||||
|
}
|
||||||
|
|
||||||
public ResponseEntity<byte[]> getDocument(eu.eudat.models.data.user.composite.DatasetProfile datasetProfile, String label) throws IllegalAccessException, IOException, InstantiationException {
|
public ResponseEntity<byte[]> getDocument(eu.eudat.models.data.user.composite.DatasetProfile datasetProfile, String label) throws IllegalAccessException, IOException, InstantiationException {
|
||||||
FileEnvelope envelope = getXmlDocument(datasetProfile, label);
|
FileEnvelope envelope = getXmlDocument(datasetProfile, label);
|
||||||
InputStream resource = new FileInputStream(envelope.getFile());
|
InputStream resource = new FileInputStream(envelope.getFile());
|
||||||
|
|
|
@ -3,6 +3,7 @@ package eu.eudat.logic.managers;
|
||||||
import eu.eudat.data.entities.DMP;
|
import eu.eudat.data.entities.DMP;
|
||||||
import eu.eudat.data.entities.UserDMP;
|
import eu.eudat.data.entities.UserDMP;
|
||||||
import eu.eudat.data.entities.UserInfo;
|
import eu.eudat.data.entities.UserInfo;
|
||||||
|
import eu.eudat.data.query.items.item.userinfo.UserInfoRequestItem;
|
||||||
import eu.eudat.exceptions.security.UnauthorisedException;
|
import eu.eudat.exceptions.security.UnauthorisedException;
|
||||||
import eu.eudat.logic.services.ApiContext;
|
import eu.eudat.logic.services.ApiContext;
|
||||||
import eu.eudat.logic.utilities.helpers.StreamDistinctBy;
|
import eu.eudat.logic.utilities.helpers.StreamDistinctBy;
|
||||||
|
@ -82,6 +83,23 @@ public class InvitationsManager {
|
||||||
return userModels;
|
return userModels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<UserInfoInvitationModel> getUsersWithCriteria(Principal principal, UserInfoRequestItem userInfoRequestItem) throws IllegalAccessException, InstantiationException {
|
||||||
|
List<UserInfo> users = apiContext.getOperationsContext().getDatabaseRepository().getDmpDao()
|
||||||
|
.getAuthenticated(apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().asQueryable()
|
||||||
|
.where(((builder, root) ->
|
||||||
|
builder.notEqual(root.get("status"), DMP.DMPStatus.DELETED.getValue()))), principal.getId(), Stream.of(0, 1).collect(Collectors.toList()))
|
||||||
|
.toList().stream().map(DMP::getUsers).flatMap(Collection::stream).map(UserDMP::getUser)
|
||||||
|
.filter(userInfo -> !userInfo.getId().equals(principal.getId())).filter(StreamDistinctBy.distinctByKey(UserInfo::getId))
|
||||||
|
.filter(userInfo -> (userInfoRequestItem == null || userInfoRequestItem.getCriteria() == null || userInfoRequestItem.getCriteria().getLike() == null
|
||||||
|
|| userInfo.getName().toLowerCase().contains(userInfoRequestItem.getCriteria().getLike().toLowerCase())
|
||||||
|
|| (userInfo.getEmail().toLowerCase().contains(userInfoRequestItem.getCriteria().getLike().toLowerCase()))))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
// .where((builder, root) -> builder.like(builder.upper(root.get("name")), "%" + userInfoRequestItem.getCriteria().getLike().toUpperCase() + "%"))
|
||||||
|
|
||||||
|
List<UserInfoInvitationModel> userModels = users.stream().map(userInfo -> new UserInfoInvitationModel().fromDataModel(userInfo)).collect(Collectors.toList());
|
||||||
|
return userModels;
|
||||||
|
}
|
||||||
|
|
||||||
public UUID assignUserAcceptedInvitation(UUID invitationID, Principal principal) throws UnauthorisedException, JAXBException, IOException {
|
public UUID assignUserAcceptedInvitation(UUID invitationID, Principal principal) throws UnauthorisedException, JAXBException, IOException {
|
||||||
eu.eudat.data.entities.Invitation invitation = apiContext.getOperationsContext().getDatabaseRepository().getInvitationDao().find(invitationID);
|
eu.eudat.data.entities.Invitation invitation = apiContext.getOperationsContext().getDatabaseRepository().getInvitationDao().find(invitationID);
|
||||||
if (invitation == null)
|
if (invitation == null)
|
||||||
|
|
|
@ -107,7 +107,10 @@ public class MetricsManager {
|
||||||
|
|
||||||
{MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them").labelNames("status").register(registry.getPrometheusRegistry())},
|
{MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them").labelNames("status").register(registry.getPrometheusRegistry())},
|
||||||
|
|
||||||
{MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them during Nexus").labelNames("status").register(registry.getPrometheusRegistry())}
|
{MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT, Gauge.build().name(MetricNames.NEXUS + MetricNames.DMP_WITH_GRANT).help("Number of Grants based on the status of the DMP that is using them during Nexus").labelNames("status").register(registry.getPrometheusRegistry())},
|
||||||
|
|
||||||
|
{MetricNames.INSTALLATIONS, Gauge.build().name(MetricNames.INSTALLATIONS).help("Number of Installations").register(registry.getPrometheusRegistry())},
|
||||||
|
{MetricNames.NEXUS + MetricNames.INSTALLATIONS, Gauge.build().name(MetricNames.NEXUS + MetricNames.INSTALLATIONS).help("Number of Installations").register(registry.getPrometheusRegistry())},
|
||||||
|
|
||||||
}).collect(Collectors.toMap(data -> (String)data[0], data -> (Gauge) data[1]));
|
}).collect(Collectors.toMap(data -> (String)data[0], data -> (Gauge) data[1]));
|
||||||
|
|
||||||
|
@ -172,6 +175,9 @@ public class MetricsManager {
|
||||||
long files = Files.list(Paths.get(this.environment.getProperty("userguide.path"))).count();
|
long files = Files.list(Paths.get(this.environment.getProperty("userguide.path"))).count();
|
||||||
calculateValue(MetricNames.LANGUAGES, (int) files, null);
|
calculateValue(MetricNames.LANGUAGES, (int) files, null);
|
||||||
|
|
||||||
|
calculateValue(MetricNames.INSTALLATIONS, 1, null);
|
||||||
|
calculateValue(MetricNames.NEXUS + MetricNames.INSTALLATIONS, 1, null);
|
||||||
|
|
||||||
logger.info("Metrics calculation Completed");
|
logger.info("Metrics calculation Completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class DmpMapper {
|
||||||
if (dataset1 != null) {
|
if (dataset1 != null) {
|
||||||
tags = dataset1.getTags();
|
tags = dataset1.getTags();
|
||||||
}
|
}
|
||||||
|
dataset.setDmp(dmp);
|
||||||
return datasetMapper.toElastic(dataset, tags);
|
return datasetMapper.toElastic(dataset, tags);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
|
|
@ -58,4 +58,16 @@ public class ExternalUrlCriteria {
|
||||||
|
|
||||||
public ExternalUrlCriteria() {
|
public ExternalUrlCriteria() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "{" +
|
||||||
|
"like='" + like + '\'' +
|
||||||
|
", page='" + page + '\'' +
|
||||||
|
", pageSize='" + pageSize + '\'' +
|
||||||
|
", funderId='" + funderId + '\'' +
|
||||||
|
", path='" + path + '\'' +
|
||||||
|
", host='" + host + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class DefaultConfigLoader implements ConfigLoader {
|
||||||
|
|
||||||
private void setRdaProperties() {
|
private void setRdaProperties() {
|
||||||
String filePath = environment.getProperty("configuration.rda");
|
String filePath = environment.getProperty("configuration.rda");
|
||||||
|
logger.info("Loaded also config file: " + filePath);
|
||||||
BufferedReader reader;
|
BufferedReader reader;
|
||||||
List<String> rdaList = new LinkedList<>();
|
List<String> rdaList = new LinkedList<>();
|
||||||
try {
|
try {
|
||||||
|
@ -83,6 +84,7 @@ public class DefaultConfigLoader implements ConfigLoader {
|
||||||
|
|
||||||
private void setDocument() {
|
private void setDocument() {
|
||||||
String filePath = environment.getProperty("configuration.h2020template");
|
String filePath = environment.getProperty("configuration.h2020template");
|
||||||
|
logger.info("Loaded also config file: " + filePath);
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
try {
|
try {
|
||||||
is = getStreamFromPath(filePath);
|
is = getStreamFromPath(filePath);
|
||||||
|
@ -100,6 +102,7 @@ public class DefaultConfigLoader implements ConfigLoader {
|
||||||
|
|
||||||
private void setConfigurableProviders() {
|
private void setConfigurableProviders() {
|
||||||
String filePath = environment.getProperty("configuration.configurable_login_providers");
|
String filePath = environment.getProperty("configuration.configurable_login_providers");
|
||||||
|
logger.info("Loaded also config file: " + filePath);
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
try {
|
try {
|
||||||
is = getStreamFromPath(filePath);
|
is = getStreamFromPath(filePath);
|
||||||
|
@ -206,7 +209,6 @@ public class DefaultConfigLoader implements ConfigLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setKeyToSourceMap();
|
|
||||||
return keyToSourceMap;
|
return keyToSourceMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class RemoteFetcher {
|
||||||
this.configLoader = configLoader;
|
this.configLoader = configLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("repositories")
|
@Cacheable(value = "repositories", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getRepositories(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getRepositories(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getRepositories().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getRepositories().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
@ -50,28 +50,28 @@ public class RemoteFetcher {
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("grants")
|
@Cacheable(value = "grants", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getGrants(ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getGrants(ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs = configLoader.getExternalUrls().getGrants().getUrls();
|
List<UrlConfiguration> urlConfigs = configLoader.getExternalUrls().getGrants().getUrls();
|
||||||
FetchStrategy fetchStrategy = configLoader.getExternalUrls().getGrants().getFetchMode();
|
FetchStrategy fetchStrategy = configLoader.getExternalUrls().getGrants().getFetchMode();
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("projects")
|
@Cacheable(value = "projects", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getProjects(ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getProjects(ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs = configLoader.getExternalUrls().getProjects().getUrls();
|
List<UrlConfiguration> urlConfigs = configLoader.getExternalUrls().getProjects().getUrls();
|
||||||
FetchStrategy fetchStrategy = configLoader.getExternalUrls().getProjects().getFetchMode();
|
FetchStrategy fetchStrategy = configLoader.getExternalUrls().getProjects().getFetchMode();
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("funders")
|
@Cacheable(value = "funders", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getFunders(ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getFunders(ExternalUrlCriteria externalUrlCriteria) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs = configLoader.getExternalUrls().getFunders().getUrls();
|
List<UrlConfiguration> urlConfigs = configLoader.getExternalUrls().getFunders().getUrls();
|
||||||
FetchStrategy fetchStrategy = configLoader.getExternalUrls().getFunders().getFetchMode();
|
FetchStrategy fetchStrategy = configLoader.getExternalUrls().getFunders().getFetchMode();
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("organisations")
|
@Cacheable(value = "organisations", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getOrganisations(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getOrganisations(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getOrganisations().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getOrganisations().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
@ -80,7 +80,7 @@ public class RemoteFetcher {
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("registries")
|
@Cacheable(value = "registries", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getRegistries(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getRegistries(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getRegistries().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getRegistries().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
@ -89,7 +89,7 @@ public class RemoteFetcher {
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("services")
|
@Cacheable(value = "services", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getServices(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getServices(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getServices().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getServices().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
@ -98,7 +98,7 @@ public class RemoteFetcher {
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("researchers")
|
@Cacheable(value = "researchers", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getResearchers(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getResearchers(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getResearchers().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getResearchers().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
@ -116,7 +116,7 @@ public class RemoteFetcher {
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
@Cacheable("externalDatasets")
|
@Cacheable(value = "externalDatasets", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getDatasets(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getDatasets(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getDatasets().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getDatasets().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
@ -125,7 +125,7 @@ public class RemoteFetcher {
|
||||||
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
return getAll(urlConfigs, fetchStrategy, externalUrlCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("licenses")
|
@Cacheable(value = "licenses", keyGenerator = "externalUrlsKeyGenerator")
|
||||||
public List<Map<String, String>> getlicenses(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
public List<Map<String, String>> getlicenses(ExternalUrlCriteria externalUrlCriteria, String key) throws NoURLFound, HugeResultSet {
|
||||||
List<UrlConfiguration> urlConfigs =
|
List<UrlConfiguration> urlConfigs =
|
||||||
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getLicenses().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
key != null && !key.isEmpty() ? configLoader.getExternalUrls().getLicenses().getUrls().stream().filter(item -> item.getKey().equals(key)).collect(Collectors.toList())
|
||||||
|
|
|
@ -25,6 +25,12 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.format.DateTimeParseException;
|
||||||
|
import java.time.temporal.TemporalAccessor;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -348,9 +354,17 @@ public class WordBuilder {
|
||||||
CheckBoxData data = (CheckBoxData) field.getData();
|
CheckBoxData data = (CheckBoxData) field.getData();
|
||||||
if (field.getValue() == null || field.getValue().equals("false")) return null;
|
if (field.getValue() == null || field.getValue().equals("false")) return null;
|
||||||
return data.getLabel();
|
return data.getLabel();
|
||||||
case "freetext":
|
|
||||||
case "datepicker":
|
case "datepicker":
|
||||||
case "datePicker":
|
case "datePicker":{
|
||||||
|
Instant instant;
|
||||||
|
try {
|
||||||
|
instant = Instant.parse((String) field.getValue());
|
||||||
|
} catch (DateTimeParseException ex) {
|
||||||
|
instant = Instant.from(DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).parse((String)field.getValue()));
|
||||||
|
}
|
||||||
|
return field.getValue() != null ? DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(instant) : "";
|
||||||
|
}
|
||||||
|
case "freetext":
|
||||||
case "textarea":
|
case "textarea":
|
||||||
case "richTextarea":
|
case "richTextarea":
|
||||||
return field.getValue() != null ? field.getValue().toString(): "";
|
return field.getValue() != null ? field.getValue().toString(): "";
|
||||||
|
|
|
@ -20,6 +20,9 @@ import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -126,9 +129,13 @@ public class ExportXmlBuilder {
|
||||||
Map<String, Object> jsonElement = mapper.readValue(field.getValue().toString(), Map.class);
|
Map<String, Object> jsonElement = mapper.readValue(field.getValue().toString(), Map.class);
|
||||||
valueField.setTextContent((jsonElement.get("label") != null ? jsonElement.get("label").toString() : jsonElement.get("name") != null ? jsonElement.get("name").toString() : ""));
|
valueField.setTextContent((jsonElement.get("label") != null ? jsonElement.get("label").toString() : jsonElement.get("name") != null ? jsonElement.get("name").toString() : ""));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
try {
|
||||||
|
valueField.setTextContent(DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(Instant.parse(field.getValue().toString())));
|
||||||
|
} catch (Exception exc) {
|
||||||
valueField.setTextContent(field.getValue().toString());
|
valueField.setTextContent(field.getValue().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
elementField.appendChild(valueField);
|
elementField.appendChild(valueField);
|
||||||
}
|
}
|
||||||
elementFields.appendChild(elementField);
|
elementFields.appendChild(elementField);
|
||||||
|
|
|
@ -95,14 +95,14 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
|
||||||
this.autoCompleteSingleDataList.add(new AutoCompleteSingleData());
|
this.autoCompleteSingleDataList.add(new AutoCompleteSingleData());
|
||||||
this.mapFromXml(item, this.autoCompleteSingleDataList.get(0));
|
this.mapFromXml(item, this.autoCompleteSingleDataList.get(0));
|
||||||
}
|
}
|
||||||
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutocomplete"));
|
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutoComplete"));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void mapFromXml(Element item, AutoCompleteSingleData singleData) {
|
private void mapFromXml(Element item, AutoCompleteSingleData singleData) {
|
||||||
singleData.url = item.getAttribute("url");
|
singleData.url = item.getAttribute("url");
|
||||||
singleData.optionsRoot = item.getAttribute("optionsRoot");
|
singleData.optionsRoot = item.getAttribute("optionsRoot");
|
||||||
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutocomplete"));
|
this.multiAutoComplete = Boolean.parseBoolean(item.getAttribute("multiAutoComplete"));
|
||||||
if (item.getAttribute("autoCompleteType") == null || item.getAttribute("autoCompleteType").equals("") ) {
|
if (item.getAttribute("autoCompleteType") == null || item.getAttribute("autoCompleteType").equals("") ) {
|
||||||
singleData.autocompleteType = AutocompleteType.UNCACHED.getValue();
|
singleData.autocompleteType = AutocompleteType.UNCACHED.getValue();
|
||||||
} else {
|
} else {
|
||||||
|
@ -173,7 +173,7 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData> {
|
||||||
dataMap.put("label", item != null ? item.getAttribute("label") : "");
|
dataMap.put("label", item != null ? item.getAttribute("label") : "");
|
||||||
//dataMap.put("url", item != null ? item.getAttribute("url") : "");
|
//dataMap.put("url", item != null ? item.getAttribute("url") : "");
|
||||||
dataMap.put("type", item != null ? item.getAttribute("type") : "autocomplete");
|
dataMap.put("type", item != null ? item.getAttribute("type") : "autocomplete");
|
||||||
dataMap.put("multiAutoComplete", item != null ? Boolean.valueOf(item.getAttribute("multiAutocomplete")) : false);
|
dataMap.put("multiAutoComplete", item != null ? Boolean.valueOf(item.getAttribute("multiAutoComplete")) : false);
|
||||||
List<Map<String, Object>> autoCompletes = new ArrayList<>();
|
List<Map<String, Object>> autoCompletes = new ArrayList<>();
|
||||||
NodeList autoCompleteSingles = item.getChildNodes();
|
NodeList autoCompleteSingles = item.getChildNodes();
|
||||||
for (int i = 0; i < autoCompleteSingles.getLength(); i++) {
|
for (int i = 0; i < autoCompleteSingles.getLength(); i++) {
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
||||||
this.grant = entity.getDmp() != null ? entity.getDmp().getGrant().getLabel() : "";
|
this.grant = entity.getDmp() != null ? entity.getDmp().getGrant().getLabel() : "";
|
||||||
this.dmp = entity.getDmp() != null ? entity.getDmp().getLabel() : "";
|
this.dmp = entity.getDmp() != null ? entity.getDmp().getLabel() : "";
|
||||||
this.dmpId = entity.getDmp() != null ? entity.getDmp().getId().toString() : "";
|
this.dmpId = entity.getDmp() != null ? entity.getDmp().getId().toString() : "";
|
||||||
//this.profile = entity.getProfile() != null ? new DatasetProfileOverviewModel().fromDataModel(entity.getProfile()) : null;
|
this.profile = entity.getProfile() != null ? new DatasetProfileOverviewModel().fromDataModel(entity.getProfile()) : null;
|
||||||
this.description = entity.getDescription();
|
this.description = entity.getDescription();
|
||||||
this.status = entity.getStatus();
|
this.status = entity.getStatus();
|
||||||
//this.grantAbbreviation = entity.getDmp() != null ? entity.getDmp().getGrant().getAbbreviation() : "";
|
//this.grantAbbreviation = entity.getDmp() != null ? entity.getDmp().getGrant().getAbbreviation() : "";
|
||||||
|
|
|
@ -20,6 +20,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.format.DateTimeParseException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
@ -152,8 +156,13 @@ public class DatasetRDAMapper {
|
||||||
templateIdsToValues.entrySet().forEach(entry -> {
|
templateIdsToValues.entrySet().forEach(entry -> {
|
||||||
boolean isFound = foundNodes.stream().anyMatch(node -> node.get("id").asText().equals(entry.getKey()));
|
boolean isFound = foundNodes.stream().anyMatch(node -> node.get("id").asText().equals(entry.getKey()));
|
||||||
if (!isFound && entry.getValue() != null && !entry.getValue().toString().isEmpty()) {
|
if (!isFound && entry.getValue() != null && !entry.getValue().toString().isEmpty()) {
|
||||||
|
try {
|
||||||
|
Instant time = Instant.parse(entry.getValue().toString());
|
||||||
|
rda.setAdditionalProperty(entry.getKey(), DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(time));
|
||||||
|
} catch (DateTimeParseException e) {
|
||||||
rda.setAdditionalProperty(entry.getKey(), entry.getValue());
|
rda.setAdditionalProperty(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class DmpRDAMapper {
|
||||||
rda.getContributor().addAll(dmp.getResearchers().stream().map(ContributorRDAMapper::toRDA).collect(Collectors.toList()));
|
rda.getContributor().addAll(dmp.getResearchers().stream().map(ContributorRDAMapper::toRDA).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
// rda.getContributor().addAll(dmp.getUsers().stream().map(ContributorRDAMapper::toRDA).collect(Collectors.toList()));
|
// rda.getContributor().addAll(dmp.getUsers().stream().map(ContributorRDAMapper::toRDA).collect(Collectors.toList()));
|
||||||
rda.setDataset(dmp.getDataset().stream().map(dataset -> datasetRDAMapper.toRDA(dataset, rda.getContributor())).collect(Collectors.toList()));
|
rda.setDataset(dmp.getDataset().stream().filter(dataset -> dataset.getStatus() != eu.eudat.elastic.entities.Dmp.DMPStatus.DELETED.getValue()).map(dataset -> datasetRDAMapper.toRDA(dataset, rda.getContributor())).collect(Collectors.toList()));
|
||||||
rda.setProject(Collections.singletonList(ProjectRDAMapper.toRDA(dmp.getProject(), dmp.getGrant())));
|
rda.setProject(Collections.singletonList(ProjectRDAMapper.toRDA(dmp.getProject(), dmp.getGrant())));
|
||||||
rda.setAdditionalProperty("templates", dmp.getAssociatedDmps().stream().map(datasetProfile -> datasetProfile.getId().toString()).toArray());
|
rda.setAdditionalProperty("templates", dmp.getAssociatedDmps().stream().map(datasetProfile -> datasetProfile.getId().toString()).toArray());
|
||||||
return rda;
|
return rda;
|
||||||
|
|
|
@ -47,6 +47,8 @@ public class ProjectRDAMapper {
|
||||||
((eu.eudat.data.entities.Project) entities.get("project")).setStatus((short)1);
|
((eu.eudat.data.entities.Project) entities.get("project")).setStatus((short)1);
|
||||||
((eu.eudat.data.entities.Project) entities.get("project")).setCreated(new Date());
|
((eu.eudat.data.entities.Project) entities.get("project")).setCreated(new Date());
|
||||||
((eu.eudat.data.entities.Project) entities.get("project")).setModified(new Date());
|
((eu.eudat.data.entities.Project) entities.get("project")).setModified(new Date());
|
||||||
|
((eu.eudat.data.entities.Project) entities.get("project")).setStartdate(new Date());
|
||||||
|
((eu.eudat.data.entities.Project) entities.get("project")).setEnddate(new Date());
|
||||||
((eu.eudat.data.entities.Project) entities.get("project")).setType(0);
|
((eu.eudat.data.entities.Project) entities.get("project")).setType(0);
|
||||||
apiContext.getOperationsContext().getDatabaseRepository().getProjectDao().createOrUpdate(((eu.eudat.data.entities.Project) entities.get("project")));
|
apiContext.getOperationsContext().getDatabaseRepository().getProjectDao().createOrUpdate(((eu.eudat.data.entities.Project) entities.get("project")));
|
||||||
for (int i = 0; i < rda.getFunding().size(); i++) {
|
for (int i = 0; i < rda.getFunding().size(); i++) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package eu.eudat.types;
|
||||||
|
|
||||||
public class MetricNames {
|
public class MetricNames {
|
||||||
public static final String DATASET_TEMPLATE = "argos_dataset_templates";
|
public static final String DATASET_TEMPLATE = "argos_dataset_templates";
|
||||||
|
public static final String INSTALLATIONS = "installations";
|
||||||
public static final String USERS = "argos_users";
|
public static final String USERS = "argos_users";
|
||||||
public static final String DMP = "argos_managed_dmps";
|
public static final String DMP = "argos_managed_dmps";
|
||||||
public static final String DATASET = "argos_managed_dataset_descriptions";
|
public static final String DATASET = "argos_managed_dataset_descriptions";
|
||||||
|
|
|
@ -75,6 +75,7 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
|
||||||
|
|
||||||
get shouldLabelFloat() { return this.focused || !this.empty; }
|
get shouldLabelFloat() { return this.focused || !this.empty; }
|
||||||
|
|
||||||
|
@Input() minLength: number = 0;
|
||||||
@Input() showNoResultsLabel: boolean = true;
|
@Input() showNoResultsLabel: boolean = true;
|
||||||
@Input() hidePlaceholder: boolean = false;
|
@Input() hidePlaceholder: boolean = false;
|
||||||
@Input()
|
@Input()
|
||||||
|
@ -268,7 +269,7 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
tap(query => this.queryValue = query),
|
tap(query => this.queryValue = query),
|
||||||
switchMap(query => this.filter(query)));
|
switchMap(query => (!this.minLength || (query && query.length >= this.minLength)) ? this.filter(query) : observableOf([])));
|
||||||
|
|
||||||
if (this.configuration.groupingFn) { this._groupedItems = this._items.pipe(map(items => this.configuration.groupingFn(items))); }
|
if (this.configuration.groupingFn) { this._groupedItems = this._items.pipe(map(items => this.configuration.groupingFn(items))); }
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,6 +186,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
|
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
|
||||||
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS-HINT'| translate}}</div>
|
||||||
<div class="full-width basic-info-input">
|
<div class="full-width basic-info-input">
|
||||||
<table class="col-12 user-table">
|
<table class="col-12 user-table">
|
||||||
<thead class="user-table-header">
|
<thead class="user-table-header">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="mat-elevation-z6">
|
<div class="mat-elevation-z6">
|
||||||
|
|
||||||
<!-- <mat-card class="row mat-card"> -->
|
<!-- <mat-card class="row mat-card"> -->
|
||||||
<mat-table [dataSource]="dataSource" matSort (matSortChange)="refresh()">
|
<mat-table [dataSource]="dataSource" matSort (matSortChange)="refresh()" matSortActive="created" matSortDirection="desc">
|
||||||
|
|
||||||
<!-- Column Definition: Name -->
|
<!-- Column Definition: Name -->
|
||||||
<ng-container cdkColumnDef="label">
|
<ng-container cdkColumnDef="label">
|
||||||
|
|
|
@ -265,6 +265,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
|
||||||
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
|
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
|
||||||
this.lockStatus = lockStatus;
|
this.lockStatus = lockStatus;
|
||||||
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
|
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
|
||||||
|
this.datasetWizardModel.status = 0;
|
||||||
this.formGroup = this.datasetWizardModel.buildForm();
|
this.formGroup = this.datasetWizardModel.buildForm();
|
||||||
this.formGroup.get('id').setValue(null);
|
this.formGroup.get('id').setValue(null);
|
||||||
this.dmpService.getSingle(newDmpId).pipe(map(data => data as DmpModel))
|
this.dmpService.getSingle(newDmpId).pipe(map(data => data as DmpModel))
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
<mat-form-field class="col pt-0 pb-2 mb-4 search">
|
<mat-form-field class="col pt-0 pb-2 mb-4 search">
|
||||||
<!-- <mat-label>{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}</mat-label> -->
|
<!-- <mat-label>{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}</mat-label> -->
|
||||||
<app-multiple-auto-complete [formControl]="formGroup.get('users')" placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
|
<app-multiple-auto-complete [formControl]="formGroup.get('users')" placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
|
||||||
[configuration]="usersAutoCompleteConfiguration" [showNoResultsLabel]="false">
|
[configuration]="usersAutoCompleteConfiguration" [showNoResultsLabel]="false"
|
||||||
|
[minLength]="3">
|
||||||
</app-multiple-auto-complete>
|
</app-multiple-auto-complete>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<p class="d-flex m-0 hint">
|
<p class="d-flex m-0 hint">
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
||||||
"DATASET-TEMPLATE-USERS": "Users",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remove User",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... No users yet",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add User",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
||||||
"DATASET-TEMPLATE-USERS": "Users",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remove User",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... No users yet",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add User",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "Una breve descripción acerca del Dataset, su alcance y objetivos.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "Una breve descripción acerca del Dataset, su alcance y objetivos.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Idioma de la plantilla del Dataset",
|
"DATASET-TEMPLATE-LANGUAGE": "Idioma de la plantilla del Dataset",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Seleccione un idioma",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Seleccione un idioma",
|
||||||
"DATASET-TEMPLATE-USERS": "Usuarios",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... Aún no hay usuarios",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Eliminar usuario",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validar y añadir usuario",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Descripción de la plantilla del Dataset",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Descripción de la plantilla del Dataset",
|
||||||
"UNTITLED": "Sin título",
|
"UNTITLED": "Sin título",
|
||||||
"QUESTION": "Pregunta",
|
"QUESTION": "Pregunta",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
||||||
"DATASET-TEMPLATE-USERS": "Users",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... No users yet",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remove User",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add User",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "Uma breve descrição do que é o modelo de dados, o seu âmbito e objetivos.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "Uma breve descrição do que é o modelo de dados, o seu âmbito e objetivos.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Idioma do modelo de dados",
|
"DATASET-TEMPLATE-LANGUAGE": "Idioma do modelo de dados",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Selecione o idioma",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Selecione o idioma",
|
||||||
"DATASET-TEMPLATE-USERS": "Utilizadores",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remover Utilizador",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... Ainda sem utilizadores",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validar e adicionar utilizador",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Descrição do modelo de dados",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Descrição do modelo de dados",
|
||||||
"UNTITLED": "Sem título",
|
"UNTITLED": "Sem título",
|
||||||
"QUESTION": "Questão",
|
"QUESTION": "Questão",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
||||||
"DATASET-TEMPLATE-USERS": "Users",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remove User",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... No users yet",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add User",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
||||||
"DATASET-TEMPLATE-USERS": "Users",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... No users yet",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remove User",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add User",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
|
|
|
@ -289,10 +289,11 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
|
||||||
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
|
||||||
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
|
||||||
"DATASET-TEMPLATE-USERS": "Users",
|
"DATASET-TEMPLATE-USERS": "Editors",
|
||||||
"DATASET-TEMPLATE-REMOVE-USER": "Remove User",
|
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
|
||||||
"DATASET-TEMPLATE-NO-USERS-YET": "... No users yet",
|
"DATASET-TEMPLATE-REMOVE-USER": "Remove Editor",
|
||||||
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add User",
|
"DATASET-TEMPLATE-NO-USERS-YET": "... No editors yet",
|
||||||
|
"DATASET-TEMPLATE-VALIDATE-AND-ADD-USER": "Validate and Add Editor",
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
|
|
Loading…
Reference in New Issue