#8843 - 1. refactor the DatasetProfile Table to DescriptionTemplate name 2. add scripts for the new DescriptionTemplateType table 3. update english localization + frontend

This commit is contained in:
Bernaldo Mihasi 2023-07-25 15:04:39 +03:00
parent d996acdcc4
commit bc279b1610
74 changed files with 526 additions and 416 deletions

View File

@ -1,13 +1,13 @@
package eu.eudat.data.dao.criteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import java.util.Date;
import java.util.List;
import java.util.UUID;
public class DatasetProfileCriteria extends Criteria<DatasetProfile> {
public class DatasetProfileCriteria extends Criteria<DescriptionTemplate> {
public enum DatasetProfileFilter {
DMPs((short) 0), Datasets((short) 1);
@ -25,7 +25,7 @@ public class DatasetProfileCriteria extends Criteria<DatasetProfile> {
case 1:
return Datasets;
default:
throw new RuntimeException("Unsupported DatasetProfile filter");
throw new RuntimeException("Unsupported DescriptionTemplate filter");
}
}
}

View File

@ -1,11 +1,11 @@
package eu.eudat.data.dao.criteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import java.util.UUID;
public class DatasetProfileWizardCriteria extends Criteria<DatasetProfile> {
public class DatasetProfileWizardCriteria extends Criteria<DescriptionTemplate> {
private UUID id;
public UUID getId() {

View File

@ -3,7 +3,6 @@ package eu.eudat.data.dao.entities;
import eu.eudat.data.dao.DatabaseAccess;
import eu.eudat.data.dao.databaselayer.service.DatabaseService;
import eu.eudat.data.entities.DatasetExternalDataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.queryable.QueryableList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;

View File

@ -2,20 +2,22 @@ package eu.eudat.data.dao.entities;
import eu.eudat.data.dao.DatabaseAccessLayer;
import eu.eudat.data.dao.criteria.DatasetProfileCriteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.queryable.QueryableList;
import java.util.List;
import java.util.UUID;
public interface DatasetProfileDao extends DatabaseAccessLayer<DatasetProfile, UUID> {
public interface DatasetProfileDao extends DatabaseAccessLayer<DescriptionTemplate, UUID> {
QueryableList<DatasetProfile> getWithCriteria(DatasetProfileCriteria criteria);
QueryableList<DescriptionTemplate> getWithCriteria(DatasetProfileCriteria criteria);
QueryableList<DatasetProfile> getAll();
QueryableList<DescriptionTemplate> getAll();
QueryableList<DatasetProfile> getAuthenticated(QueryableList<DatasetProfile> query, UUID principal, List<Integer> roles);
QueryableList<DescriptionTemplate> getAuthenticated(QueryableList<DescriptionTemplate> query, UUID principal, List<Integer> roles);
List<DatasetProfile> getAllIds();
List<DescriptionTemplate> getAllIds();
Long countWithType(UUID id);
}

View File

@ -3,8 +3,8 @@ package eu.eudat.data.dao.entities;
import eu.eudat.data.dao.DatabaseAccess;
import eu.eudat.data.dao.criteria.DatasetProfileCriteria;
import eu.eudat.data.dao.databaselayer.service.DatabaseService;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.DescriptionTemplateType;
import eu.eudat.queryable.QueryableList;
import eu.eudat.queryable.types.FieldSelectionType;
import eu.eudat.queryable.types.SelectionField;
@ -21,16 +21,16 @@ import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@Component("datasetProfileDao")
public class DatasetProfileDaoImpl extends DatabaseAccess<DatasetProfile> implements DatasetProfileDao {
public class DatasetProfileDaoImpl extends DatabaseAccess<DescriptionTemplate> implements DatasetProfileDao {
@Autowired
public DatasetProfileDaoImpl(DatabaseService<DatasetProfile> databaseService) {
public DatasetProfileDaoImpl(DatabaseService<DescriptionTemplate> databaseService) {
super(databaseService);
}
@Override
public QueryableList<DatasetProfile> getWithCriteria(DatasetProfileCriteria criteria) {
QueryableList<DatasetProfile> query = getDatabaseService().getQueryable(DatasetProfile.class);
public QueryableList<DescriptionTemplate> getWithCriteria(DatasetProfileCriteria criteria) {
QueryableList<DescriptionTemplate> query = getDatabaseService().getQueryable(DescriptionTemplate.class);
if (criteria.getLike() != null && !criteria.getLike().isEmpty())
query.where((builder, root) -> builder.like(builder.upper(root.get("label")), "%" + criteria.getLike().toUpperCase() + "%"));
if (!criteria.getAllVersions())
@ -63,9 +63,9 @@ public class DatasetProfileDaoImpl extends DatabaseAccess<DatasetProfile> implem
query.where(((builder, root) -> root.get("id").in(criteria.getIds())));
}
if (criteria.getFinalized()) {
query.where(((builder, root) -> builder.equal(root.get("status"), DatasetProfile.Status.FINALIZED.getValue())));
query.where(((builder, root) -> builder.equal(root.get("status"), DescriptionTemplate.Status.FINALIZED.getValue())));
} else {
query.where(((builder, root) -> builder.notEqual(root.get("status"), DatasetProfile.Status.DELETED.getValue())));
query.where(((builder, root) -> builder.notEqual(root.get("status"), DescriptionTemplate.Status.DELETED.getValue())));
}
if (criteria.getPeriodStart() != null)
query.where((builder, root) -> builder.greaterThanOrEqualTo(root.get("created"), criteria.getPeriodStart()));
@ -73,48 +73,48 @@ public class DatasetProfileDaoImpl extends DatabaseAccess<DatasetProfile> implem
}
@Override
public DatasetProfile createOrUpdate(DatasetProfile item) {
return this.getDatabaseService().createOrUpdate(item, DatasetProfile.class);
public DescriptionTemplate createOrUpdate(DescriptionTemplate item) {
return this.getDatabaseService().createOrUpdate(item, DescriptionTemplate.class);
}
@Override
public DatasetProfile find(UUID id) {
return getDatabaseService().getQueryable(DatasetProfile.class).where((builder, root) -> builder.equal(root.get("id"), id)).getSingle();
public DescriptionTemplate find(UUID id) {
return getDatabaseService().getQueryable(DescriptionTemplate.class).where((builder, root) -> builder.equal(root.get("id"), id)).getSingle();
}
@Override
public QueryableList<DatasetProfile> getAll() {
return getDatabaseService().getQueryable(DatasetProfile.class);
public QueryableList<DescriptionTemplate> getAll() {
return getDatabaseService().getQueryable(DescriptionTemplate.class);
}
@Override
public List<DatasetProfile> getAllIds(){
return getDatabaseService().getQueryable(DatasetProfile.class).withFields(Collections.singletonList("id")).toList();
public List<DescriptionTemplate> getAllIds(){
return getDatabaseService().getQueryable(DescriptionTemplate.class).withFields(Collections.singletonList("id")).toList();
}
@Override
public void delete(DatasetProfile item) {
public void delete(DescriptionTemplate item) {
this.getDatabaseService().delete(item);
}
@Override
public QueryableList<DatasetProfile> asQueryable() {
return this.getDatabaseService().getQueryable(DatasetProfile.class);
public QueryableList<DescriptionTemplate> asQueryable() {
return this.getDatabaseService().getQueryable(DescriptionTemplate.class);
}
@Async
@Override
public CompletableFuture<DatasetProfile> createOrUpdateAsync(DatasetProfile item) {
public CompletableFuture<DescriptionTemplate> createOrUpdateAsync(DescriptionTemplate item) {
return CompletableFuture.supplyAsync(() -> this.createOrUpdate(item));
}
@Override
public DatasetProfile find(UUID id, String hint) {
public DescriptionTemplate find(UUID id, String hint) {
throw new UnsupportedOperationException();
}
@Override
public QueryableList<DatasetProfile> getAuthenticated(QueryableList<DatasetProfile> query, UUID principal, List<Integer> roles) {
public QueryableList<DescriptionTemplate> getAuthenticated(QueryableList<DescriptionTemplate> query, UUID principal, List<Integer> roles) {
if (roles != null && !roles.isEmpty()) {
query.where((builder, root) -> {
Join userJoin = root.join("users", JoinType.LEFT);
@ -126,4 +126,9 @@ public class DatasetProfileDaoImpl extends DatabaseAccess<DatasetProfile> implem
return query;
}
@Override
public Long countWithType(UUID id) {
return this.getDatabaseService().getQueryable(DescriptionTemplate.class).where((builder, root) -> builder.equal(root.get("type"), id)).count();
}
}

View File

@ -1,7 +1,6 @@
package eu.eudat.data.dao.entities;
import eu.eudat.data.dao.DatabaseAccessLayer;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DatasetService;
import java.util.UUID;

View File

@ -2,8 +2,6 @@ package eu.eudat.data.dao.entities;
import eu.eudat.data.dao.DatabaseAccess;
import eu.eudat.data.dao.databaselayer.service.DatabaseService;
import eu.eudat.data.entities.DatasetExternalDataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DatasetService;
import eu.eudat.queryable.QueryableList;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -117,7 +117,7 @@ public class DMP implements DataEntity<DMP, UUID> {
joinColumns = {@JoinColumn(name = "\"dmp\"", referencedColumnName = "\"ID\"")},
inverseJoinColumns = {@JoinColumn(name = "\"datasetprofile\"", referencedColumnName = "\"ID\"")}
)
private Set<DatasetProfile> associatedDmps;
private Set<DescriptionTemplate> associatedDmps;
@ManyToOne(fetch = FetchType.LAZY)
@ -274,10 +274,10 @@ public class DMP implements DataEntity<DMP, UUID> {
this.grant = grant;
}
public Set<DatasetProfile> getAssociatedDmps() {
public Set<DescriptionTemplate> getAssociatedDmps() {
return associatedDmps;
}
public void setAssociatedDmps(Set<DatasetProfile> associatedDmps) {
public void setAssociatedDmps(Set<DescriptionTemplate> associatedDmps) {
this.associatedDmps = associatedDmps;
}

View File

@ -110,7 +110,7 @@ public class Dataset implements DataEntity<Dataset, UUID> {
@ManyToOne(fetch = FetchType.LAZY)
//@Cascade(value=org.hibernate.annotations.CascadeType.ALL)
@JoinColumn(name = "\"Profile\"")
private DatasetProfile profile;
private DescriptionTemplate profile;
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
@Column(name = "\"Reference\"", columnDefinition = "xml")
@ -249,10 +249,10 @@ public class Dataset implements DataEntity<Dataset, UUID> {
}
public DatasetProfile getProfile() {
public DescriptionTemplate getProfile() {
return profile;
}
public void setProfile(DatasetProfile profile) {
public void setProfile(DescriptionTemplate profile) {
this.profile = profile;
}

View File

@ -14,8 +14,8 @@ import java.util.UUID;
@Entity
@Table(name = "\"DatasetProfile\"")
public class DatasetProfile implements DataEntity<DatasetProfile,UUID>{
@Table(name = "\"DescriptionTemplate\"")
public class DescriptionTemplate implements DataEntity<DescriptionTemplate,UUID>{
public enum Status {
SAVED((short) 0), FINALIZED((short) 1), DELETED((short) 99);
@ -89,7 +89,11 @@ public class DatasetProfile implements DataEntity<DatasetProfile,UUID>{
@Column(name = "\"Language\"", nullable = false)
private String language;
@OneToMany(mappedBy = "datasetProfile", fetch = FetchType.LAZY)
@OneToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "\"Type\"", nullable = false)
private DescriptionTemplateType type;
@OneToMany(mappedBy = "descriptionTemplate", fetch = FetchType.LAZY)
private Set<UserDatasetProfile> users;
@ -156,26 +160,31 @@ public class DatasetProfile implements DataEntity<DatasetProfile,UUID>{
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public DescriptionTemplateType getType() {
return type;
}
public void setType(DescriptionTemplateType type) {
this.type = type;
}
public Set<UserDatasetProfile> getUsers() {
return users;
}
public void setUsers(Set<UserDatasetProfile> users) {
this.users = users;
}
@Override
public String toString() {
return "DatasetProfileListingModel [id=" + id + ", label=" + label + ", dataset=" + dataset + ", definition=" + definition + ", version=" + version + ", language=" + language + "]";
return "DatasetProfileListingModel [id=" + id + ", label=" + label + ", dataset=" + dataset + ", definition=" + definition + ", version=" + version + ", language=" + language + ", type=" + type +"]";
}
@Override
public void update(DatasetProfile entity) {
public void update(DescriptionTemplate entity) {
}
@Override
@ -184,7 +193,7 @@ public class DatasetProfile implements DataEntity<DatasetProfile,UUID>{
}
@Override
public DatasetProfile buildFromTuple(List<Tuple> tuple, List<String> fields, String base) {
public DescriptionTemplate buildFromTuple(List<Tuple> tuple, List<String> fields, String base) {
this.id = UUID.fromString((String) tuple.get(0).get(base.isEmpty() ? base + "." + "id" : "id"));
return this;
}

View File

@ -22,8 +22,8 @@ public class UserDatasetProfile implements DataEntity<UserDatasetProfile, UUID>
private UserInfo user;
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "\"datasetProfile\"")
private DatasetProfile datasetProfile;
@JoinColumn(name = "\"descriptionTemplate\"")
private DescriptionTemplate descriptionTemplate;
@Column(name = "role")
private Integer role;
@ -44,12 +44,12 @@ public class UserDatasetProfile implements DataEntity<UserDatasetProfile, UUID>
this.user = user;
}
public DatasetProfile getDatasetProfile() {
return datasetProfile;
public DescriptionTemplate getDatasetProfile() {
return descriptionTemplate;
}
public void setDatasetProfile(DatasetProfile datasetProfile) {
this.datasetProfile = datasetProfile;
public void setDatasetProfile(DescriptionTemplate descriptionTemplate) {
this.descriptionTemplate = descriptionTemplate;
}
public Integer getRole() {

View File

@ -1,25 +1,24 @@
package eu.eudat.data.query.items.item.datasetprofile;
import eu.eudat.data.dao.criteria.DatasetProfileCriteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.query.PaginationService;
import eu.eudat.data.query.definition.Query;
import eu.eudat.data.query.definition.TableQuery;
import eu.eudat.queryable.QueryableList;
import java.util.UUID;
public class DatasetProfileAutocompleteRequest extends TableQuery<DatasetProfileCriteria,DatasetProfile, UUID> {
public class DatasetProfileAutocompleteRequest extends TableQuery<DatasetProfileCriteria, DescriptionTemplate, UUID> {
@Override
public QueryableList<DatasetProfile> applyCriteria() {
QueryableList<DatasetProfile> query = this.getQuery();
public QueryableList<DescriptionTemplate> applyCriteria() {
QueryableList<DescriptionTemplate> query = this.getQuery();
if (this.getCriteria().getLike() != null && !this.getCriteria().getLike().isEmpty())
query.where((builder, root) -> builder.like(builder.upper(root.get("label")), "%" + this.getCriteria().getLike().toUpperCase() + "%"));
return query;
}
@Override
public QueryableList<DatasetProfile> applyPaging(QueryableList<DatasetProfile> items) {
public QueryableList<DescriptionTemplate> applyPaging(QueryableList<DescriptionTemplate> items) {
return PaginationService.applyPaging(items, this);
}
}

View File

@ -1,15 +1,13 @@
package eu.eudat.data.query.items.item.datasetprofile;
import eu.eudat.data.dao.criteria.DatasetProfileWizardCriteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.query.definition.Query;
import eu.eudat.queryable.QueryableList;
import java.util.UUID;
public class DatasetProfileWizardAutocompleteRequest extends Query<DatasetProfileWizardCriteria,DatasetProfile> {
public class DatasetProfileWizardAutocompleteRequest extends Query<DatasetProfileWizardCriteria, DescriptionTemplate> {
@Override
public QueryableList<DatasetProfile> applyCriteria() {
public QueryableList<DescriptionTemplate> applyCriteria() {
return null;
}
}

View File

@ -1,23 +1,23 @@
package eu.eudat.data.query.items.table.datasetprofile;
import eu.eudat.data.dao.criteria.DatasetProfileCriteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.query.definition.TableQuery;
import eu.eudat.queryable.QueryableList;
import java.util.UUID;
public class DatasetProfileTableRequestItem extends TableQuery<DatasetProfileCriteria, DatasetProfile, UUID> {
public class DatasetProfileTableRequestItem extends TableQuery<DatasetProfileCriteria, DescriptionTemplate, UUID> {
@Override
public QueryableList<DatasetProfile> applyCriteria() {
QueryableList<DatasetProfile> query = this.getQuery();
public QueryableList<DescriptionTemplate> applyCriteria() {
QueryableList<DescriptionTemplate> query = this.getQuery();
if (this.getCriteria().getLike() != null && !this.getCriteria().getLike().isEmpty())
query.where((builder, root) -> builder.like(builder.upper(root.get("label")), "%" + this.getCriteria().getLike().toUpperCase() + "%"));
return query;
}
@Override
public QueryableList<DatasetProfile> applyPaging(QueryableList<DatasetProfile> items) {
public QueryableList<DescriptionTemplate> applyPaging(QueryableList<DescriptionTemplate> items) {
return null;
}
}

View File

@ -1,5 +1,6 @@
package eu.eudat.controllers;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.UserDatasetProfile;
import eu.eudat.data.entities.UserInfo;
import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem;
@ -16,7 +17,6 @@ import eu.eudat.models.data.admin.composite.DatasetProfile;
import eu.eudat.models.data.datasetprofile.DatasetProfileListingModel;
import eu.eudat.models.data.helpers.common.DataTableData;
import eu.eudat.models.data.helpers.responses.ResponseItem;
import eu.eudat.models.data.listingmodels.UserInfoListingModel;
import eu.eudat.models.data.security.Principal;
import eu.eudat.models.data.user.composite.PagedDatasetProfile;
import eu.eudat.types.ApiMessageCode;
@ -32,7 +32,6 @@ import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
import static eu.eudat.types.Authorities.ADMIN;
import static eu.eudat.types.Authorities.DATASET_PROFILE_MANAGER;
@ -61,20 +60,20 @@ public class Admin extends BaseController {
public ResponseEntity<Object> addDmp(@Valid @RequestBody DatasetProfile profile, @ClaimedAuthorities(claims = {ADMIN ,DATASET_PROFILE_MANAGER}) Principal principal) {
//this.getLoggerService().info(principal, "Admin Added Dataset Profile");
DatasetProfile shortenProfile = profile.toShort();
eu.eudat.data.entities.DatasetProfile modelDefinition = AdminManager.generateViewStyleDefinition(shortenProfile, getApiContext());
DescriptionTemplate modelDefinition = AdminManager.generateViewStyleDefinition(shortenProfile, getApiContext());
modelDefinition.setGroupId(UUID.randomUUID());
modelDefinition.setVersion((short) 0);
eu.eudat.data.entities.DatasetProfile datasetProfile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
DescriptionTemplate descriptionTemplate = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
UserDatasetProfile userDatasetProfile = new UserDatasetProfile();
userDatasetProfile.setDatasetProfile(datasetProfile);
userDatasetProfile.setDatasetProfile(descriptionTemplate);
UserInfo userInfo = getApiContext().getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
userDatasetProfile.setUser(userInfo);
userDatasetProfile.setRole(0);
getApiContext().getOperationsContext().getDatabaseRepository().getUserDatasetProfileDao().createOrUpdate(userDatasetProfile);
datasetProfileManager.storeDatasetProfileUsers(datasetProfile, profile);
datasetProfileManager.storeDatasetProfileUsers(descriptionTemplate, profile);
metricsManager.increaseValue(MetricNames.DATASET_TEMPLATE, 1, MetricsManager.datasetTemplateStatus.get(datasetProfile.getStatus()) );
metricsManager.increaseValue(MetricNames.DATASET_TEMPLATE, 1, MetricsManager.datasetTemplateStatus.get(descriptionTemplate.getStatus()) );
return ResponseEntity.status(HttpStatus.OK).body(modelDefinition.getId());
}
@ -82,17 +81,17 @@ public class Admin extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = {"/addDmp/{id}"}, consumes = "application/json", produces = "application/json")
public ResponseEntity<ResponseItem<UUID>> updateDmp(@PathVariable String id, @RequestBody DatasetProfile profile, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
DatasetProfile shortenProfile = profile.toShort();
eu.eudat.data.entities.DatasetProfile modelDefinition = AdminManager.generateViewStyleDefinition(shortenProfile, getApiContext());
eu.eudat.data.entities.DatasetProfile datasetprofile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
DescriptionTemplate modelDefinition = AdminManager.generateViewStyleDefinition(shortenProfile, getApiContext());
DescriptionTemplate datasetprofile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
datasetprofile.setDefinition(modelDefinition.getDefinition());
Short oldStatus = datasetprofile.getStatus();
datasetprofile.setStatus(modelDefinition.getStatus());
datasetprofile.setLabel(modelDefinition.getLabel());
datasetprofile.setDescription(modelDefinition.getDescription());
datasetprofile.setLanguage(modelDefinition.getLanguage());
eu.eudat.data.entities.DatasetProfile datasetProfile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(datasetprofile);
datasetProfileManager.storeDatasetProfileUsers(datasetProfile, profile);
if (datasetProfile.getStatus() == 1 && oldStatus == 0) {
DescriptionTemplate descriptionTemplate = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(datasetprofile);
datasetProfileManager.storeDatasetProfileUsers(descriptionTemplate, profile);
if (descriptionTemplate.getStatus() == 1 && oldStatus == 0) {
metricsManager.increaseValue(MetricNames.DATASET_TEMPLATE, 1, MetricNames.ACTIVE);
}
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<UUID>().status(ApiMessageCode.NO_MESSAGE));
@ -102,7 +101,7 @@ public class Admin extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = {"/newVersion/{id}"}, produces = "application/json")
public ResponseEntity newVersionDatasetProfile(@PathVariable String id, @RequestBody DatasetProfile profile, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) throws Exception {
try {
eu.eudat.data.entities.DatasetProfile modelDefinition = this.datasetProfileManager.createNewVersionDatasetProfile(id, profile);
DescriptionTemplate modelDefinition = this.datasetProfileManager.createNewVersionDatasetProfile(id, profile);
return ResponseEntity.status(HttpStatus.OK).body(modelDefinition.getId());
} catch (DatasetProfileNewVersionException exception) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>().status(ApiMessageCode.ERROR_MESSAGE).message(exception.getMessage()));
@ -125,7 +124,7 @@ public class Admin extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = {"/preview"}, consumes = "application/json", produces = "application/json")
public ResponseEntity<ResponseItem<PagedDatasetProfile>> getPreview(@RequestBody DatasetProfile profile, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
eu.eudat.data.entities.DatasetProfile modelDefinition = AdminManager.generateViewStyleDefinition(profile, getApiContext());
DescriptionTemplate modelDefinition = AdminManager.generateViewStyleDefinition(profile, getApiContext());
eu.eudat.models.data.user.composite.DatasetProfile datasetProfile = userManager.generateDatasetProfileModel(modelDefinition);
PagedDatasetProfile pagedDatasetProfile = new PagedDatasetProfile();
pagedDatasetProfile.buildPagedDatasetProfile(datasetProfile);
@ -145,7 +144,7 @@ public class Admin extends BaseController {
public @ResponseBody
ResponseEntity<ResponseItem<DatasetProfile>> inactivate(@PathVariable String id, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
try {
eu.eudat.data.entities.DatasetProfile ret = AdminManager.inactivate(this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao(), this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetDao(), id);
DescriptionTemplate ret = AdminManager.inactivate(this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao(), this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetDao(), id);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>().status(ApiMessageCode.SUCCESS_MESSAGE));
} catch (DatasetProfileWithDatasetsExeption exception) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>().status(ApiMessageCode.UNSUCCESS_DELETE).message(exception.getMessage()));
@ -156,7 +155,7 @@ public class Admin extends BaseController {
@RequestMapping(method = RequestMethod.GET, value = {"/getXml/{id}"}, produces = "application/json")
public ResponseEntity getDatasetProfileXml(@PathVariable String id, @RequestHeader("Content-Type") String contentType, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) throws IllegalAccessException, IOException, InstantiationException {
if (contentType.equals("application/xml")) {
eu.eudat.data.entities.DatasetProfile profile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
DescriptionTemplate profile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
eu.eudat.models.data.user.composite.DatasetProfile datasetProfile = userManager.generateDatasetProfileModel(profile);
datasetProfile.setStatus(profile.getStatus());
datasetProfile.setDescription(profile.getDescription());
@ -173,12 +172,12 @@ public class Admin extends BaseController {
@ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) throws Exception {
eu.eudat.logic.utilities.documents.xml.datasetProfileXml.datasetProfileModel.DatasetProfile datasetProfileModel = this.datasetProfileManager.createDatasetProfileFromXml(file);
eu.eudat.models.data.admin.composite.DatasetProfile datasetProfileEntity = datasetProfileModel.toAdminCompositeModel(file.getOriginalFilename());
eu.eudat.data.entities.DatasetProfile modelDefinition;
DescriptionTemplate modelDefinition;
if (id == null) {
modelDefinition = AdminManager.generateViewStyleDefinition(datasetProfileEntity, getApiContext());
eu.eudat.data.entities.DatasetProfile datasetProfile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
DescriptionTemplate descriptionTemplate = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
UserDatasetProfile userDatasetProfile = new UserDatasetProfile();
userDatasetProfile.setDatasetProfile(datasetProfile);
userDatasetProfile.setDatasetProfile(descriptionTemplate);
UserInfo userInfo = getApiContext().getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
userDatasetProfile.setUser(userInfo);
userDatasetProfile.setRole(0);
@ -186,7 +185,7 @@ public class Admin extends BaseController {
} else {
modelDefinition = datasetProfileManager.createNewVersionDatasetProfile(id, datasetProfileEntity);
}
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<eu.eudat.data.entities.DatasetProfile>>()
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<DescriptionTemplate>>()
.status(ApiMessageCode.SUCCESS_MESSAGE).message(""));
}

View File

@ -2,6 +2,7 @@ package eu.eudat.controllers;
import eu.eudat.data.dao.criteria.RequestItem;
import eu.eudat.data.entities.DMPProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.query.items.table.dmpprofile.DataManagementPlanProfileTableRequest;
import eu.eudat.logic.managers.DataManagementProfileManager;
import eu.eudat.logic.security.claims.ClaimedAuthorities;
@ -82,7 +83,7 @@ public class DMPProfileController extends BaseController {
eu.eudat.logic.utilities.documents.xml.dmpXml.dmpProfileModel.DmpProfile dmpProfileModel = this.dataManagementProfileManager.createDmpProfileFromXml(file);
DataManagementPlanProfileListingModel dataManagementPlan = dmpProfileModel.toDmpProfileCompositeModel(file.getOriginalFilename());
this.dataManagementProfileManager.createOrUpdate(dataManagementPlan, principal);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<eu.eudat.data.entities.DatasetProfile>>()
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<List<DescriptionTemplate>>()
.status(ApiMessageCode.SUCCESS_MESSAGE).message(""));
}

View File

@ -1,6 +1,7 @@
package eu.eudat.controllers;
import eu.eudat.data.dao.criteria.RequestItem;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.managers.AdminManager;
import eu.eudat.logic.managers.DatasetProfileManager;
import eu.eudat.logic.security.claims.ClaimedAuthorities;
@ -55,7 +56,7 @@ public class DatasetProfileController extends BaseController {
@Transactional
@RequestMapping(method = RequestMethod.POST, value = {"/datasetprofile/clone/{id}"}, consumes = "application/json", produces = "application/json")
public ResponseEntity<ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>> clone(@PathVariable String id, @ClaimedAuthorities(claims = {ADMIN})Principal principal) {
eu.eudat.data.entities.DatasetProfile profile = this.datasetProfileManager.clone(id);
DescriptionTemplate profile = this.datasetProfileManager.clone(id);
eu.eudat.models.data.admin.composite.DatasetProfile datasetprofile = AdminManager.generateDatasetProfileModel(profile);
datasetprofile.setLabel(profile.getLabel() + " new ");
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>().payload(datasetprofile));
@ -63,8 +64,8 @@ public class DatasetProfileController extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = {"/search/autocomplete"}, consumes = "application/json", produces = "application/json")
public ResponseEntity<Object> getDataForAutocomplete(@RequestBody RequestItem<AutoCompleteLookupItem> lookupItem) throws XPathExpressionException {
eu.eudat.data.entities.DatasetProfile datasetProfile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(lookupItem.getCriteria().getProfileID()));
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field modelfield = this.datasetProfileManager.queryForField(datasetProfile.getDefinition(), lookupItem.getCriteria().getFieldID());
DescriptionTemplate descriptionTemplate = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(lookupItem.getCriteria().getProfileID()));
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Field modelfield = this.datasetProfileManager.queryForField(descriptionTemplate.getDefinition(), lookupItem.getCriteria().getFieldID());
AutoCompleteData data = (AutoCompleteData) modelfield.getData();
List<ExternalAutocompleteFieldModel> items = this.datasetProfileManager.getAutocomplete(data, lookupItem.getCriteria().getLike());
return ResponseEntity.status(HttpStatus.OK).body(items);

View File

@ -1,6 +1,7 @@
package eu.eudat.controllers;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.query.items.item.dataset.DatasetWizardAutocompleteRequest;
import eu.eudat.data.query.items.item.datasetprofile.DatasetProfileWizardAutocompleteRequest;
import eu.eudat.data.query.items.table.dataset.DatasetPublicTableRequest;
@ -202,7 +203,7 @@ public class Datasets extends BaseController {
@RequestMapping(method = RequestMethod.GET, value = {"/get/{id}"}, produces = "application/json")
public ResponseEntity<ResponseItem<PagedDatasetProfile>> getSingle(@PathVariable String id) {
eu.eudat.data.entities.DatasetProfile profile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
DescriptionTemplate profile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
eu.eudat.models.data.user.composite.DatasetProfile datasetprofile = userManager.generateDatasetProfileModel(profile);
PagedDatasetProfile pagedDatasetProfile = new PagedDatasetProfile();
pagedDatasetProfile.buildPagedDatasetProfile(datasetprofile);

View File

@ -1,8 +1,7 @@
package eu.eudat.controllers;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.Funder;
import eu.eudat.data.entities.Project;
import eu.eudat.logic.managers.DatasetManager;
@ -23,7 +22,6 @@ import org.springframework.web.bind.annotation.*;
import javax.transaction.Transactional;
import javax.validation.Valid;
import java.util.UUID;
@RestController
@CrossOrigin
@ -88,7 +86,7 @@ public class QuickWizardController extends BaseController {
quickWizard.getDmp().setId(dmpEntity.getId());
for (DatasetDescriptionQuickWizardModel dataset : quickWizard.getDatasets().getDatasetsList()) {
DataManagementPlan dmp = quickWizard.getDmp().toDataDmp(grantEntity, projectEntity, principal);
DatasetProfile profile = quickWizard.getDmp().getDatasetProfile();
DescriptionTemplate profile = quickWizard.getDmp().getDatasetProfile();
DatasetWizardModel datasetWizardModel = dataset.toDataModel(dmp, profile);
this.datasetManager.createOrUpdate(datasetWizardModel, principal);
}
@ -100,7 +98,7 @@ public class QuickWizardController extends BaseController {
public @ResponseBody
ResponseEntity<ResponseItem<DatasetCreateWizardModel>> addDatasetWizard(@RequestBody DatasetCreateWizardModel datasetCreateWizardModel, Principal principal) throws Exception{
for(DatasetDescriptionQuickWizardModel dataset : datasetCreateWizardModel.getDatasets().getDatasetsList()){
DatasetProfile profile = new DatasetProfile();
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(datasetCreateWizardModel.getDmpMeta().getDatasetProfile().getId());
profile.setLabel(datasetCreateWizardModel.getDmpMeta().getDatasetProfile().getLabel());
this.datasetManager.createOrUpdate(dataset.toDataModel(datasetCreateWizardModel.getDmpMeta().getDmp(), profile), principal);

View File

@ -1,8 +1,8 @@
package eu.eudat.logic.builders.entity;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.builders.Builder;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;
import java.util.Date;
import java.util.Set;
@ -11,7 +11,7 @@ import java.util.UUID;
/**
* Created by ikalyvas on 2/15/2018.
*/
public class DatasetProfileBuilder extends Builder<DatasetProfile> {
public class DatasetProfileBuilder extends Builder<DescriptionTemplate> {
private UUID id;
@ -77,17 +77,17 @@ public class DatasetProfileBuilder extends Builder<DatasetProfile> {
}
@Override
public DatasetProfile build() {
DatasetProfile datasetProfile = new DatasetProfile();
datasetProfile.setCreated(created);
datasetProfile.setStatus(status);
datasetProfile.setId(id);
datasetProfile.setDataset(dataset);
datasetProfile.setDefinition(definition);
datasetProfile.setDescription(description);
datasetProfile.setModified(modified);
datasetProfile.setLabel(label);
datasetProfile.setLanguage(language);
return datasetProfile;
public DescriptionTemplate build() {
DescriptionTemplate descriptionTemplate = new DescriptionTemplate();
descriptionTemplate.setCreated(created);
descriptionTemplate.setStatus(status);
descriptionTemplate.setId(id);
descriptionTemplate.setDataset(dataset);
descriptionTemplate.setDefinition(definition);
descriptionTemplate.setDescription(description);
descriptionTemplate.setModified(modified);
descriptionTemplate.setLabel(label);
descriptionTemplate.setLanguage(language);
return descriptionTemplate;
}
}

View File

@ -2,6 +2,7 @@ package eu.eudat.logic.managers;
import eu.eudat.data.dao.entities.DatasetDao;
import eu.eudat.data.dao.entities.DatasetProfileDao;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.exceptions.datasetprofile.DatasetProfileWithDatasetsExeption;
import eu.eudat.logic.builders.entity.DatasetProfileBuilder;
import eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel;
@ -17,7 +18,7 @@ import java.util.UUID;
public class AdminManager {
public static eu.eudat.data.entities.DatasetProfile generateViewStyleDefinition(DatasetProfile profile, ApiContext apiContext) {
public static DescriptionTemplate generateViewStyleDefinition(DatasetProfile profile, ApiContext apiContext) {
ViewStyleModel viewStyleModel = new ViewStyleModel();
viewStyleModel.setSections(new ModelBuilder().toViewStyleDefinition(profile.getSections(), eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Section.class));
viewStyleModel.setPages(new ModelBuilder().toViewStyleDefinition(profile.getPages(), eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.Page.class));
@ -34,22 +35,22 @@ public class AdminManager {
profile.setLanguage("en");
}
eu.eudat.data.entities.DatasetProfile datasetProfile = apiContext.getOperationsContext().getBuilderFactory().getBuilder(DatasetProfileBuilder.class).definition(xml).label(profile.getLabel())
DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getBuilderFactory().getBuilder(DatasetProfileBuilder.class).definition(xml).label(profile.getLabel())
.status(profile.getStatus()).created(new Date()).description(profile.getDescription()).language(profile.getLanguage())
.build();
if (datasetProfile.getGroupId() == null) {
datasetProfile.setGroupId(UUID.randomUUID());
if (descriptionTemplate.getGroupId() == null) {
descriptionTemplate.setGroupId(UUID.randomUUID());
}
if (datasetProfile.getVersion() == null) {
datasetProfile.setVersion((short)1);
if (descriptionTemplate.getVersion() == null) {
descriptionTemplate.setVersion((short)1);
}
return datasetProfile;
return descriptionTemplate;
}
public static eu.eudat.models.data.admin.composite.DatasetProfile generateDatasetProfileModel(eu.eudat.data.entities.DatasetProfile profile) {
public static eu.eudat.models.data.admin.composite.DatasetProfile generateDatasetProfileModel(DescriptionTemplate profile) {
Document viewStyleDoc = XmlBuilder.fromXml(profile.getDefinition());
Element root = viewStyleDoc.getDocumentElement();
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewstyle = new eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel().fromXml(root);
@ -60,12 +61,12 @@ public class AdminManager {
}
public static eu.eudat.data.entities.DatasetProfile inactivate(DatasetProfileDao datasetProfileRepository, DatasetDao datasetDao, String id) {
public static DescriptionTemplate inactivate(DatasetProfileDao datasetProfileRepository, DatasetDao datasetDao, String id) {
eu.eudat.data.dao.criteria.DatasetCriteria datasetsForThatDatasetProfile = new eu.eudat.data.dao.criteria.DatasetCriteria();
datasetsForThatDatasetProfile.setProfileDatasetId(UUID.fromString(id));
if (datasetDao.getWithCriteria(datasetsForThatDatasetProfile).count() == 0) {
eu.eudat.data.entities.DatasetProfile detasetProfile = datasetProfileRepository.find(UUID.fromString(id));
detasetProfile.setStatus(eu.eudat.data.entities.DatasetProfile.Status.DELETED.getValue());
DescriptionTemplate detasetProfile = datasetProfileRepository.find(UUID.fromString(id));
detasetProfile.setStatus(DescriptionTemplate.Status.DELETED.getValue());
detasetProfile = datasetProfileRepository.createOrUpdate(detasetProfile);
return detasetProfile;
} else {

View File

@ -25,7 +25,6 @@ import eu.eudat.elastic.entities.Tag;
import eu.eudat.exceptions.datamanagementplan.DMPNewVersionException;
import eu.eudat.exceptions.datamanagementplan.DMPWithDatasetsDeleteException;
import eu.eudat.exceptions.security.ForbiddenException;
import eu.eudat.exceptions.security.NonValidTokenException;
import eu.eudat.exceptions.security.UnauthorisedException;
import eu.eudat.logic.builders.entity.UserInfoBuilder;
import eu.eudat.logic.mapper.elastic.DmpMapper;
@ -65,7 +64,6 @@ import eu.eudat.models.data.userinfo.UserListingModel;
import eu.eudat.queryable.QueryableList;
import eu.eudat.types.Authorities;
import eu.eudat.types.MetricNames;
import org.apache.commons.io.IOUtils;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRun;
@ -87,7 +85,6 @@ import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.*;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
@ -408,7 +405,7 @@ public class DataManagementPlanManager {
datasetProfileTableRequestItem.getCriteria().setFilter(DatasetProfileCriteria.DatasetProfileFilter.DMPs.getValue());
datasetProfileTableRequestItem.getCriteria().setUserId(principal.getId());
QueryableList<DatasetProfile> items = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(datasetProfileTableRequestItem.getCriteria());
QueryableList<DescriptionTemplate> items = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(datasetProfileTableRequestItem.getCriteria());
List<DatasetProfileListingModel> listingModels = items.select(item -> new DatasetProfileListingModel().fromDataModel(item));
DataTableData<DatasetProfileListingModel> data = new DataTableData<>();
@ -1603,19 +1600,19 @@ public class DataManagementPlanManager {
Element profiles = xmlDoc.createElement("profiles");
// Get DatasetProfiles from DMP to add to XML.
for (DatasetProfile datasetProfile : dmp.getAssociatedDmps()) {
for (DescriptionTemplate descriptionTemplate : dmp.getAssociatedDmps()) {
Element profile = xmlDoc.createElement("profile");
Element profileId = xmlDoc.createElement("profileId");
profileId.setTextContent(datasetProfile.getId().toString());
profileId.setTextContent(descriptionTemplate.getId().toString());
profile.appendChild(profileId);
Element profileGroupId = xmlDoc.createElement("profileGroupId");
profileGroupId.setTextContent(datasetProfile.getGroupId().toString());
profileGroupId.setTextContent(descriptionTemplate.getGroupId().toString());
profile.appendChild(profileGroupId);
Element profileLabel = xmlDoc.createElement("profileLabel");
profileLabel.setTextContent(datasetProfile.getLabel());
profileLabel.setTextContent(descriptionTemplate.getLabel());
profile.appendChild(profileLabel);
Element profileVersion = xmlDoc.createElement("profileVersion");
profileVersion.setTextContent(String.valueOf(datasetProfile.getVersion()));
profileVersion.setTextContent(String.valueOf(descriptionTemplate.getVersion()));
profile.appendChild(profileVersion);
profiles.appendChild(profile);
}
@ -1755,7 +1752,7 @@ public class DataManagementPlanManager {
List<eu.eudat.models.data.dmp.AssociatedProfile> associatedProfiles = new LinkedList<>();
if (profiles != null && profiles.length > 0) {
for (String profile : profiles) {
DatasetProfile exProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(profile));
DescriptionTemplate exProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(profile));
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(exProfile);
associatedProfiles.add(associatedProfile);
}
@ -1763,7 +1760,7 @@ public class DataManagementPlanManager {
for (AssociatedProfileImportModels a : dataManagementPlans.get(0).getProfilesImportModels()) {
try {
DatasetProfile exProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(a.getId());
DescriptionTemplate exProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(a.getId());
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(exProfile);
associatedProfiles.add(associatedProfile);
} catch (Exception ignored) {

View File

@ -300,7 +300,7 @@ public class DatasetManager {
dataset.setDatasetProfileDefinition(getPagedProfile(dataset, datasetEntity));
dataset.fromDataModel(datasetEntity);
// Creates the Criteria to get all version of DatasetProfile in question.
// Creates the Criteria to get all version of DescriptionTemplate in question.
DatasetProfileCriteria profileCriteria = new DatasetProfileCriteria();
UUID profileId = datasetEntity.getProfile().getGroupId();
List<UUID> uuidList = new LinkedList<>();
@ -308,13 +308,13 @@ public class DatasetManager {
profileCriteria.setGroupIds(uuidList);
profileCriteria.setAllVersions(true);
List<eu.eudat.data.entities.DatasetProfile> profileVersions = databaseRepository.getDatasetProfileDao().getWithCriteria(profileCriteria)
List<DescriptionTemplate> profileVersions = databaseRepository.getDatasetProfileDao().getWithCriteria(profileCriteria)
.orderBy(((builder, root) -> builder.desc(root.get("version"))))
.toList();
List<DatasetProfile> profileVersionsIncluded = new LinkedList<>();
List<DescriptionTemplate> profileVersionsIncluded = new LinkedList<>();
// Iterate through the versions and remove those that are not included in the DMP of the dataset in question.
for (DatasetProfile version : profileVersions) {
for (DescriptionTemplate version : profileVersions) {
for (AssociatedProfile p : dataset.getDmp().getProfiles()) {
if (version.getId().toString().equals(p.getId().toString())) {
profileVersionsIncluded.add(version);
@ -323,14 +323,14 @@ public class DatasetManager {
}
// Sort the list with the included Versions.
Stream<DatasetProfile> sorted = profileVersionsIncluded.stream().sorted(Comparator.comparing(DatasetProfile::getVersion).reversed());
Stream<DescriptionTemplate> sorted = profileVersionsIncluded.stream().sorted(Comparator.comparing(DescriptionTemplate::getVersion).reversed());
// Make the Stream into List and get the first item.
List<DatasetProfile> profiles = sorted.collect(Collectors.toList());
List<DescriptionTemplate> profiles = sorted.collect(Collectors.toList());
if (profiles.isEmpty())
throw new NoSuchElementException("No profiles found for the specific Dataset");
DatasetProfile profile = profiles.get(0);
DescriptionTemplate profile = profiles.get(0);
// Check if the dataset is on the latest Version.
boolean latestVersion = profile.getVersion().toString().equals(datasetEntity.getProfile().getVersion().toString());
@ -717,7 +717,7 @@ public class DatasetManager {
public String checkDatasetValidation(Dataset dataset) throws Exception {
List<String> datasetProfileValidators = new LinkedList<>();
DatasetProfile profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(dataset.getProfile().getId());
DescriptionTemplate profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(dataset.getProfile().getId());
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
Document xmlDocument = builder.parse(new ByteArrayInputStream(profile.getDefinition().getBytes()));
@ -975,9 +975,9 @@ public class DatasetManager {
// Checks if XML datasetProfileId GroupId matches the one selected.
try {
eu.eudat.data.entities.DatasetProfile importDatasetProfile = databaseRepository.getDatasetProfileDao().find(UUID.fromString(importModel.getDatasetProfileId()));
eu.eudat.data.entities.DatasetProfile latestVersionDatasetProfile = databaseRepository.getDatasetProfileDao().find(UUID.fromString(datasetProfileId));
if (latestVersionDatasetProfile.getGroupId() != importDatasetProfile.getGroupId()) {
DescriptionTemplate importDescriptionTemplate = databaseRepository.getDatasetProfileDao().find(UUID.fromString(importModel.getDatasetProfileId()));
DescriptionTemplate latestVersionDescriptionTemplate = databaseRepository.getDatasetProfileDao().find(UUID.fromString(datasetProfileId));
if (latestVersionDescriptionTemplate.getGroupId() != importDescriptionTemplate.getGroupId()) {
throw new Exception();
}
} catch (Exception e) {
@ -1010,7 +1010,7 @@ public class DatasetManager {
entity.setStatus((short) 0);
entity.setCreated(new Date());
entity.setModified(new Date());
DatasetProfile profile = new DatasetProfile();
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(UUID.fromString(datasetProfileId));
entity.setProfile(profile);
@ -1045,7 +1045,7 @@ public class DatasetManager {
dataset.setDatasetProfileDefinition(getPagedProfile(dataset, datasetEntity));
dataset.fromDataModel(datasetEntity);
// Creates the Criteria to get all version of DatasetProfile in question.
// Creates the Criteria to get all version of DescriptionTemplate in question.
DatasetProfileCriteria profileCriteria = new DatasetProfileCriteria();
UUID profileId = datasetEntity.getProfile().getGroupId();
List<UUID> uuidList = new LinkedList<>();
@ -1053,7 +1053,7 @@ public class DatasetManager {
profileCriteria.setGroupIds(uuidList);
// Gets the latest version of the datasetProfile.
eu.eudat.data.entities.DatasetProfile item = databaseRepository.getDatasetProfileDao().getWithCriteria(profileCriteria).getSingle();
DescriptionTemplate item = databaseRepository.getDatasetProfileDao().getWithCriteria(profileCriteria).getSingle();
// Sets the latest version of dataet Profile to the Dataset in question.
dataset.setDatasetProfileDefinition(getLatestDatasetProfile(datasetEntity, item));
@ -1071,7 +1071,7 @@ public class DatasetManager {
return dataset;
}
public PagedDatasetProfile getLatestDatasetProfile(Dataset datasetEntity, DatasetProfile profile) {
public PagedDatasetProfile getLatestDatasetProfile(Dataset datasetEntity, DescriptionTemplate profile) {
eu.eudat.models.data.user.composite.DatasetProfile datasetprofile = userManager.generateDatasetProfileModel(profile);
datasetprofile.setStatus(datasetEntity.getStatus());
if (datasetEntity.getProperties() != null) {
@ -1088,7 +1088,7 @@ public class DatasetManager {
datasetProfileTableRequestItem.getCriteria().setFilter(DatasetProfileCriteria.DatasetProfileFilter.Datasets.getValue());
datasetProfileTableRequestItem.getCriteria().setUserId(principal.getId());
QueryableList<DatasetProfile> items = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(datasetProfileTableRequestItem.getCriteria());
QueryableList<DescriptionTemplate> items = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(datasetProfileTableRequestItem.getCriteria());
List<DatasetProfileListingModel> listingModels = items.select(item -> new DatasetProfileListingModel().fromDataModel(item));
DataTableData<DatasetProfileListingModel> data = new DataTableData<>();
@ -1183,10 +1183,10 @@ public class DatasetManager {
DatasetListingModel listingModel = new DatasetListingModel().fromDataModel(item);
/*DatasetProfileCriteria criteria = new DatasetProfileCriteria();
criteria.setGroupIds(Collections.singletonList(item.getProfile().getGroupId()));
List<DatasetProfile> profiles = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria).toList();
List<DescriptionTemplate> profiles = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria).toList();
boolean islast = false;
if (!profiles.isEmpty()) {
profiles = profiles.stream().sorted(Comparator.comparing(DatasetProfile::getVersion)).collect(Collectors.toList());
profiles = profiles.stream().sorted(Comparator.comparing(DescriptionTemplate::getVersion)).collect(Collectors.toList());
islast = profiles.get(0).getId().equals(item.getProfile().getId());
}
listingModel.setProfileLatestVersion(islast);*/

View File

@ -3,7 +3,7 @@ package eu.eudat.logic.managers;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
import eu.eudat.data.dao.criteria.DatasetProfileCriteria;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.UserDatasetProfile;
import eu.eudat.data.entities.UserInfo;
import eu.eudat.data.query.items.item.datasetprofile.DatasetProfileAutocompleteRequest;
@ -82,11 +82,12 @@ public class DatasetProfileManager {
@Transactional
public eu.eudat.models.data.admin.composite.DatasetProfile getDatasetProfile(String id) {
eu.eudat.data.entities.DatasetProfile profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
DescriptionTemplate profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
eu.eudat.models.data.admin.composite.DatasetProfile datasetprofile = AdminManager.generateDatasetProfileModel(profile);
datasetprofile.setLabel(profile.getLabel());
datasetprofile.setStatus(profile.getStatus());
datasetprofile.setDescription(profile.getDescription());
datasetprofile.setType(profile.getType().getName());
datasetprofile.setLanguage(profile.getLanguage());
datasetprofile.setUsers(new ArrayList<>());
retrieveUsers(profile, datasetprofile);
@ -94,35 +95,35 @@ public class DatasetProfileManager {
}
public List<DatasetProfileAutocompleteItem> getWithCriteria(DatasetProfileAutocompleteRequest datasetProfileAutocompleteRequest) throws IllegalAccessException, InstantiationException {
QueryableList<DatasetProfile> items = databaseRepository.getDatasetProfileDao().getWithCriteria(datasetProfileAutocompleteRequest.getCriteria());
QueryableList<DatasetProfile> pagedItems = datasetProfileAutocompleteRequest.applyPaging(items);
QueryableList<DescriptionTemplate> items = databaseRepository.getDatasetProfileDao().getWithCriteria(datasetProfileAutocompleteRequest.getCriteria());
QueryableList<DescriptionTemplate> pagedItems = datasetProfileAutocompleteRequest.applyPaging(items);
List<DatasetProfileAutocompleteItem> datasetProfiles = pagedItems.select(item -> new DatasetProfileAutocompleteItem().fromDataModel(item));
return datasetProfiles;
}
public DatasetProfile clone(String id) {
DatasetProfile profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
public DescriptionTemplate clone(String id) {
DescriptionTemplate profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
apiContext.getOperationsContext().getDatabaseRepository().detachEntity(profile);
profile.setId(null);
return profile;
}
public DataTableData<DatasetProfileListingModel> getPaged(DatasetProfileTableRequestItem datasetProfileTableRequestItem, Principal principal) throws Exception {
QueryableList<DatasetProfile> items = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(datasetProfileTableRequestItem.getCriteria());
QueryableList<DatasetProfile> authItems = null;
QueryableList<DescriptionTemplate> items = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(datasetProfileTableRequestItem.getCriteria());
QueryableList<DescriptionTemplate> authItems = null;
if (principal.getAuthz().contains(Authorities.ADMIN)) {
authItems = items;
} else if (principal.getAuthz().contains(Authorities.DATASET_PROFILE_MANAGER)) {
List<Integer> roles = Arrays.asList(0, 1);
authItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getAuthenticated(items, principal.getId(), roles);
}
QueryableList<DatasetProfile> pagedItems = PaginationManager.applyPaging(authItems, datasetProfileTableRequestItem);
QueryableList<DescriptionTemplate> pagedItems = PaginationManager.applyPaging(authItems, datasetProfileTableRequestItem);
List<DatasetProfileListingModel> datasetProfiles = pagedItems.select(item -> new DatasetProfileListingModel().fromDataModel(item));
return apiContext.getOperationsContext().getBuilderFactory().getBuilder(DataTableDataBuilder.class).data(datasetProfiles).totalCount(items.count()).build();
}
public List<DatasetProfileListingModel> getAll(DatasetProfileTableRequestItem tableRequestItem) throws IllegalAccessException, InstantiationException {
QueryableList<DatasetProfile> items = databaseRepository.getDatasetProfileDao().getWithCriteria(tableRequestItem.getCriteria());
QueryableList<DescriptionTemplate> items = databaseRepository.getDatasetProfileDao().getWithCriteria(tableRequestItem.getCriteria());
List<DatasetProfileListingModel> datasetProfiles = items.select(item -> new DatasetProfileListingModel().fromDataModel(item));
return datasetProfiles;
@ -276,36 +277,36 @@ public class DatasetProfileManager {
return convFile;
}
public eu.eudat.data.entities.DatasetProfile createNewVersionDatasetProfile(String id, eu.eudat.models.data.admin.composite.DatasetProfile profile) throws Exception {
// Getting the DatasetProfile which we will create its new version.
eu.eudat.data.entities.DatasetProfile oldDatasetProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
public DescriptionTemplate createNewVersionDatasetProfile(String id, eu.eudat.models.data.admin.composite.DatasetProfile profile) throws Exception {
// Getting the DescriptionTemplate which we will create its new version.
DescriptionTemplate oldDescriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
// Getting the DatasetProfile with the latest Version.
// Getting the DescriptionTemplate with the latest Version.
DatasetProfileCriteria criteria = new DatasetProfileCriteria();
LinkedList<UUID> list = new LinkedList<>();
list.push(oldDatasetProfile.getGroupId());
list.push(oldDescriptionTemplate.getGroupId());
criteria.setGroupIds(list);
criteria.setAllVersions(false);
QueryableList<DatasetProfile> datasetProfileQueryableList = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria);
eu.eudat.data.entities.DatasetProfile latestVersionDatasetProfile = datasetProfileQueryableList.getSingle();
QueryableList<DescriptionTemplate> datasetProfileQueryableList = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria);
DescriptionTemplate latestVersionDescriptionTemplate = datasetProfileQueryableList.getSingle();
if (latestVersionDatasetProfile.getVersion().equals(oldDatasetProfile.getVersion())){
if (latestVersionDescriptionTemplate.getVersion().equals(oldDescriptionTemplate.getVersion())){
eu.eudat.models.data.admin.composite.DatasetProfile sortedProfile = profile.toShort();
eu.eudat.data.entities.DatasetProfile modelDefinition = AdminManager.generateViewStyleDefinition(sortedProfile, apiContext);
// modelDefinition.setLabel(oldDatasetProfile.getLabel());
modelDefinition.setVersion((short) (oldDatasetProfile.getVersion() + 1));
modelDefinition.setGroupId(oldDatasetProfile.getGroupId());
// modelDefinition.setLanguage(oldDatasetProfile.getLanguage());
DescriptionTemplate modelDefinition = AdminManager.generateViewStyleDefinition(sortedProfile, apiContext);
// modelDefinition.setLabel(oldDescriptionTemplate.getLabel());
modelDefinition.setVersion((short) (oldDescriptionTemplate.getVersion() + 1));
modelDefinition.setGroupId(oldDescriptionTemplate.getGroupId());
// modelDefinition.setLanguage(oldDescriptionTemplate.getLanguage());
apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
eu.eudat.data.entities.DatasetProfile datasetProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
this.storeDatasetProfileUsers(datasetProfile, profile);
DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(modelDefinition);
this.storeDatasetProfileUsers(descriptionTemplate, profile);
return modelDefinition;
} else {
throw new DatasetProfileNewVersionException("Version to update not the latest.");
}
}
public void storeDatasetProfileUsers(DatasetProfile entity, eu.eudat.models.data.admin.composite.DatasetProfile model) {
public void storeDatasetProfileUsers(DescriptionTemplate entity, eu.eudat.models.data.admin.composite.DatasetProfile model) {
if (model.getUsers() != null && !model.getUsers().isEmpty()) {
if (entity.getUsers() == null) {
entity.setUsers(new HashSet<>());
@ -340,7 +341,7 @@ public class DatasetProfileManager {
}
@Transactional
public void retrieveUsers(DatasetProfile entity, eu.eudat.models.data.admin.composite.DatasetProfile model) {
public void retrieveUsers(DescriptionTemplate entity, eu.eudat.models.data.admin.composite.DatasetProfile model) {
if (entity.getUsers() != null && !entity.getUsers().isEmpty()) {
model.setUsers(entity.getUsers().stream().filter(userDatasetProfile -> userDatasetProfile.getRole() < 2).map(userDatasetProfile -> {
UserInfoListingModel userInfoListingModel = new UserInfoListingModel();
@ -381,10 +382,10 @@ public class DatasetProfileManager {
}
public void addSemanticsInDatasetProfiles() throws XPathExpressionException {
List<DatasetProfile> ids = this.databaseRepository.getDatasetProfileDao().getAllIds();
for(DatasetProfile dp: ids){
DatasetProfile datasetProfile = this.databaseRepository.getDatasetProfileDao().find(dp.getId());
Document document = XmlBuilder.fromXml(datasetProfile.getDefinition());
List<DescriptionTemplate> ids = this.databaseRepository.getDatasetProfileDao().getAllIds();
for(DescriptionTemplate dp: ids){
DescriptionTemplate descriptionTemplate = this.databaseRepository.getDatasetProfileDao().find(dp.getId());
Document document = XmlBuilder.fromXml(descriptionTemplate.getDefinition());
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath();
XPathExpression expr = xpath.compile("//rdaCommonStandard");
@ -402,15 +403,15 @@ public class DatasetProfileManager {
fieldParent.insertBefore(schematics, rdaPropertyNode);
fieldParent.removeChild(rdaPropertyNode);
}
this.updateDatasetProfileXml(document, datasetProfile);
this.updateDatasetProfileXml(document, descriptionTemplate);
}
}
public void addRdaInSemanticsInDatasetProfiles() throws XPathExpressionException {
List<DatasetProfile> ids = this.databaseRepository.getDatasetProfileDao().getAllIds();
for(DatasetProfile dp: ids){
DatasetProfile datasetProfile = this.databaseRepository.getDatasetProfileDao().find(dp.getId());
Document document = XmlBuilder.fromXml(datasetProfile.getDefinition());
List<DescriptionTemplate> ids = this.databaseRepository.getDatasetProfileDao().getAllIds();
for(DescriptionTemplate dp: ids){
DescriptionTemplate descriptionTemplate = this.databaseRepository.getDatasetProfileDao().find(dp.getId());
Document document = XmlBuilder.fromXml(descriptionTemplate.getDefinition());
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath();
XPathExpression expr = xpath.compile("//schematic");
@ -422,11 +423,11 @@ public class DatasetProfileManager {
schematicNode.setTextContent("rda." + schematicRda);
}
}
this.updateDatasetProfileXml(document, datasetProfile);
this.updateDatasetProfileXml(document, descriptionTemplate);
}
}
private void updateDatasetProfileXml(Document document, DatasetProfile datasetProfile) {
private void updateDatasetProfileXml(Document document, DescriptionTemplate descriptionTemplate) {
try {
DOMSource domSource = new DOMSource(document);
StringWriter writer = new StringWriter();
@ -437,8 +438,8 @@ public class DatasetProfileManager {
transformer.transform(domSource, result);
String newDefinition = writer.toString();
if(newDefinition != null){
datasetProfile.setDefinition(newDefinition);
this.databaseRepository.getDatasetProfileDao().createOrUpdate(datasetProfile);
descriptionTemplate.setDefinition(newDefinition);
this.databaseRepository.getDatasetProfileDao().createOrUpdate(descriptionTemplate);
}
}
catch(TransformerException ex) {

View File

@ -5,7 +5,7 @@ import eu.eudat.data.dao.entities.DMPDao;
import eu.eudat.data.dao.entities.DatasetProfileDao;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.UserInfo;
import eu.eudat.data.query.items.item.dataset.DatasetWizardAutocompleteRequest;
import eu.eudat.data.query.items.item.datasetprofile.DatasetProfileWizardAutocompleteRequest;
@ -41,11 +41,11 @@ public class DatasetWizardManager {
}
DatasetProfileCriteria criteria = new DatasetProfileCriteria();
criteria.setIds(dataManagementPlan.getProfiles().stream().map(AssociatedProfile::getId).collect(Collectors.toList()));
List<DatasetProfile> datasetProfiles = profileDao.getWithCriteria(criteria).toList();
List<DescriptionTemplate> descriptionTemplates = profileDao.getWithCriteria(criteria).toList();
criteria.setIds(null);
criteria.setGroupIds(datasetProfiles.stream().map(DatasetProfile::getGroupId).collect(Collectors.toList()));
datasetProfiles = profileDao.getWithCriteria(criteria).toList();
List<AssociatedProfile> profiles = datasetProfiles.stream().map(profile -> new AssociatedProfile().fromData(profile)).collect(Collectors.toList());
criteria.setGroupIds(descriptionTemplates.stream().map(DescriptionTemplate::getGroupId).collect(Collectors.toList()));
descriptionTemplates = profileDao.getWithCriteria(criteria).toList();
List<AssociatedProfile> profiles = descriptionTemplates.stream().map(profile -> new AssociatedProfile().fromData(profile)).collect(Collectors.toList());
return profiles;
}

View File

@ -1,7 +1,7 @@
package eu.eudat.logic.managers;
import eu.eudat.data.dao.criteria.*;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.services.ApiContext;
import eu.eudat.types.MetricNames;
import io.micrometer.prometheus.PrometheusMeterRegistry;
@ -33,8 +33,8 @@ public class MetricsManager {
private final Map<String, Gauge> gauges;
public static final Map<Short, String> datasetTemplateStatus = Stream.of(new Object[][] {
{ DatasetProfile.Status.SAVED.getValue(), MetricNames.DRAFT },
{ DatasetProfile.Status.FINALIZED.getValue(), MetricNames.ACTIVE },
{ DescriptionTemplate.Status.SAVED.getValue(), MetricNames.DRAFT },
{ DescriptionTemplate.Status.FINALIZED.getValue(), MetricNames.ACTIVE },
}).collect(Collectors.toMap(data -> (Short) data[0], data -> (String) data[1]));
public void increaseValue(String name, int amount, String label) {
@ -404,9 +404,9 @@ public class MetricsManager {
criteria.setStatus(1);
criteria.setAllVersions(false);
if (countNexus) criteria.setPeriodStart(getNexusDate());
List<DatasetProfile> datasetProfiles = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria).withFields(Collections.singletonList("id")).toList();
List<DescriptionTemplate> descriptionTemplates = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria).withFields(Collections.singletonList("id")).toList();
DatasetCriteria datasetCriteria = new DatasetCriteria();
datasetCriteria.setDatasetTemplates(datasetProfiles.stream().map(DatasetProfile::getId).collect(Collectors.toList()));
datasetCriteria.setDatasetTemplates(descriptionTemplates.stream().map(DescriptionTemplate::getId).collect(Collectors.toList()));
return apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao().getWithCriteria(datasetCriteria).select(root -> root.getProfile().getId()).stream().distinct().count();
}

View File

@ -1,7 +1,7 @@
package eu.eudat.logic.managers;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.mapper.prefilling.PrefillingMapper;
import eu.eudat.logic.proxy.config.ExternalUrlCriteria;
import eu.eudat.logic.proxy.config.configloaders.ConfigLoader;
@ -51,8 +51,8 @@ public class PrefillingManager {
PrefillingConfig prefillingConfig = configLoader.getExternalUrls().getPrefillings().get(configId);
PrefillingGet prefillingGet = prefillingConfig.getPrefillingGet();
Map<String, Object> prefillingEntity = getSingle(prefillingGet.getUrl(), prefillId);
DatasetProfile datasetProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId);
return PrefillingMapper.mapPrefilledEntityToDatasetWizard(prefillingEntity, prefillingGet, prefillingConfig.getType(), datasetProfile, datasetManager, licenseManager);
DescriptionTemplate descriptionTemplate = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId);
return PrefillingMapper.mapPrefilledEntityToDatasetWizard(prefillingEntity, prefillingGet, prefillingConfig.getType(), descriptionTemplate, datasetManager, licenseManager);
}
private Map<String, Object> getSingle(String url, String id) {

View File

@ -3,13 +3,8 @@ package eu.eudat.logic.managers;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.data.dao.criteria.DataManagementPlanCriteria;
import eu.eudat.data.dao.entities.UserInfoDao;
import eu.eudat.data.entities.Credential;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.UserInfo;
import eu.eudat.data.entities.UserRole;
import eu.eudat.data.entities.*;
import eu.eudat.data.query.items.table.userinfo.UserInfoTableRequestItem;
import eu.eudat.exceptions.security.ExpiredTokenException;
import eu.eudat.exceptions.security.NonValidTokenException;
import eu.eudat.exceptions.security.NullEmailException;
import eu.eudat.exceptions.security.UnauthorisedException;
import eu.eudat.logic.builders.entity.UserRoleBuilder;
@ -72,7 +67,7 @@ public class UserManager {
this.environment = environment;
}
public eu.eudat.models.data.user.composite.DatasetProfile generateDatasetProfileModel(eu.eudat.data.entities.DatasetProfile profile) {
public eu.eudat.models.data.user.composite.DatasetProfile generateDatasetProfileModel(DescriptionTemplate profile) {
Document viewStyleDoc = XmlBuilder.fromXml(profile.getDefinition());
Element root = (Element) viewStyleDoc.getDocumentElement();
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewstyle = new eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel().fromXml(root);

View File

@ -1,11 +1,11 @@
package eu.eudat.logic.mapper.elastic;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.elastic.entities.DatasetTempalate;
public class DatasetTemplateMapper {
public static DatasetTempalate toElastic(DatasetProfile profile) {
public static DatasetTempalate toElastic(DescriptionTemplate profile) {
DatasetTempalate elastic = new DatasetTempalate();
elastic.setId(profile.getId());
elastic.setName(profile.getLabel());

View File

@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.elastic.entities.Tag;
import eu.eudat.logic.managers.DatasetManager;
import eu.eudat.logic.managers.DatasetProfileManager;
@ -37,7 +37,7 @@ public class PrefillingMapper {
private static final ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
public static DatasetWizardModel mapPrefilledEntityToDatasetWizard(Map<String, Object> prefilledEntity, PrefillingGet prefillingGet, String type,
DatasetProfile profile, DatasetManager datasetManager, LicenseManager licenseManager) throws Exception {
DescriptionTemplate profile, DatasetManager datasetManager, LicenseManager licenseManager) throws Exception {
DatasetWizardModel datasetWizardModel = new DatasetWizardModel();
datasetWizardModel.setProfile(new DatasetProfileOverviewModel().fromDataModel(profile));
Dataset dataset = new Dataset();

View File

@ -1,6 +1,8 @@
package eu.eudat.logic.utilities.documents.xml.datasetProfileXml.datasetProfileModel;
import eu.eudat.data.entities.DescriptionTemplate;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -45,7 +47,7 @@ public class DatasetProfile {
public eu.eudat.models.data.admin.composite.DatasetProfile toAdminCompositeModel(String label){
eu.eudat.models.data.admin.composite.DatasetProfile newDatasetEntityProfile = new eu.eudat.models.data.admin.composite.DatasetProfile();
newDatasetEntityProfile.setLabel(label);
newDatasetEntityProfile.setStatus(eu.eudat.data.entities.DatasetProfile.Status.SAVED.getValue());
newDatasetEntityProfile.setStatus(DescriptionTemplate.Status.SAVED.getValue());
newDatasetEntityProfile.setDescription(description);
newDatasetEntityProfile.setLanguage(language);
List<eu.eudat.models.data.admin.components.datasetprofile.Page> pagesDatasetEntity = new LinkedList<>();

View File

@ -1,12 +1,12 @@
package eu.eudat.models.data.datasetprofile;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.models.DataModel;
import java.util.UUID;
public class DatasetProfileAutocompleteItem implements DataModel<DatasetProfile, DatasetProfileAutocompleteItem> {
public class DatasetProfileAutocompleteItem implements DataModel<DescriptionTemplate, DatasetProfileAutocompleteItem> {
private UUID id;
private String label;
@ -34,7 +34,7 @@ public class DatasetProfileAutocompleteItem implements DataModel<DatasetProfile,
}
@Override
public DatasetProfileAutocompleteItem fromDataModel(DatasetProfile entity) {
public DatasetProfileAutocompleteItem fromDataModel(DescriptionTemplate entity) {
this.id = entity.getId();
this.label = entity.getLabel();
this.description = entity.getDescription();
@ -42,8 +42,8 @@ public class DatasetProfileAutocompleteItem implements DataModel<DatasetProfile,
}
@Override
public DatasetProfile toDataModel() {
DatasetProfile profile = new DatasetProfile();
public DescriptionTemplate toDataModel() {
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(this.id);
return profile;
}

View File

@ -1,12 +1,12 @@
package eu.eudat.models.data.datasetprofile;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.models.DataModel;
import java.util.Date;
import java.util.UUID;
public class DatasetProfileListingModel implements DataModel<DatasetProfile, DatasetProfileListingModel> {
public class DatasetProfileListingModel implements DataModel<DescriptionTemplate, DatasetProfileListingModel> {
private UUID id;
private String label;
@ -66,7 +66,7 @@ public class DatasetProfileListingModel implements DataModel<DatasetProfile, Dat
public void setGroupId(UUID groupId) { this.groupId = groupId; }
@Override
public DatasetProfileListingModel fromDataModel(DatasetProfile entity) {
public DatasetProfileListingModel fromDataModel(DescriptionTemplate entity) {
this.id = entity.getId();
this.label = entity.getLabel();
this.status = entity.getStatus();
@ -79,8 +79,8 @@ public class DatasetProfileListingModel implements DataModel<DatasetProfile, Dat
}
@Override
public DatasetProfile toDataModel() {
DatasetProfile profile = new DatasetProfile();
public DescriptionTemplate toDataModel() {
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(this.id);
return profile;
}

View File

@ -1,11 +1,11 @@
package eu.eudat.models.data.datasetprofile;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.models.DataModel;
import java.util.UUID;
public class DatasetProfileOverviewModel implements DataModel<DatasetProfile, DatasetProfileOverviewModel> {
public class DatasetProfileOverviewModel implements DataModel<DescriptionTemplate, DatasetProfileOverviewModel> {
private UUID id;
private String label;
@ -24,15 +24,15 @@ public class DatasetProfileOverviewModel implements DataModel<DatasetProfile, Da
}
@Override
public DatasetProfileOverviewModel fromDataModel(DatasetProfile entity) {
public DatasetProfileOverviewModel fromDataModel(DescriptionTemplate entity) {
this.id = entity.getId();
this.label = entity.getLabel();
return this;
}
@Override
public DatasetProfile toDataModel() {
DatasetProfile entity = new DatasetProfile();
public DescriptionTemplate toDataModel() {
DescriptionTemplate entity = new DescriptionTemplate();
entity.setId(this.getId());
entity.setLabel(this.getLabel());
return entity;

View File

@ -244,7 +244,7 @@ public class DatasetWizardModel implements DataModel<Dataset, DatasetWizardModel
entity.setDescription(this.description);
entity.setCreated(this.created != null ? this.created : new Date());
entity.setModified(new Date());
DatasetProfile profile = new DatasetProfile();
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(this.profile.getId());
entity.setProfile(profile);
if (this.registries != null && !this.registries.isEmpty()) {

View File

@ -1,6 +1,6 @@
package eu.eudat.models.data.dmp;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.utilities.interfaces.XmlSerializable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@ -43,14 +43,14 @@ public class AssociatedProfile implements XmlSerializable<AssociatedProfile> {
return this;
}
public DatasetProfile toData() {
DatasetProfile profile = new DatasetProfile();
public DescriptionTemplate toData() {
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(this.id);
profile.setLabel(this.label);
return profile;
}
public AssociatedProfile fromData(DatasetProfile entity) {
public AssociatedProfile fromData(DescriptionTemplate entity) {
this.id = entity.getId();
this.label = entity.getLabel();
return this;

View File

@ -9,7 +9,6 @@ import eu.eudat.models.data.dynamicfields.DynamicFieldWithValue;
import eu.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.DataManagementPlanProfile;
import eu.eudat.models.data.funder.Funder;
import eu.eudat.models.data.helpermodels.Tuple;
import eu.eudat.models.data.listingmodels.DatasetListingModel;
import eu.eudat.models.data.listingmodels.UserInfoListingModel;
import eu.eudat.models.data.grant.Grant;
import eu.eudat.models.data.project.Project;
@ -259,8 +258,8 @@ public class DataManagementPlan implements DataModel<DMP, DataManagementPlan> {
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
this.profiles = new LinkedList<>();
for (DatasetProfile datasetProfile: entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
for (DescriptionTemplate descriptionTemplate : entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(descriptionTemplate);
this.profiles.add(associatedProfile);
}
}
@ -321,11 +320,11 @@ public class DataManagementPlan implements DataModel<DMP, DataManagementPlan> {
dataManagementPlanEntity.setProject(this.project.toDataModel());
}
if (this.profiles != null) {
Set<DatasetProfile> datasetProfiles = new HashSet<>();
Set<DescriptionTemplate> descriptionTemplates = new HashSet<>();
for (AssociatedProfile profile : this.profiles) {
datasetProfiles.add(profile.toData());
descriptionTemplates.add(profile.toData());
}
dataManagementPlanEntity.setAssociatedDmps(datasetProfiles);
dataManagementPlanEntity.setAssociatedDmps(descriptionTemplates);
}
dataManagementPlanEntity.setProperties(this.properties != null ? JSONObject.toJSONString(this.properties) : null);
dataManagementPlanEntity.setGroupId(this.groupId != null ? this.groupId : UUID.randomUUID());
@ -366,8 +365,8 @@ public class DataManagementPlan implements DataModel<DMP, DataManagementPlan> {
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
this.profiles = new LinkedList<>();
for (DatasetProfile datasetProfile: entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
for (DescriptionTemplate descriptionTemplate : entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(descriptionTemplate);
this.profiles.add(associatedProfile);
}
}

View File

@ -8,7 +8,6 @@ import eu.eudat.models.data.dynamicfields.DynamicFieldWithValue;
import eu.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.DataManagementPlanProfile;
import eu.eudat.models.data.funder.FunderDMPEditorModel;
import eu.eudat.models.data.helpermodels.Tuple;
import eu.eudat.models.data.listingmodels.DatasetListingModel;
import eu.eudat.models.data.listingmodels.UserInfoListingModel;
import eu.eudat.models.data.grant.GrantDMPEditorModel;
import eu.eudat.models.data.project.ProjectDMPEditorModel;
@ -250,8 +249,8 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
this.profiles = new LinkedList<>();
for (DatasetProfile datasetProfile: entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
for (DescriptionTemplate descriptionTemplate : entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(descriptionTemplate);
this.profiles.add(associatedProfile);
}
}
@ -359,11 +358,11 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
}
dataManagementPlanEntity.setDescription(this.description);
if (this.profiles != null) {
Set<DatasetProfile> datasetProfiles = new HashSet<>();
Set<DescriptionTemplate> descriptionTemplates = new HashSet<>();
for (AssociatedProfile profile : this.profiles) {
datasetProfiles.add(profile.toData());
descriptionTemplates.add(profile.toData());
}
dataManagementPlanEntity.setAssociatedDmps(datasetProfiles);
dataManagementPlanEntity.setAssociatedDmps(descriptionTemplates);
}
dataManagementPlanEntity.setProperties(this.properties != null ? JSONObject.toJSONString(this.properties) : null);
dataManagementPlanEntity.setGroupId(this.groupId != null ? this.groupId : UUID.randomUUID());

View File

@ -2,7 +2,7 @@ package eu.eudat.models.data.listingmodels;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.models.DataModel;
import eu.eudat.models.data.dataset.DatasetOverviewModel;
import eu.eudat.models.data.dmp.AssociatedProfile;
@ -205,8 +205,8 @@ public class DataManagementPlanOverviewModel implements DataModel<DMP, DataManag
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
this.associatedProfiles = new LinkedList<>();
for (DatasetProfile datasetProfile : entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
for (DescriptionTemplate descriptionTemplate : entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(descriptionTemplate);
this.associatedProfiles.add(associatedProfile);
}
}

View File

@ -1,15 +1,13 @@
package eu.eudat.models.data.quickwizard;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.models.data.datasetprofile.DatasetProfileOverviewModel;
import eu.eudat.models.data.dmp.DataManagementPlan;
import eu.eudat.data.entities.Dataset;
import eu.eudat.models.data.datasetwizard.DatasetWizardModel;
import eu.eudat.models.data.user.composite.PagedDatasetProfile;
import java.util.Date;
import java.util.UUID;
public class DatasetDescriptionQuickWizardModel extends PagedDatasetProfile {
@ -24,7 +22,7 @@ public class DatasetDescriptionQuickWizardModel extends PagedDatasetProfile {
}
public DatasetWizardModel toDataModel(DataManagementPlan dmp, DatasetProfile profile){
public DatasetWizardModel toDataModel(DataManagementPlan dmp, DescriptionTemplate profile){
DatasetWizardModel newDataset = new DatasetWizardModel();
newDataset.setLabel(datasetLabel);
newDataset.setCreated(new Date());

View File

@ -1,5 +1,6 @@
package eu.eudat.models.data.quickwizard;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.entities.Grant;
import eu.eudat.data.entities.Project;
import eu.eudat.models.data.dmp.AssociatedProfile;
@ -107,12 +108,12 @@ public class DmpQuickWizardModel {
}
public eu.eudat.data.entities.DatasetProfile getDatasetProfile() {
eu.eudat.data.entities.DatasetProfile datasetProfile = new eu.eudat.data.entities.DatasetProfile();
datasetProfile.setDefinition(this.datasetProfile.getLabel());
datasetProfile.setLabel(this.datasetProfile.getLabel());
datasetProfile.setId(this.datasetProfile.getId());
return datasetProfile;
public DescriptionTemplate getDatasetProfile() {
DescriptionTemplate descriptionTemplate = new DescriptionTemplate();
descriptionTemplate.setDefinition(this.datasetProfile.getLabel());
descriptionTemplate.setLabel(this.datasetProfile.getLabel());
descriptionTemplate.setId(this.datasetProfile.getId());
return descriptionTemplate;
}

View File

@ -2,7 +2,7 @@ package eu.eudat.models.rda.mapper;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.elastic.criteria.DatasetCriteria;
import eu.eudat.elastic.entities.Tag;
import eu.eudat.logic.managers.DatasetManager;
@ -268,12 +268,12 @@ public class DatasetRDAMapper {
}
public eu.eudat.data.entities.Dataset toEntity(Dataset rda, DatasetProfile defaultProfile) {
public eu.eudat.data.entities.Dataset toEntity(Dataset rda, DescriptionTemplate defaultProfile) {
eu.eudat.data.entities.Dataset entity = new eu.eudat.data.entities.Dataset();
entity.setLabel(rda.getTitle());
entity.setDescription(rda.getDescription());
try {
DatasetProfile profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(rda.getAdditionalProperties().get("template").toString()));
DescriptionTemplate profile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(rda.getAdditionalProperties().get("template").toString()));
entity.setProfile(profile);
}catch(Exception e) {
logger.warn(e.getMessage(), e);

View File

@ -133,7 +133,7 @@ public class DmpRDAMapper {
}
if (profiles != null) {
for (String profile : profiles) {
DatasetProfile exProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(profile));
DescriptionTemplate exProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(profile));
entity.getAssociatedDmps().add(exProfile);
}
}
@ -143,7 +143,7 @@ public class DmpRDAMapper {
entity.setCreated(rda.getCreated());
entity.setModified(rda.getModified());
entity.setDescription(rda.getDescription());
DatasetProfile defaultProfile = ((DatasetProfile)entity.getAssociatedDmps().toArray()[0]);
DescriptionTemplate defaultProfile = ((DescriptionTemplate)entity.getAssociatedDmps().toArray()[0]);
entity.setDataset(rda.getDataset().stream().map(rda1 -> datasetRDAMapper.toEntity(rda1, defaultProfile)).collect(Collectors.toSet()));
if (rda.getProject().size() > 0) {
Map<String, Object> result = ProjectRDAMapper.toEntity(rda.getProject().get(0), apiContext);
@ -159,7 +159,7 @@ public class DmpRDAMapper {
return entity;
}
private DatasetProfile getProfile(String id) {
private DescriptionTemplate getProfile(String id) {
return apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().asQueryable().where(((builder, root) -> builder.equal(root.get("id"), UUID.fromString(id)))).getSingleOrDefault();
}
}

View File

@ -1,6 +1,7 @@
package eu.eudat.publicapi.managers;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.data.query.definition.helpers.ColumnOrderings;
import eu.eudat.elastic.criteria.DatasetCriteria;
import eu.eudat.elastic.repository.DatasetRepository;
@ -139,10 +140,10 @@ public class DatasetPublicManager {
DatasetPublicListingModel listingPublicModel = new DatasetPublicListingModel().fromDataModel(item);
/*DatasetProfileCriteria criteria = new DatasetProfileCriteria();
criteria.setGroupIds(Collections.singletonList(item.getProfile().getGroupId()));
List<DatasetProfile> profiles = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria).toList();
List<DescriptionTemplate> profiles = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getWithCriteria(criteria).toList();
boolean islast = false;
if (!profiles.isEmpty()) {
profiles = profiles.stream().sorted(Comparator.comparing(DatasetProfile::getVersion)).collect(Collectors.toList());
profiles = profiles.stream().sorted(Comparator.comparing(DescriptionTemplate::getVersion)).collect(Collectors.toList());
islast = profiles.get(0).getId().equals(item.getProfile().getId());
}
listingModel.setProfileLatestVersion(islast);*/
@ -162,7 +163,7 @@ public class DatasetPublicManager {
return pagedDatasetProfile;
}
private eu.eudat.models.data.user.composite.DatasetProfile generateDatasetProfileModel(eu.eudat.data.entities.DatasetProfile profile) {
private eu.eudat.models.data.user.composite.DatasetProfile generateDatasetProfileModel(DescriptionTemplate profile) {
Document viewStyleDoc = XmlBuilder.fromXml(profile.getDefinition());
Element root = (Element) viewStyleDoc.getDocumentElement();
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewstyle = new eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel().fromXml(root);

View File

@ -1,6 +1,6 @@
package eu.eudat.publicapi.models.associatedprofile;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.utilities.interfaces.XmlSerializable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@ -42,14 +42,14 @@ public class AssociatedProfilePublicModel implements XmlSerializable<AssociatedP
return this;
}
public DatasetProfile toData() {
DatasetProfile profile = new DatasetProfile();
public DescriptionTemplate toData() {
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(this.id);
profile.setLabel(this.label);
return profile;
}
public AssociatedProfilePublicModel fromData(DatasetProfile entity) {
public AssociatedProfilePublicModel fromData(DescriptionTemplate entity) {
this.id = entity.getId();
this.label = entity.getLabel();
return this;

View File

@ -1,11 +1,11 @@
package eu.eudat.publicapi.models.datasetprofile;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.models.DataModel;
import java.util.UUID;
public class DatasetProfilePublicModel implements DataModel<DatasetProfile, DatasetProfilePublicModel> {
public class DatasetProfilePublicModel implements DataModel<DescriptionTemplate, DatasetProfilePublicModel> {
private UUID id;
private String label;
@ -24,15 +24,15 @@ public class DatasetProfilePublicModel implements DataModel<DatasetProfile, Data
}
@Override
public DatasetProfilePublicModel fromDataModel(DatasetProfile entity) {
public DatasetProfilePublicModel fromDataModel(DescriptionTemplate entity) {
this.id = entity.getId();
this.label = entity.getLabel();
return this;
}
@Override
public DatasetProfile toDataModel() {
DatasetProfile entity = new DatasetProfile();
public DescriptionTemplate toDataModel() {
DescriptionTemplate entity = new DescriptionTemplate();
entity.setId(this.getId());
entity.setLabel(this.getLabel());
return entity;

View File

@ -2,7 +2,7 @@ package eu.eudat.publicapi.models.overviewmodels;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.data.entities.DescriptionTemplate;
import eu.eudat.logic.utilities.builders.XmlBuilder;
import eu.eudat.models.DataModel;
import eu.eudat.models.data.user.composite.PagedDatasetProfile;
@ -193,8 +193,8 @@ public class DataManagementPlanPublicModel implements DataModel<DMP, DataManagem
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
this.associatedProfiles = new LinkedList<>();
for (DatasetProfile datasetProfile : entity.getAssociatedDmps()) {
AssociatedProfilePublicModel associatedProfile = new AssociatedProfilePublicModel().fromData(datasetProfile);
for (DescriptionTemplate descriptionTemplate : entity.getAssociatedDmps()) {
AssociatedProfilePublicModel associatedProfile = new AssociatedProfilePublicModel().fromData(descriptionTemplate);
this.associatedProfiles.add(associatedProfile);
}
}
@ -217,7 +217,7 @@ public class DataManagementPlanPublicModel implements DataModel<DMP, DataManagem
return pagedDatasetProfile;
}
private eu.eudat.models.data.user.composite.DatasetProfile generateDatasetProfileModel(eu.eudat.data.entities.DatasetProfile profile) {
private eu.eudat.models.data.user.composite.DatasetProfile generateDatasetProfileModel(DescriptionTemplate profile) {
Document viewStyleDoc = XmlBuilder.fromXml(profile.getDefinition());
Element root = (Element) viewStyleDoc.getDocumentElement();
eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel viewstyle = new eu.eudat.models.data.entities.xmlmodels.datasetprofiledefinition.ViewStyleModel().fromXml(root);

View File

@ -232,7 +232,7 @@ public class DatasetPublicModel implements DataModel<Dataset, DatasetPublicModel
entity.setDescription(this.description);
entity.setCreated(this.createdAt != null ? this.createdAt : new Date());
entity.setModified(new Date());
DatasetProfile profile = new DatasetProfile();
DescriptionTemplate profile = new DescriptionTemplate();
profile.setId(this.profile.getId());
entity.setProfile(profile);
if (this.registries != null && !this.registries.isEmpty()) {

View File

@ -17,7 +17,9 @@ INSERT INTO public."DoiFunder"(name, doi) VALUES ('Wellcome Trust', '10.13039/10
UPDATE public."DMP"
SET "extraProperties"='{"language": "en"}';
UPDATE public."DatasetProfile"
UPDATE public."DescriptionTemplate"
SET "Language"='en';
INSERT INTO public."DescriptionTemplateType"("ID", "Name") VALUES (uuid_generate_v4(), 'Dataset');
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.007', '2020-10-27 13:40:00.000000+03', now(), 'Add userstatus on UserInfo table');

View File

@ -302,10 +302,22 @@ CREATE TABLE public."DatasetExternalDataset" (
ALTER TABLE public."DatasetExternalDataset" OWNER TO :POSTGRES_USER;
--
-- Name: DatasetProfile; Type: TABLE; Schema: public; Owner: :POSTGRES_USER
-- Name: DescriptionTemplateType; Type: TABLE; Schema: public; Owner: :POSTGRES_USER
--
CREATE TABLE public."DatasetProfile" (
CREATE TABLE public."DescriptionTemplateType" (
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
"Name" character varying(250) NOT NULL
);
ALTER TABLE public."DescriptionTemplateType" OWNER TO :POSTGRES_USER;
--
-- Name: DescriptionTemplate; Type: TABLE; Schema: public; Owner: :POSTGRES_USER
--
CREATE TABLE public."DescriptionTemplate" (
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
"Label" character varying(250) NOT NULL,
"Definition" xml NOT NULL,
@ -315,17 +327,18 @@ CREATE TABLE public."DatasetProfile" (
"Description" text NOT NULL,
"GroupId" uuid NOT NULL,
"Version" integer DEFAULT 0 NOT NULL,
"Language" character varying NOT NULL
"Language" character varying NOT NULL,
"Type" uuid NOT NULL
);
ALTER TABLE public."DatasetProfile" OWNER TO :POSTGRES_USER;
ALTER TABLE public."DescriptionTemplate" OWNER TO :POSTGRES_USER;
--
-- Name: TABLE "DatasetProfile"; Type: COMMENT; Schema: public; Owner: :POSTGRES_USER
-- Name: TABLE "DescriptionTemplate"; Type: COMMENT; Schema: public; Owner: :POSTGRES_USER
--
COMMENT ON TABLE public."DatasetProfile" IS 'Profiles for dmp datasets';
COMMENT ON TABLE public."DescriptionTemplate" IS 'Profiles for dmp descriptions';
--
@ -1020,11 +1033,19 @@ ALTER TABLE ONLY public."DatasetProfileViewstyle"
--
-- Name: DatasetProfile DatasetProfile_pkey; Type: CONSTRAINT; Schema: public; Owner: :POSTGRES_USER
-- Name: DescriptionTemplateType DescriptionTemplateType_pkey; Type: CONSTRAINT; Schema: public; Owner: :POSTGRES_USER
--
ALTER TABLE ONLY public."DatasetProfile"
ADD CONSTRAINT "DatasetProfile_pkey" PRIMARY KEY ("ID");
ALTER TABLE ONLY public."DescriptionTemplateType"
ADD CONSTRAINT "DescriptionTemplateType_pkey" PRIMARY KEY ("ID");
--
-- Name: DescriptionTemplate DescriptionTemplate_pkey; Type: CONSTRAINT; Schema: public; Owner: :POSTGRES_USER
--
ALTER TABLE ONLY public."DescriptionTemplate"
ADD CONSTRAINT "DescriptionTemplate_pkey" PRIMARY KEY ("ID");
--
@ -1260,7 +1281,7 @@ ALTER TABLE ONLY public."DMP"
--
ALTER TABLE ONLY public."DMPDatasetProfile"
ADD CONSTRAINT "DMPDatasetProfile_datasetprofile_fkey" FOREIGN KEY (datasetprofile) REFERENCES public."DatasetProfile"("ID");
ADD CONSTRAINT "DMPDatasetProfile_datasetprofile_fkey" FOREIGN KEY (datasetprofile) REFERENCES public."DescriptionTemplate"("ID");
--
@ -1340,7 +1361,7 @@ ALTER TABLE ONLY public."DatasetDataRepository"
--
ALTER TABLE ONLY public."Dataset"
ADD CONSTRAINT "DatasetDatasetProfileReference" FOREIGN KEY ("Profile") REFERENCES public."DatasetProfile"("ID");
ADD CONSTRAINT "DatasetDatasetProfileReference" FOREIGN KEY ("Profile") REFERENCES public."DescriptionTemplate"("ID");
--
@ -1375,6 +1396,14 @@ ALTER TABLE ONLY public."DatasetService"
ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES public."Service"("ID");
--
-- Name: DescriptionTemplate DescriptionTemplateTypeReference; Type: FK CONSTRAINT; Schema: public; Owner: :POSTGRES_USER
--
ALTER TABLE ONLY public."DescriptionTemplate"
ADD CONSTRAINT "DescriptionTemplateTypeReference" FOREIGN KEY ("Type") REFERENCES public."DescriptionTemplateType"("ID");
--
-- Name: Lock LockUserReference; Type: FK CONSTRAINT; Schema: public; Owner: :POSTGRES_USER
--
@ -1395,7 +1424,7 @@ ALTER TABLE ONLY public."Notification"
--
ALTER TABLE ONLY public."UserDatasetProfile"
ADD CONSTRAINT "UserDatasetProfile_datasetProfile_fkey" FOREIGN KEY ("datasetProfile") REFERENCES public."DatasetProfile" ("ID");
ADD CONSTRAINT "UserDatasetProfile_datasetProfile_fkey" FOREIGN KEY ("datasetProfile") REFERENCES public."DescriptionTemplate" ("ID");
--
-- Name: UserDatasetProfile UserDatasetProfile_user_key; Type: FK CONSTRAINT; Schema: public; Owner: :POSTGRES_USER

View File

@ -0,0 +1,19 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.00.013';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
CREATE TABLE public."DescriptionTemplateType"
(
"ID" uuid NOT NULL,
"Name" character varying(250) NOT NULL,
CONSTRAINT "DescriptionTemplateType_pkey" PRIMARY KEY ("ID")
);
/*ALTER TABLE public."DescriptionTemplateType" OWNER TO :POSTGRES_USER;*/
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.013', '2023-06-21 12:00:00.000000+02', now(), 'Add Description Template Type table.');
END$$;

View File

@ -0,0 +1,29 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.00.014';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
ALTER TABLE public."DatasetProfile"
RENAME TO "DescriptionTemplate";
ALTER TABLE public."DescriptionTemplate"
ADD COLUMN "Type" uuid;
INSERT INTO public."DescriptionTemplateType" ("ID", "Name")
VALUES ('709a8400-10ca-11ee-be56-0242ac120002', 'Dataset');
UPDATE public."DescriptionTemplate" SET ("Type") = '709a8400-10ca-11ee-be56-0242ac120002';
ALTER TABLE public."DescriptionTemplate"
ALTER COLUMN "Type" SET NOT NULL;
ALTER TABLE ONLY public."DescriptionTemplate"
ADD CONSTRAINT "DescriptionTemplate_type_fkey" FOREIGN KEY ("Type") REFERENCES public."DescriptionTemplateType"("ID");
ALTER TABLE "UserDatasetProfile"
RENAME COLUMN "datasetProfile" TO "descriptionTemplate";
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.014', '2023-06-21 12:00:00.000000+02', now(), 'Rename DatasetProfile Table to DescriptionTemplate and add column Type referencing the DescriptionTemplateType.');
END$$;

View File

@ -47,7 +47,7 @@ const appRoutes: Routes = [
loadChildren: () => import('./ui/dataset/dataset.module').then(m => m.DatasetModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.DATASETS'
title: 'GENERAL.TITLES.DESCRIPTIONS'
}
},
{
@ -80,7 +80,7 @@ const appRoutes: Routes = [
loadChildren: () => import('./ui/admin/dmp-profile/dmp-profile.module').then(m => m.DmpProfileModule),
data: {
breadcrumb: true,
title: 'GENERAL.TITLES.DMP-PROFILES'
title: 'GENERAL.TITLES.DMP-BLUEPRINTS'
}
},
{

View File

@ -30,7 +30,7 @@ export class EnumUtils {
case AppRole.Admin: return this.language.instant('TYPES.APP-ROLE.ADMIN');
case AppRole.User: return this.language.instant('TYPES.APP-ROLE.USER');
case AppRole.Manager: return this.language.instant('TYPES.APP-ROLE.MANAGER');
case AppRole.DatasetTemplateEditor: return this.language.instant('TYPES.APP-ROLE.DATASET-TEMPLATE-EDITOR');
case AppRole.DatasetTemplateEditor: return this.language.instant('TYPES.APP-ROLE.DESCRIPTION-TEMPLATE-EDITOR');
}
}

View File

@ -8,7 +8,7 @@
<div class="col-12 col-lg d-flex justify-content-lg-end">
<div class="align-self-center">
<button mat-raised-button class="import-btn" (click)="openDialog()">{{ 'DATASET-WIZARD.UPLOAD.UPLOAD-XML' | translate }}</button>
<button mat-raised-button class="create-btn ml-md-3" [routerLink]="['./new']">{{'DATASET-PROFILE-LISTING.ACTIONS.CREATE-DATASET-TEMPLATE' | translate}}</button>
<button mat-raised-button class="create-btn ml-md-3" [routerLink]="['./new']">{{'DATASET-PROFILE-LISTING.ACTIONS.CREATE-DESCRIPTION-TEMPLATE' | translate}}</button>
</div>
</div>
</div>

View File

@ -22,7 +22,7 @@
<button type="button" class="col-auto align-self-center normal-btn" (click)="openNewDmpDialog()">{{'DASHBOARD.START-YOUR-FIRST-DMP' | translate}}</button>
</div>
<div *ngIf="this.hasDmps()" class="new-dataset-tour add-dataset-btn col-auto d-flex">
<button mat-raised-button type="button" class="col-auto align-self-center yellow-btn" (click)="addNewDataset()">{{'DASHBOARD.ACTIONS.ADD-DATASET-DESCRIPTION' | translate}}</button>
<button mat-raised-button type="button" class="col-auto align-self-center yellow-btn" (click)="addNewDataset()">{{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}</button>
</div>
<span class="col-auto ml-auto">
<img class="laptop-img\6" src="../../../assets/images/dashboard-popup.png">
@ -49,13 +49,13 @@
<app-recent-edited-dmp-activity (totalCountDmps)="onCountDmps($event)" [isActive]="currentType == 'dmps'"></app-recent-edited-dmp-activity>
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
</mat-tab>
<!-- <mat-tab aria-label="datasets" label="{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} ({{totalDatasets}})">-->
<mat-tab aria-label="datasets" label="{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}">
<!-- <mat-tab aria-label="datasets" label="{{'DASHBOARD.DESCRIPTIONS' | translate}} ({{totalDatasets}})">-->
<mat-tab aria-label="datasets" label="{{'DASHBOARD.DESCRIPTIONS' | translate}}">
<app-recent-edited-dataset-activity (totalCountDatasets)="onCountDatasets($event)" [isActive]="currentType == 'datasets'"></app-recent-edited-dataset-activity>
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<button mat-raised-button class="add-dataset" (click)="addNewDataset()">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DATASET' | translate}}
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div>
</mat-tab>
@ -69,7 +69,7 @@
<div class="counter-zero">0</div>
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<div class="counter-zero">0</div>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}</a>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div class="counter-zero">0</div>
<a class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
<div class="counter-zero">0</div>
@ -83,7 +83,7 @@
<a [routerLink]="['/plans']" class="link">{{'DASHBOARD.DMPS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalDataSetCount != 0, 'counter-zero': dashboardStatisticsData?.totalDataSetCount == 0}">
{{dashboardStatisticsData?.totalDataSetCount}}</div>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}}</a>
<a [routerLink]="['/datasets']" class="link">{{'DASHBOARD.DESCRIPTIONS' | translate}}</a>
<div [ngClass]="{'counter': dashboardStatisticsData?.totalGrantCount != 0, 'counter-zero': dashboardStatisticsData?.totalGrantCount == 0}">
{{dashboardStatisticsData?.totalGrantCount}}</div>
<a href="#" class="link-disabled">{{'DASHBOARD.GRANTS' | translate}}</a>
@ -147,7 +147,7 @@
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
<!-- <div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
<button mat-raised-button class="add-dataset" [routerLink]="['/datasets/new']">
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DATASET' | translate}}
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div> -->
</mat-tab>

View File

@ -26,7 +26,7 @@
<div class="dataset-card">
<a [routerLink]="['../datasets/overview/' + activity.id]" class="pointer">
<div class="d-flex flex-direction-row">
<div class="col-auto dataset-label">{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}</div>
<div class="col-auto dataset-label">{{'DATASET-LISTING.DESCRIPTION' | translate}}</div>
<div class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.EDITED' | translate}}: {{activity.modified | dateTimeCultureFormatter: "d MMMM y"}}</div>
</div>
<div class="col-auto dataset-title-draft">{{activity.label}}</div>
@ -50,7 +50,7 @@
<div class="dataset-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" (click)="openShareDialog(activity.dmpId, activity.dmp)"><span class="material-icons icon-align pr-2">group_add</span>{{'DATASET-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" (click)="openDmpSearchDialogue(activity)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}</a>
<a class="col-auto border-right pointer" (click)="openDmpSearchDialogue(activity)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}</a>
<a class="col-auto border-right pointer" (click)="deleteClicked(activity.id)"><span class="material-icons icon-align pr-2">delete</span>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}</a>
<!-- <a class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a> -->
@ -58,7 +58,7 @@
</div>
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item (click)="openDmpSearchDialogue(activity)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}
</button>
<button mat-menu-item (click)="deleteClicked(activity.id)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}

View File

@ -48,7 +48,7 @@
<span>.</span>
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
</div>
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ getDatasets(activity).length }})
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DESCRIPTIONS' | translate}}: ({{ getDatasets(activity).length }})
</div>
<div *ngFor="let dataset of getDatasets(activity); let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
<div *ngIf="i < 3">
@ -61,7 +61,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(activity)" (click)="openShareDialog(activity.id, activity.title)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(activity, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(getGroupId(activity), activity.title, activity)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>
@ -106,7 +106,7 @@
<!-- <a (click)="redirect(activity.id, activity.type)" class="pointer"> -->
<a [routerLink]="navigateToUrl(activity.id, activity.type)" class="pointer">
<div class="d-flex flex-direction-row">
<div class="col-auto dataset-label">{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}</div>
<div class="col-auto dataset-label">{{'DATASET-LISTING.DESCRIPTION' | translate}}</div>
<div *ngIf="!publicMode" class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.EDITED' | translate}}: {{activity.modified | dateTimeCultureFormatter: "d MMMM y"}}</div>
<div *ngIf="publicMode" class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.PUBLISHED' | translate}}: {{activity.publishedAt | dateTimeCultureFormatter: "d MMMM y"}}</div>
</div>
@ -132,7 +132,7 @@
<div class="dataset-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openShareDialog(getDmpId(activity), getDmp(activity))"><span class="material-icons icon-align pr-2">group_add</span>{{'DATASET-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(activity)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(activity)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="deleteDatasetClicked(activity.id)"><span class="material-icons icon-align pr-2">delete</span>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}</a>
<!-- <a class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a> -->
@ -140,7 +140,7 @@
</div>
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item (click)="openDmpSearchDialogue(activity)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}
</button>
<button mat-menu-item (click)="deleteDatasetClicked(activity.id)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}

View File

@ -27,7 +27,7 @@
<div class="dataset-card">
<a [routerLink]="goToOverview(activity.id)" class="pointer">
<div class="d-flex flex-direction-row">
<div class="col-auto dataset-label">{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}</div>
<div class="col-auto dataset-label">{{'DATASET-LISTING.DESCRIPTION' | translate}}</div>
<div *ngIf="!publicMode" class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.EDITED' | translate}}: {{activity.modified | dateTimeCultureFormatter: "d MMMM y"}}</div>
<div *ngIf="publicMode" class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.PUBLISHED' | translate}}: {{activity.dmpPublishedAt | dateTimeCultureFormatter: "d MMMM y"}}</div>
</div>
@ -53,7 +53,7 @@
<div class="dataset-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(activity)" (click)="openShareDialog(activity.dmpId, activity.dmp)"><span class="material-icons icon-align pr-2">group_add</span>{{'DATASET-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(activity)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(activity)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="deleteClicked(activity.id)"><span class="material-icons icon-align pr-2">delete</span>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}</a>
<!-- <a *ngIf="this.isAuthenticated()" class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a> -->
@ -61,7 +61,7 @@
</div>
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(activity)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}
</button>
<button mat-menu-item (click)="deleteClicked(activity.id)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}

View File

@ -43,7 +43,7 @@
<span>.</span>
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{activity.grant}}</span>
</div>
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ activity.datasets.length }})
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DESCRIPTIONS' | translate}}: ({{ activity.datasets.length }})
</div>
<div *ngFor="let dataset of activity.datasets; let i = index; let last = last" [ngClass]="{'pb-3': i === activity.datasets.length - 1}">
<div *ngIf="i < 3">
@ -55,7 +55,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(activity)" [routerLink]="['/datasets/new/' + activity.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(activity)" (click)="openShareDialog(activity.id, activity.label)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(activity, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(activity.groupId, activity.label, activity)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -10,7 +10,7 @@
<div class="col info">
<ng-container *ngIf="!viewOnly else viewOnlyTemplate">
<div *ngIf="isNew" class="dataset-title">{{'DMP-EDITOR.TITLE.ADD-DATASET' | translate}}</div>
<div *ngIf="!isNew" class="dataset-title">{{'DMP-EDITOR.TITLE.EDIT-DATASET' | translate}}</div>
<div *ngIf="!isNew" class="dataset-title">{{'DMP-EDITOR.TITLE.EDIT-DESCRIPTION' | translate}}</div>
<div class="dataset-subtitle">{{ formGroup.get('label').value }} <span *ngIf="isDirty()" class="dataset-changes">({{'DMP-EDITOR.CHANGES' | translate}})</span></div>
</ng-container>
<ng-template #viewOnlyTemplate>
@ -183,7 +183,7 @@
</button>
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item (click)="openDmpSearchDialogue()" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}
</button>
<button mat-menu-item *ngIf="!viewOnly && !isCopy" (click)="openConfirm(formGroup.get('label').value, formGroup.get('id').value)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}

View File

@ -9,17 +9,17 @@
<p class="mt-4 pt-2">{{'DATASET-LISTING.TEXT-INFO-PAR' | translate}}
<div class="d-flex">
<button mat-raised-button class="add-dataset align-self-center yellow-btn" (click)="addNewDataset()">
{{'DASHBOARD.ACTIONS.ADD-DATASET' | translate}}
{{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
<img class="col-auto ml-auto laptop-img" src="../../../assets/images/dashboard-popup.png">
</div>
</div>
</div>
<p *ngIf="listingItems && listingItems.length > 0 || this.criteria.like" class="col-auto header-title">{{(isPublic ? 'GENERAL.TITLES.EXPLORE' : 'GENERAL.TITLES.DATASETS') | translate}}</p>
<p *ngIf="listingItems && listingItems.length > 0 || this.criteria.like" class="col-auto header-title">{{(isPublic ? 'GENERAL.TITLES.EXPLORE' : 'GENERAL.TITLES.DESCRIPTIONS') | translate}}</p>
<div *ngIf="listingItems && listingItems.length > 0 && !isPublic || this.criteria.like" class="ml-auto">
<div class="col-auto">
<button mat-raised-button class="add-dataset align-self-center yellow-btn" (click)="addNewDataset()">
{{'DASHBOARD.ACTIONS.ADD-DATASET' | translate}}
{{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
</button>
</div>
</div>

View File

@ -1,7 +1,7 @@
<div class="dataset-card">
<a [routerLink]="getItemLink()" class="pointer">
<div class="d-flex flex-direction-row">
<div class="col-auto dataset-label">{{'DATASET-LISTING.DATASET-DESCRIPTION' | translate}}</div>
<div class="col-auto dataset-label">{{'DATASET-LISTING.DESCRIPTION' | translate}}</div>
<div *ngIf="!isPublic" class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.EDITED' | translate}}: {{dataset.modified | dateTimeCultureFormatter: "d MMMM y"}}</div>
<div *ngIf="isPublic" class="col-auto ml-auto edited-date">{{'DATASET-LISTING.STATES.PUBLISHED' | translate}}: {{dataset.dmpPublishedAt | dateTimeCultureFormatter: "d MMMM y"}}</div>
</div>
@ -27,7 +27,7 @@
<div class="dataset-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DATASET-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner" (click)="openShareDialog(dataset.dmpId, dataset.dmp)"><span class="material-icons icon-align pr-2">group_add</span>{{'DATASET-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(dataset)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(dataset)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated() && isUserDatasetRelated()" (click)="deleteClicked(dataset.id)"><span class="material-icons icon-align pr-2">delete</span>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}</a>
<!-- <a *ngIf="this.isAuthenticated()" class="col-auto pointer" [matMenuTriggerFor]="actionsMenu"><span class="material-icons icon-align pl-2">more_horiz</span></a> -->
@ -35,7 +35,7 @@
</div>
<mat-menu #actionsMenu="matMenu">
<button *ngIf="isAuthenticated()" mat-menu-item (click)="openDmpSearchDialogue(dataset)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DESCRIPTION' | translate}}
</button>
<button *ngIf="isUserDatasetRelated()" mat-menu-item (click)="deleteClicked(dataset.id)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}

View File

@ -8,7 +8,7 @@
<div class="row">
<div class="col-md-8 col-lg-8 pl-4">
<div class="row">
<span class="col-auto dataset-logo">{{ 'NAV-BAR.DATASET' | translate }}</span>
<span class="col-auto dataset-logo">{{ 'NAV-BAR.DESCRIPTION' | translate }}</span>
<p class="col dataset-label p-0 ml-3 mb-0">{{ dataset.label }}</p>
</div>
<div class="row d-flex align-items-center mt-3 mb-4 label-txt">
@ -151,7 +151,7 @@
</div>
<div class="frame mb-3 pt-4 pl-3 pr-3 pb-1">
<div class="row ml-0 mr-0 pl-4 pb-3">
<p class="header">{{ 'DATASET-OVERVIEW.DATASET-AUTHORS' | translate }}</p>
<p class="header">{{ 'DATASET-OVERVIEW.DESCRIPTION-AUTHORS' | translate }}</p>
</div>
<div class="row ml-0 mr-0 pl-4 ml-2 pb-3 d-flex align-items-center">
<div *ngFor="let user of dataset.users" class="row authors">

View File

@ -53,9 +53,9 @@
<!-- Datasets -->
<div class="row">
<div class="col-12">
<div class="heading">{{'DMP-EDITOR.FIELDS.DATASETS' | translate}}</div>
<div class="heading">{{'DMP-EDITOR.FIELDS.DESCRIPTIONS' | translate}}</div>
<div *ngIf="hasDatasets()">
<h5>{{'DATASET-LISTING.SELECT-DATASETS-TO-CLONE' | translate}}</h5>
<h5>{{'DATASET-LISTING.SELECT-DESCRIPTIONS-TO-CLONE' | translate}}</h5>
<mat-card class="mat-card">
<mat-selection-list #selectedItems (selectionChange)="selectionChanged(selectedItems)">
<mat-list-option *ngFor="let dataset of data.datasets;" [value]="dataset.id">
@ -65,7 +65,7 @@
</mat-card>
</div>
<div *ngIf="!hasDatasets()">
<h5 mat-subheader class="p-3">{{'DATASET-LISTING.SELECT-DATASETS-NONE' | translate}}</h5>
<h5 mat-subheader class="p-3">{{'DATASET-LISTING.SELECT-DESCRIPTIONS-NONE' | translate}}</h5>
</div>
</div>
</div>

View File

@ -30,8 +30,8 @@
<div class="col">
<div class="row">
<div class="col info">
<!-- <div class="dataset-title">{{'DMP-EDITOR.TITLE.EDIT-DATASET' | translate}}</div> -->
<div class="dataset-title">{{'DATASET-LISTING.SELECT-DATASETS-TO-CLONE' | translate}}</div>
<!-- <div class="dataset-title">{{'DMP-EDITOR.TITLE.EDIT-DESCRIPTION' | translate}}</div> -->
<div class="dataset-title">{{'DATASET-LISTING.SELECT-DESCRIPTIONS-TO-CLONE' | translate}}</div>
<div class="dataset-subtitle">{{ dataset.value.label }} <span *ngIf="isDirty()" class="dataset-changes">({{'DMP-EDITOR.CHANGES' | translate}})</span></div>
<div class="d-flex flex-direction-row pt-2">
<div class="col-auto dataset-part-of">{{'DATASET-LISTING.TOOLTIP.PART-OF' | translate}}
@ -65,7 +65,7 @@
<li (click)="changeStep(0)" [ngClass]="{'active': this.step === 0}">{{'DMP-EDITOR.STEPPER.MAIN-INFO' | translate}} (4)</li>
<li (click)="changeStep(1)" [ngClass]="{'active': this.step === 1}">{{'DMP-EDITOR.STEPPER.FUNDING-INFO' | translate}} (3)</li>
<li (click)="changeStep(2)" [ngClass]="{'active': this.step === 2}">{{'DMP-EDITOR.STEPPER.LICENSE-INFO' | translate}} (6)</li>
<li (click)="changeStep(3)" [ngClass]="{'active': this.step === 3}">{{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}}</li>
<li (click)="changeStep(3)" [ngClass]="{'active': this.step === 3}">{{'DMP-EDITOR.STEPPER.DESCRIPTION-INFO' | translate}}</li>
<li *ngFor="let dataset of datasets.controls; let i = index" #selectedItems (click)="editDataset(dataset.get('id').value)" [ngClass]="{'active-dataset': this.step === i + stepsBeforeDatasets}">
<div class="dataset-tag">{{'DMP-EDITOR.STEPPER.DATASET' | translate}}</div>
<span class="d-flex">
@ -95,7 +95,7 @@
</div>
<div *ngIf="this.step >= 3 && hasProfile() && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank">
<mat-icon>add</mat-icon>
<div>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</div>
<div>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</div>
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
<h4 mat-dialog-title>{{ 'DMP-EDITOR.DATASET-TEMPLATE-LIST.TITLE' | translate }}</h4>
<h4 mat-dialog-title>{{ 'DMP-EDITOR.DESCRIPTION-TEMPLATE-LIST.TITLE' | translate }}</h4>
<div mat-dialog-content>
<mat-selection-list #datasetsprofiles [ngModel]="selectedOptions" >
<mat-list-option *ngFor="let profile of profiles" [value]="profile" [selected]='isOptionSelected(profile)' class="mb-1">
@ -12,7 +12,7 @@
</mat-list-option>
</mat-selection-list>
<p>
{{ 'DMP-EDITOR.DATASET-TEMPLATE-LIST.TEXT' | translate }} {{datasetsprofiles.selectedOptions.selected.length}}
{{ 'DMP-EDITOR.DESCRIPTION-TEMPLATE-LIST.TEXT' | translate }} {{datasetsprofiles.selectedOptions.selected.length}}
</p>
<button mat-raised-button color="primary" (click)="addProfiles(datasetsprofiles)">{{ 'DMP-EDITOR.DATASET-TEMPLATE-LIST.OK' | translate }}</button>
<button mat-raised-button color="primary" (click)="addProfiles(datasetsprofiles)">{{ 'DMP-EDITOR.DESCRIPTION-TEMPLATE-LIST.OK' | translate }}</button>
</div>

View File

@ -6,7 +6,7 @@
<div class="col-12 card">
<div class="row">
<div class="col-12">
<div class="heading">4.1 {{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}}*</div>
<div class="heading">4.1 {{'DMP-EDITOR.STEPPER.DESCRIPTION-INFO' | translate}}*</div>
<div class="hint">
<div class="pb-1">{{'DMP-EDITOR.DATASET-INFO.HINT' | translate}}</div>
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>

View File

@ -76,8 +76,8 @@
<li (click)="changeStep(2)" [ngClass]="{'active': this.step === 2}">{{'DMP-EDITOR.STEPPER.LICENSE-INFO' | translate}}</li>
<li (click)="changeStep(3)" *ngIf="!datasetInfoValid()" [ngClass]="{'active': this.step === 3, 'text-danger':hintErrors}">{{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}} (1)</li>
<li (click)="changeStep(3)" *ngIf="datasetInfoValid()" [ngClass]="{'active': this.step === 3}">{{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}} (<mat-icon class="done-icon">done</mat-icon>)</li>
<li (click)="changeStep(3)" *ngIf="!datasetInfoValid()" [ngClass]="{'active': this.step === 3, 'text-danger':hintErrors}">{{'DMP-EDITOR.STEPPER.DESCRIPTION-INFO' | translate}} (1)</li>
<li (click)="changeStep(3)" *ngIf="datasetInfoValid()" [ngClass]="{'active': this.step === 3}">{{'DMP-EDITOR.STEPPER.DESCRIPTION-INFO' | translate}} (<mat-icon class="done-icon">done</mat-icon>)</li>
<!-- <li *ngFor="let dataset of datasets.controls; let i = index" (click)="changeStep(i + stepsBeforeDatasets, dataset)" [ngClass]="{'active-dataset': this.step === i + stepsBeforeDatasets}"> -->
<li *ngFor="let dataset of datasets.controls; let i = index" (click)="editDataset(dataset.get('id').value, false)" class="active-dataset">
@ -91,7 +91,7 @@
<ul *ngIf="hasProfile() && !isNew && !isFinalized" class="add-dataset-option">
<li>
<a class="add-dataset-action" [routerLink]="['/datasets/new/' + dmp.id]">
<mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}
<mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
</a>
</li>
</ul>
@ -108,7 +108,7 @@
<!-- <div *ngIf="this.step >= 3 && hasProfile() && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank"> -->
<button [disabled]="saving" *ngIf="this.step >= 3 && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank">
<!-- <mat-icon>add</mat-icon> -->
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}} & {{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}} & {{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
</button>
</div>
<div class="col-auto pr-0">

View File

@ -17,7 +17,7 @@
<span>.</span>
<span class="col">{{ 'DMP-LISTING.GRANT' | translate }}: {{dmp.grant}}</span>
</div>
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DATASETS' | translate}}: ({{ dmp.datasets.length }})
<div class="col-auto dmp-dataset-descriptions-title">{{'DMP-LISTING.CONTAINED-DESCRIPTIONS' | translate}}: ({{ dmp.datasets.length }})
</div>
<div *ngFor="let dataset of dmp.datasets; let i = index; let last = last" [ngClass]="{'pb-3': i === dmp.datasets.length - 1}">
<div *ngIf="i < 3">
@ -29,7 +29,7 @@
</a>
<div class="dmp-card-actions">
<a class="col-auto border-right pointer" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DMP-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(dmp)" [routerLink]="['/datasets/new/' + dmp.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftDmp(dmp)" [routerLink]="['/datasets/new/' + dmp.id]" target="_blank"><span class="material-icons icon-align">add</span>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isUserOwner(dmp)" (click)="openShareDialog(dmp.id, dmp.label)"><span class="material-icons icon-align pr-2">group_add</span>{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="cloneOrNewVersionClicked(dmp, false)"><span class="material-icons icon-align pr-2">filter_none</span>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(dmp.groupId, dmp.label, dmp)"><span class="material-icons icon-align pr-2">library_books</span>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -87,7 +87,7 @@
<div class="row" *ngIf="!dmp.description">
<span class="material-icons">horizontal_rule</span>
</div>
<div class="row header">{{'DMP-OVERVIEW.DATASETS-USED' | translate}}</div>
<div class="row header">{{'DMP-OVERVIEW.DESCRIPTIONS-USED' | translate}}</div>
<div class="d-flex flex-column">
<div *ngFor="let dataset of dmp.datasets">
<a class="row dataset" [routerLink]="isPublicView ? ['/datasets/publicOverview/' + dataset.id] : ['/datasets/overview/' + dataset.id]" target="_blank">
@ -106,7 +106,7 @@
<div class="row mt-2 add-dataset-txt" *ngIf="!lockStatus">
<a class="add-dataset-btn" *ngIf="isDraftDmp(dmp)" [routerLink]="['/datasets/new/' + dmp.id]" target="_blank">
<mat-icon>add</mat-icon>
{{'DMP-LISTING.ACTIONS.ADD-DATASET-SHORT' | translate}}
{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}
</a>
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="container-fluid">
<div *ngIf="datasets.length > 0">
<h5 mat-subheader>{{'DATASET-LISTING.SELECT-DATASETS-TO-CLONE' | translate}} {{titlePrefix}}</h5>
<h5 mat-subheader>{{'DATASET-LISTING.SELECT-DESCRIPTIONS-TO-CLONE' | translate}} {{titlePrefix}}</h5>
<mat-card class="mat-card">
<mat-selection-list #selectedItems (selectionChange)="selectionChanged($event,selectedItems)">
<mat-list-option *ngFor="let dataset of datasets;" [value]="dataset.id">
@ -10,6 +10,6 @@
</mat-card>
</div>
<div *ngIf="datasets.length == 0">
<h5 mat-subheader class="p-3">{{'DATASET-LISTING.SELECT-DATASETS-NONE' | translate}}</h5>
<h5 mat-subheader class="p-3">{{'DATASET-LISTING.SELECT-DESCRIPTIONS-NONE' | translate}}</h5>
</div>
</div>

View File

@ -31,7 +31,7 @@ export const GENERAL_ROUTES: RouteInfo[] = [
];
export const DMP_ROUTES: RouteInfo[] = [
{ path: '/plans', title: 'SIDE-BAR.MY-DMPS', icon: 'library_books' },
{ path: '/datasets', title: 'SIDE-BAR.MY-DATASETS', icon: 'dns' },
{ path: '/datasets', title: 'SIDE-BAR.MY-DESCRIPTIONS', icon: 'dns' },
// { path: '/quick-wizard', title: 'SIDE-BAR.QUICK-WIZARD', icon: 'play_circle_outline' },
// { path: '/plans/new', title: 'SIDE-BAR.ADD-EXPERT', icon: 'playlist_add' }
];
@ -51,15 +51,16 @@ export const PUBLIC_ROUTES: RouteInfo[] = [
// ];
export const ADMIN_ROUTES: RouteInfo[] = [
{ path: '/dmp-profiles', title: 'SIDE-BAR.DMP-TEMPLATES', icon: 'library_books' },
{ path: '/dataset-profiles', title: 'SIDE-BAR.DATASET-TEMPLATES', icon: 'library_books' },
{ path: '/dmp-profiles', title: 'SIDE-BAR.DMP-BLUEPRINTS', icon: 'library_books' },
{ path: '/dataset-profiles', title: 'SIDE-BAR.DESCRIPTION-TEMPLATES', icon: 'library_books' },
{ path: '/description-types', title: 'SIDE-BAR.DESCRIPTION-TEMPLATE-TYPES', icon: 'library_books' },
{ path: '/users', title: 'SIDE-BAR.USERS', icon: 'people' },
{ path: '/language-editor', title: 'SIDE-BAR.LANGUAGE-EDITOR', icon: 'language' },
{ path: '/user-guide-editor', title: 'SIDE-BAR.GUIDE-EDITOR', icon: 'import_contacts' }
];
export const DATASET_TEMPLATE_ROUTES: RouteInfo[] = [
{ path: '/dataset-profiles', title: 'SIDE-BAR.DATASET-TEMPLATES', icon: 'library_books' }
{ path: '/dataset-profiles', title: 'SIDE-BAR.DESCRIPTION-TEMPLATES', icon: 'library_books' }
];
export const INFO_ROUTES: RouteInfo[] = [

View File

@ -28,6 +28,8 @@
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login",
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Successful Delete",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This template can not deleted, because Datasets are associated with it",
"SUCCESSFUL-DESCRIPTION-TEMPLATE-TYPE-DELETE": "Successful Delete",
"UNSUCCESSFUL-DESCRIPTION-TEMPLATE-TYPE-DELETE": "This type can not deleted, because Descriptions are associated with it",
"SUCCESSFUL-DELETE": "Successful Delete",
"UNSUCCESSFUL-DELETE": "Unsuccessful Delete",
"UNSUCCESSFUL-EMAIL-SEND": "Failed sending email",
@ -133,12 +135,13 @@
"QUICK-WIZARD": "New DMP (Wizard)",
"PLANS-NEW": "New DMP (Expert)",
"DMP-NEW": "New DMP",
"DATASETS": "My Datasets",
"EXPLORE": "Published Datasets",
"DESCRIPTIONS": "My Descriptions",
"EXPLORE": "Published Descriptions",
"DATASETCREATEWIZARD": "Add Dataset (Wizard)",
"GRANTS": "My Grants",
"DMP-PROFILES": "DMP Templates",
"DMP-BLUEPRINTS": "DMP Blueprints",
"DATASET-PROFILES": "Dataset Templates",
"DESCRIPTION-TYPES": "Description Types",
"USERS": "Users",
"PROFILE": "My Profile",
"LOGIN": "Login",
@ -151,10 +154,12 @@
"DATASET-NEW": "New Dataset",
"GRANT-NEW": "New Grant",
"GRANT-EDIT": "View/Edit Grant",
"DMP-PROFILE-NEW": "New DMP Template",
"DMP-PROFILE-EDIT": "Edit DMP Template",
"DMP-BLUEPRINT-NEW": "New DMP Blueprint",
"DMP-BLUEPRINT-EDIT": "Edit DMP Blueprint",
"DATASET-PROFILES-NEW": "New Dataset Template",
"DATASET-PROFILES-EDIT": "Edit Dataset Template",
"DESCRIPTION-TYPE-NEW": "New Description Type",
"DESCRIPTION-TYPE-EDIT": "Edit Description Type",
"EXPLORE-PLANS-OVERVIEW": "Published DMP Overview",
"DATASET-PUBLIC-EDIT": "View Published Dataset",
"DMP-PUBLIC-EDIT": "View Published DMP",
@ -219,11 +224,11 @@
"DMPS": "DMPs",
"MY-DMPS": "MY DMPs",
"DATASETS": "Datasets",
"DATASET": "Dataset",
"DESCRIPTION": "Description",
"PUBLIC-DATASETS": "Explore {{ APP_NAME_CAPS }}",
"USERS": "Users",
"DATASETS-ADMIN": "Dataset Templates",
"DMP-PROFILES": "DMP Templates",
"DMP-BLUEPRINTS": "DMP Blueprints",
"ABOUT": "About",
"MY-DATASET-DESCRIPTIONS": "MY DATASETS",
"DATASET-DESCRIPTION-WIZARD": "Dataset wizard",
@ -233,7 +238,7 @@
"DMP-WIZARD": "DMP Wizard",
"DATASET-TEMPLATES": "DATASET TEMPLATES",
"TEMPLATE": "TEMPLATE",
"DMP-TEMPLATES": "DMP TEMPLATES",
"DMP-BLUEPRINTS-CAPS": "DMP BLUEPRINTS",
"USERS-BREADCRUMB": "USERS",
"START-NEW-DMP": "Start new DMP",
"START-NEW-DMP-TXT": "Start fresh or continue work in {{ APP_NAME }}! Create a new DMP or upload an existing DMP to {{ APP_NAME }}",
@ -259,18 +264,19 @@
"QUICK-WIZARD-DATASET": "Add Dataset (Wizard)",
"ADD-EXPERT": "New DMP (Expert)",
"MY-DATASET-DESC": "My Dataset Desc.",
"MY-DATASETS": "My Datasets",
"MY-DESCRIPTIONS": "My Descriptions",
"MY-GRANTS": "My Grants",
"HISTORY": "HISTORY",
"HISTORY-VISITED": "LAST VISITED",
"HISTORY-EDITED": "LAST EDITED",
"PUBLIC": "PUBLISHED",
"PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DESC": "Public Dataset Desc.",
"PUBLIC-DESC": "Public Descriptions",
"ACCOUNT": "ACCOUNT",
"ADMIN": "ADMIN",
"DATASET-TEMPLATES": "Dataset Templates",
"DMP-TEMPLATES": "DMP Templates",
"DESCRIPTION-TEMPLATES": "Description Templates",
"DESCRIPTION-TEMPLATE-TYPES": "Description Types",
"DMP-BLUEPRINTS": "DMP Blueprints",
"USERS": "Users",
"LANGUAGE-EDITOR": "Language Editor",
"GUIDE-EDITOR": "User Guide Editor",
@ -281,23 +287,25 @@
"DATASET-PROFILE-EDITOR": {
"TITLE": {
"NEW": "New API Client",
"NEW-PROFILE": "New Dataset Template",
"NEW-PROFILE": "New Description Template",
"NEW-PROFILE-VERSION": "New Version Of ",
"NEW-PROFILE-CLONE": "New Clone Of "
},
"FIELDS": {
"DATASET-TITLE": "Dataset Template Name",
"DATASET-TITLE": "Description Template Name",
"DATASET-DESCRIPTION": "Description",
"ROLES": "Roles"
},
"STEPS": {
"GENERAL-INFO": {
"TITLE": "General Info",
"DATASET-TEMPLATE-NAME": "Dataset template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Dataset template.",
"DATASET-TEMPLATE-NAME": "Description template name",
"DATASET-TEMPLATE-NAME-HINT": "A title that determines the Description template.",
"DATASET-TEMPLATE-DESCRIPTION": "Description",
"DATASET-TEMPLATE-DESCRIPTION-HINT": "A brief description of what the Dataset is about, it's scope and objectives.",
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DESCRIPTION-TEMPLATE-TYPE": "Description template type",
"DESCRIPTION-TEMPLATE-SELECT-TYPE": "Select a type",
"DATASET-TEMPLATE-LANGUAGE": "Description template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-USERS": "Editors",
"DATASET-TEMPLATE-USERS-HINT": "Add editors and save changes to notify them.",
@ -314,7 +322,7 @@
},
"PAGE-INFO": {
"PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-NAME-HINT": "Set a name for the desciption chapter.",
"PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": {
@ -615,7 +623,7 @@
"FINALIZED": "Finalized",
"PUBLISHED": "Published",
"VERSION": "Version",
"CONTAINED-DATASETS": "Contained Datasets",
"CONTAINED-DESCRIPTIONS": "Contained Descriptions",
"TEXT-INFO": "Information in a DMP show how datasets have been collected and/or generated, how they have been processed and analysed, i.e. using which tools, standards, methodologies etc, but also where and how datasets are backed up, published and preserved, including any costs associated with personnel dedicated for data curation/ stewardship activities or costs for acquiring or building data management services.",
"TEXT-INFO-QUESTION": "Not sure how a DMP looks in practice? Browse Public DMPs and",
"LINK-ZENODO": "LIBER community in Zenodo",
@ -642,8 +650,7 @@
"INVITE-AUTHORS": "Invite authors",
"INVITE-SHORT": "Invite",
"ADD-DATASET": "Add Dataset To DMP",
"ADD-DATASET-DESCRIPTION": "Add dataset",
"ADD-DATASET-SHORT": "Add Dataset",
"ADD-DESCRIPTION-SHORT": "Add Description",
"DATASETS": "List All DMP Datasets",
"NEW-VERSION": "New Version",
"START-NEW-VERSION": "Start New Version",
@ -745,7 +752,7 @@
"DOWNLOAD-PDF": "Download PDF",
"DOWNLOAD-XML": "Download XML",
"DOWNLOAD-DOCX": "Download DOCX",
"COPY-DATASET": "Copy Dataset",
"COPY-DESCRIPTION": "Copy Description",
"UPDATE-DATASET-PROFILE": "Update Template",
"VALIDATE":"Validate",
"UNDO-FINALIZATION-QUESTION" :"Undo finalization?",
@ -794,7 +801,7 @@
"GRANT": "Grant",
"DMP-AUTHORS": "DΜP Authors",
"RESEARCHERS": "Researchers",
"DATASETS-USED": "Datasets used",
"DESCRIPTIONS-USED": "Descriptions used",
"COLLABORATORS": "Collaborators",
"PUBLIC": "Public",
"PRIVATE": "Private",
@ -829,7 +836,7 @@
}
},
"DATASET-OVERVIEW": {
"DATASET-AUTHORS": "Dataset authors",
"DESCRIPTION-AUTHORS": "Description authors",
"ERROR": {
"DELETED-DATASET": "The requested dataset is deleted",
"FORBIDEN-DATASET": "You are not allowed to access this dataset"
@ -846,9 +853,9 @@
},
"DATASET-LISTING": {
"TITLE": "Datasets",
"DATASET-DESCRIPTION": "Dataset",
"SELECT-DATASETS-TO-CLONE": "Select which datasets to include in the new DMP. Selected datasets will be editable.",
"SELECT-DATASETS-NONE": "Not available Datasets for this DMP.",
"DESCRIPTION": "Description",
"SELECT-DESCRIPTIONS-TO-CLONE": "Select which descriptions to include in the new DMP. Selected descriptions will be editable.",
"SELECT-DESCRIPTIONS-NONE": "Not available Descriptions for this DMP.",
"TEXT-INFO": "Datasets are documented following pre-defined templates which set the content of dataset descriptions. In {{ APP_NAME }}, a DMP can contain as many dataset descriptions as the datasets it documents. Browse ",
"TEXT-INFO-REST": " for a look at datasets described in {{ APP_NAME }} DMPs",
"LINK-PUBLIC-DATASETS": "Public Datasets",
@ -913,7 +920,7 @@
"EMPTY-LIST": "Nothing here yet."
},
"DATASET-PROFILE-LISTING": {
"TITLE": "Dataset Templates",
"TITLE": "Description Templates",
"COLUMNS": {
"NAME": "Name",
"REFERNCE": "Reference",
@ -941,9 +948,20 @@
"CLONE": "Clone",
"NEW-VERSION": "New Version",
"NEW-VERSION-FROM-FILE": "New Version from File",
"VIEW-VERSIONS": "All Dataset Template Versions",
"VIEW-VERSIONS": "All Description Template Versions",
"DELETE": "Delete",
"CREATE-DATASET-TEMPLATE": "Create Dataset Template"
"CREATE-DESCRIPTION-TEMPLATE": "Create Description Template"
}
},
"DESCRIPTION-TYPES-LISTING": {
"TITLE": "Description Types",
"CREATE-TYPE": "Create Description Type",
"COLUMNS": {
"NAME": "Name",
"STATUS": "Status"
},
"ACTIONS": {
"DELETE": "Delete"
}
},
"DATASET-UPLOAD": {
@ -962,9 +980,19 @@
"UNSUCCESSFUL": "Something went wrong"
}
},
"DESCRIPTION-TYPE-EDITOR": {
"NEW": "New Description Type",
"FIELDS": {
"LABEL": "Name"
},
"ACTIONS": {
"SAVE": "Save",
"CANCEL": "Cancel"
}
},
"DMP-PROFILE-EDITOR": {
"TITLE": {
"NEW": "New DMP Template",
"NEW": "New DMP Blueprint",
"EDIT": "Edit"
},
"FIELDS": {
@ -1024,7 +1052,7 @@
"EDIT": "Edit",
"EDIT-DMP": "Editing DMP",
"ADD-DATASET": "Adding dataset",
"EDIT-DATASET": "Editing Dataset",
"EDIT-DESCRIPTION": "Editing Description",
"CLONE-DMP": "Clone",
"NEW-VERSION": "New Version",
"CREATE-DATASET": "Creating Dataset",
@ -1044,7 +1072,7 @@
"TEMPLATES": "Templates",
"TEMPLATE": "DMP Template",
"DATASET-TEMPLATES": "Related Dataset Templates",
"SELECT-TEMPLATE": "Select a template to describe your dataset",
"SELECT-TEMPLATE": "Select a template to describe your descriptions",
"PROFILE": "DMP Template",
"PROJECT": "Project",
"GRANT": "Grant",
@ -1065,7 +1093,7 @@
"PUBLICATION": "Publication Date",
"CONTACT": "Contact",
"COST": "Costs",
"DATASETS": "Datasets"
"DESCRIPTIONS": "Descriptions"
},
"ACTIONS": {
"GO-TO-GRANT": "Go To DMP Grant",
@ -1094,9 +1122,9 @@
"SUCCESSFUL-DOI": "Successful DOI creation",
"UNSUCCESSFUL-FINALIZE": "Unsuccessful DMP finalization"
},
"DATASET-TEMPLATE-LIST": {
"TITLE": "Available Dataset Templates",
"TEXT": "Dataset Profiles selected: ",
"DESCRIPTION-TEMPLATE-LIST": {
"TITLE": "Available Description Templates",
"TEXT": "Descriptions selected: ",
"OK": "OK"
},
"VISIBILITY": {
@ -1108,7 +1136,7 @@
"MAIN-INFO": "Main info",
"FUNDING-INFO": "Funding",
"DATASET-SELECTION": "Dataset selection",
"DATASET-INFO": "Dataset info",
"DESCRIPTION-INFO": "Description info",
"LICENSE-INFO": "License",
"DATASET": "Dataset",
"PREVIOUS": "Previous",
@ -1138,7 +1166,7 @@
"INTRO": "A DMP in {{ APP_NAME }} consists of key information about research, such as purpose, objectives and researchers involved, but also about documentation of research datasets that highlight the steps followed and the means used across data management activities.",
"SECOND-INTRO": "Datasets are documented following pre-defined templates which set the content of dataset descriptions. In {{ APP_NAME }}, a DMP can contain as many dataset descriptions as the datasets it documents.",
"FIND": "Couldn't find a suitable one?",
"HINT": "Select a template to describe your datasets. You may select more than one template."
"HINT": "Select a template to describe your descriptions. You may select more than one template."
},
"LICENSE-INFO": {
"INTRO": "Each DMP can contain specific license informatation over how much open and available it is, that way you can determine who can see your dataset and for how long that data will be private",
@ -1160,8 +1188,8 @@
}
},
"DMP-PROFILE-LISTING": {
"TITLE": "DMP Templates",
"CREATE-DMP-TEMPLATE": "Create DMP Template",
"TITLE": "DMP Blueprints",
"CREATE-DMP-BLUEPRINT": "Create DMP Blueprint",
"COLUMNS": {
"NAME": "Name",
"STATUS": "Status",
@ -1218,8 +1246,8 @@
"NONE": "-",
"TAGS": "Tags",
"SELECT-TAGS": "Select Tags",
"LIKE": "Search Datasets",
"DRAFT-LIKE": "Search Draft Datasets",
"LIKE": "Search Descriptions",
"DRAFT-LIKE": "Search Draft Descriptions",
"SELECT-GRANTS": "Select Grants",
"ROLE": "Role",
"ORGANIZATION": "Organization",
@ -1255,12 +1283,12 @@
"TITLE": {
"NEW": "New Data Management Plan",
"EDIT": "Edit",
"INTRO": "You are using the Dataset editor. Answer here questions that describe your data management activities.",
"INTRO-TIP": "Tip: Add new datasets to describe different types of data or disciplinary data to avoid mixing information."
"INTRO": "You are using the Description editor. Answer here questions that describe your data management activities.",
"INTRO-TIP": "Tip: Add new descriptions to describe different types of data or disciplinary data to avoid mixing information."
},
"FIELDS": {
"NAME": "Name of the Dataset",
"TITLE": "Title of Dataset",
"TITLE": "Title of Description",
"DESCRIPTION": "Description",
"PROFILE": "Template",
"URI": "Uri",
@ -1298,7 +1326,7 @@
"EXTERNAL-LINK": "Provide an external URL link"
},
"HINT": {
"DESCRIPTION": "Briefly describe the context and purpose of the Dataset",
"DESCRIPTION": "Briefly describe the context and purpose of the Description",
"TITLE": "A brief description of what the ",
"TITLE-REST": " is about its scope and objectives."
},
@ -1370,7 +1398,7 @@
"ADMIN": "Admin",
"USER": "User",
"MANAGER": "Manager",
"DATASET-TEMPLATE-EDITOR": "Dataset Template Editor"
"DESCRIPTION-TEMPLATE-EDITOR": "Description Template Editor"
},
"DMP-PROFILE-FIELD": {
"DATA-TYPE": {
@ -1648,7 +1676,7 @@
"DATA-MANAGEMENT-PLANS": "DATA MANAGEMENT PLANS",
"PERSONAL-USAGE": "Personal Usage",
"PUBLIC-USAGE": "Public Usage",
"DATASET-DESCRIPTIONS": "Datasets",
"DESCRIPTIONS": "Descriptions",
"DATASET-DESCRIPTIONS-DASHBOARD-TEXT": "Datasets",
"PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DATASETS": "Public Datasets",
@ -1661,8 +1689,7 @@
"DMP-ABOUT-END": ", that highlight the steps followed and the means used across data management activities.",
"SELECT-DMP": "Select a DMP for your Dataset",
"ACTIONS": {
"ADD-DATASET-DESCRIPTION": "Add Dataset",
"ADD-DATASET": "Add Dataset",
"ADD-DESCRIPTION": "Add Description",
"ADD-DMP-DESCRIPTION": "Add DMP Description"
},
"TOUR-GUIDE": {
@ -1693,7 +1720,7 @@
},
"UNLINK-ACCOUNT": {
"TITLE": "Verify account to be unlinked",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, {{accountToBeUnlinked}} will be no longer connected to your current ARGOS profile."
"MESSAGE": "An email to verify this action has been sent to your main account. Once accepted, {{accountToBeUnlinked}} will be no longer connected to your current ARGOS profile."
},
"UNLINK-ACCOUNT-DIALOG": {
"MESSAGE": "By clicking \"Confirm\", you accept the transfer of your ARGOS activity performed from this account to your main ARGOS account, which is the one that is listed first. By logging in again with the unlinked account, you will be able to start your ARGOS experience from scratch, in an empty dashboard.",