Commit d5374d41 authored by George Kalampokis's avatar George Kalampokis
Browse files

Remove even more deprecated stuff (Explore criteria and old rda Models)

parent c93f8eda
package eu.eudat.data.query.items.table.dataset;
import eu.eudat.data.dao.criteria.DatasetPublicCriteria;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.query.definition.TableQuery;
import eu.eudat.queryable.QueryableList;
import eu.eudat.queryable.types.FieldSelectionType;
import eu.eudat.queryable.types.SelectionField;
import eu.eudat.types.grant.GrantStateType;
import java.util.Arrays;
import java.util.Date;
import java.util.UUID;
/**
* Created by ikalyvas on 10/2/2018.
*/
public class DatasetPublicTableRequest extends TableQuery<DatasetPublicCriteria, Dataset, UUID> {
@Override
public QueryableList<Dataset> applyCriteria() {
QueryableList<Dataset> query = this.getQuery();
query.where((builder, root) -> builder.equal(root.get("dmp").get("isPublic"), true));
query.where((builder, root) -> builder.equal(root.get("status"), Dataset.Status.FINALISED.getValue()));
query.initSubQuery(String.class).where((builder, root) -> builder.equal(root.get("dmp").get("version"),
query.<String>subQueryMax((builder1, externalRoot, nestedRoot) -> builder1.equal(externalRoot.get("dmp").get("groupId"), nestedRoot.get("dmp").get("groupId")),
Arrays.asList(new SelectionField(FieldSelectionType.COMPOSITE_FIELD, "dmp:version")), String.class)));
if (this.getCriteria().getLike() != null && !this.getCriteria().getLike().isEmpty())
query.where((builder, root) -> builder.or(
builder.like(builder.upper(root.get("label")), "%" + this.getCriteria().getLike().toUpperCase() + "%"),
builder.like(builder.upper(root.get("description")), "%" + this.getCriteria().getLike().toUpperCase() + "%")));
if (this.getCriteria().getGrants() != null && !this.getCriteria().getGrants().isEmpty())
query.where(((builder, root) -> root.get("dmp").get("grant").get("id").in(this.getCriteria().getGrants())));
if (this.getCriteria().getGrantStatus() != null) {
if (this.getCriteria().getGrantStatus().getValue().equals(GrantStateType.FINISHED.getValue()))
query.where((builder, root) -> builder.lessThan(root.get("dmp").get("grant").get("enddate"), new Date()));
if (this.getCriteria().getGrantStatus().getValue().equals(GrantStateType.ONGOING.getValue()))
query.where((builder, root) ->
builder.or(builder.greaterThan(root.get("dmp").get("grant").get("enddate"), new Date())
, builder.isNull(root.get("dmp").get("grant").get("enddate"))));
}
if (this.getCriteria().getDmpIds() != null && !this.getCriteria().getDmpIds().isEmpty()) {
query.where(((builder, root) -> root.get("dmp").get("id").in(this.getCriteria().getDmpIds())));
}
if (this.getCriteria().getDatasetProfile() != null && !this.getCriteria().getDatasetProfile().isEmpty()) query
.where(((builder, root) -> root.get("profile").get("id").in(this.getCriteria().getDatasetProfile())));
if (this.getCriteria().getDmpOrganisations() != null && !this.getCriteria().getDmpOrganisations().isEmpty()) query
.where(((builder, root) -> root.join("dmp").join("organisations").get("reference").in(this.getCriteria().getDmpOrganisations())));
query.where((builder, root) -> builder.notEqual(root.get("status"), Dataset.Status.DELETED.getValue()));
return query;
}
@Override
public QueryableList<Dataset> applyPaging(QueryableList<Dataset> items) {
return null;
}
}
package eu.eudat.data.query.items.table.dmp;
import eu.eudat.data.dao.criteria.DataManagementPlanPublicCriteria;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.query.PaginationService;
import eu.eudat.data.query.definition.TableQuery;
import eu.eudat.queryable.QueryableList;
import eu.eudat.queryable.types.FieldSelectionType;
import eu.eudat.queryable.types.SelectionField;
import eu.eudat.types.grant.GrantStateType;
import java.util.Arrays;
import java.util.Date;
import java.util.UUID;
public class DataManagmentPlanPublicTableRequest extends TableQuery<DataManagementPlanPublicCriteria, DMP, UUID> {
public QueryableList<DMP> applyCriteria() {
QueryableList<DMP> query = this.getQuery();
query.where((builder, root) -> builder.equal(root.get("isPublic"), true));
if (this.getCriteria().getLike() != null && !this.getCriteria().getLike().isEmpty())
query.where((builder, root) -> builder.or(
builder.like(builder.upper(root.get("label")), "%" + this.getCriteria().getLike().toUpperCase() + "%"),
builder.like(builder.upper(root.get("description")), "%" + this.getCriteria().getLike().toUpperCase() + "%")));
if (this.getCriteria().getGrants() != null && !this.getCriteria().getGrants().isEmpty())
query.where(((builder, root) -> root.get("grant").get("id").in(this.getCriteria().getGrants())));
if (this.getCriteria().getGrantStatus() != null) {
if (this.getCriteria().getGrantStatus().getValue().equals(GrantStateType.FINISHED.getValue()))
query.where((builder, root) -> builder.lessThan(root.get("grant").get("enddate"), new Date()));
if (this.getCriteria().getGrantStatus().getValue().equals(GrantStateType.ONGOING.getValue()))
query.where((builder, root) ->
builder.or(builder.greaterThan(root.get("grant").get("enddate"), new Date())
, builder.isNull(root.get("grant").get("enddate"))));
}
if (this.getCriteria().datasetProfile != null && !this.getCriteria().datasetProfile.isEmpty())
query.where((builder, root) -> root.join("associatedDmps").get("id").in(this.getCriteria().datasetProfile));
if (this.getCriteria().getDmpOrganisations() != null && !this.getCriteria().getDmpOrganisations().isEmpty())
query.where(((builder, root) -> root.join("organisations").get("reference").in(this.getCriteria().getDmpOrganisations())));
if (!this.getCriteria().getAllVersions()) {
query.initSubQuery(String.class).where((builder, root) -> builder.equal(root.get("version"),
query.<String>subQueryMax((builder1, externalRoot, nestedRoot) -> builder1.and(builder1.equal(externalRoot.get("groupId"),
nestedRoot.get("groupId")), builder1.equal(nestedRoot.get("isPublic"), true)), Arrays.asList(new SelectionField(FieldSelectionType.FIELD, "version")), String.class)));
}
if (this.getCriteria().getGroupIds() != null && !this.getCriteria().getGroupIds().isEmpty()) {
query.where((builder, root) -> root.get("groupId").in(this.getCriteria().getGroupIds()));
}
return query;
}
@Override
public QueryableList<DMP> applyPaging(QueryableList<DMP> items) {
return PaginationService.applyPaging(items, this);
}
}
......@@ -9,7 +9,6 @@ import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem;
import eu.eudat.data.query.items.table.dmp.DataManagementPlanTableRequest;
import eu.eudat.data.query.items.table.dmp.DataManagmentPlanPublicTableRequest;
import eu.eudat.exceptions.datamanagementplan.DMPNewVersionException;
import eu.eudat.exceptions.datamanagementplan.DMPWithDatasetsDeleteException;
import eu.eudat.exceptions.security.UnauthorisedException;
......
......@@ -31,7 +31,7 @@ public class DashBoardController extends BaseController {
}
@RequestMapping(method = RequestMethod.GET, value = {"/dashboard/getStatistics"}, produces = "application/json")
public ResponseEntity<ResponseItem<DashBoardStatistics>> getStatistics() {
public ResponseEntity<ResponseItem<DashBoardStatistics>> getStatistics() throws Exception {
DashBoardStatistics statistics = dashBoardManager.getStatistics();
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DashBoardStatistics>().status(ApiMessageCode.NO_MESSAGE).payload(statistics));
}
......
package eu.eudat.controllers;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.query.items.table.dataset.DatasetPublicTableRequest;
import eu.eudat.data.query.items.table.dataset.DatasetTableRequest;
import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem;
import eu.eudat.logic.managers.DatasetManager;
......@@ -44,14 +43,6 @@ public class Datasets extends BaseController {
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<DatasetListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable));
}
/*@RequestMapping(method = RequestMethod.POST, value = {"/public/paged"}, consumes = "application/json", produces = "application/json")
public @ResponseBody
ResponseEntity<ResponseItem<DataTableData<DatasetListingModel>>> getPublicPaged(@RequestBody DatasetPublicTableRequest datasetTableRequest,
@ClaimedAuthorities(claims = {Authorities.ADMIN, Authorities.MANAGER, Authorities.USER, Authorities.ANONYMOUS}) Principal principal) throws Exception {
DataTableData<DatasetListingModel> dataTable = this.datasetManager.getPaged(datasetTableRequest, principal);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<DataTableData<DatasetListingModel>>().status(ApiMessageCode.NO_MESSAGE).payload(dataTable));
}*/
@Transactional
@RequestMapping(method = RequestMethod.GET, value = {"/makepublic/{id}"}, produces = "application/json")
public @ResponseBody
......
......@@ -6,15 +6,21 @@ import eu.eudat.data.dao.entities.DatasetDao;
import eu.eudat.data.dao.entities.OrganisationDao;
import eu.eudat.data.dao.entities.GrantDao;
import eu.eudat.data.entities.*;
import eu.eudat.data.query.items.table.dmp.DataManagmentPlanPublicTableRequest;
import eu.eudat.data.query.definition.helpers.ColumnOrderings;
import eu.eudat.data.query.items.table.dataset.DatasetTableRequest;
import eu.eudat.data.query.items.table.dmp.DataManagementPlanTableRequest;
import eu.eudat.elastic.entities.Dmp;
import eu.eudat.logic.builders.model.models.RecentActivityDataBuilder;
import eu.eudat.logic.services.ApiContext;
import eu.eudat.logic.services.operations.DatabaseRepository;
import eu.eudat.logic.utilities.helpers.StreamDistinctBy;
import eu.eudat.models.data.dashboard.recent.RecentActivity;
import eu.eudat.models.data.dashboard.recent.RecentActivityData;
import eu.eudat.models.data.dashboard.searchbar.SearchBarItem;
import eu.eudat.models.data.dashboard.statistics.DashBoardStatistics;
import eu.eudat.models.data.helpers.common.DataTableData;
import eu.eudat.models.data.listingmodels.DataManagementPlanListingModel;
import eu.eudat.models.data.listingmodels.DatasetListingModel;
import eu.eudat.models.data.security.Principal;
import eu.eudat.types.searchbar.SearchBarItemType;
import org.slf4j.Logger;
......@@ -27,6 +33,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Component
......@@ -35,46 +42,62 @@ public class DashBoardManager {
private ApiContext apiContext;
private DatabaseRepository databaseRepository;
private DataManagementPlanManager dmpManager;
private DatasetManager datasetManager;
@Autowired
public DashBoardManager(ApiContext apiContext) {
public DashBoardManager(ApiContext apiContext, DataManagementPlanManager dmpManager, DatasetManager datasetManager) {
this.apiContext = apiContext;
this.databaseRepository = apiContext.getOperationsContext().getDatabaseRepository();
this.dmpManager = dmpManager;
this.datasetManager = datasetManager;
}
public DashBoardStatistics getStatistics() {
public DashBoardStatistics getStatistics() throws Exception {
DashBoardStatistics statistics = new DashBoardStatistics();
AtomicReference<DataTableData<DataManagementPlanListingModel>> dmpData = new AtomicReference<>(new DataTableData<>());
AtomicReference<DataTableData<DatasetListingModel>> datasetData = new AtomicReference<>(new DataTableData<>());
LinkedList<Grant> grants = new LinkedList<>();
DataManagmentPlanPublicTableRequest publicTableRequest = new DataManagmentPlanPublicTableRequest();
DataManagementPlanPublicCriteria publicCriteria = new DataManagementPlanPublicCriteria();
publicCriteria.setAllVersions(false);
publicTableRequest.setCriteria(publicCriteria);
publicTableRequest.setQuery(databaseRepository.getDmpDao().asQueryable());
DataManagementPlanTableRequest tableRequest = new DataManagementPlanTableRequest();
tableRequest.setCriteria(new DataManagementPlanCriteria());
tableRequest.getCriteria().setAllVersions(false);
tableRequest.getCriteria().setOnlyPublic(true);
tableRequest.getCriteria().setIsPublic(true);
CompletableFuture dmpTask = CompletableFuture.runAsync(() -> {
try {
dmpData.set(dmpManager.getPaged(tableRequest, new Principal(), "listing"));
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
});
DatasetTableRequest datasetRequest = new DatasetTableRequest();
datasetRequest.setCriteria(new DatasetCriteria());
datasetRequest.getCriteria().setAllVersions(false);
datasetRequest.getCriteria().setIsPublic(true);
datasetRequest.setOrderings(new ColumnOrderings());
CompletableFuture datasetTask = CompletableFuture.runAsync(() -> {
try {
datasetData.set(datasetManager.getPaged(datasetRequest, new Principal()));
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
List<DMP> dmps = publicTableRequest.applyCriteria().toList();
});
// DataManagementPlanCriteria dataManagementPlanCriteria = new DataManagementPlanCriteria();
OrganisationCriteria organisationCriteria = new OrganisationCriteria();
/*dataManagementPlanCriteria.setAllVersions(false);
dataManagementPlanCriteria.setIsPublic(true);*/
organisationCriteria.setPublic(true);
// List<DMP> dmps = databaseRepository.getDmpDao().getWithCriteria(dataManagementPlanCriteria).toList();
long numberOfDatasets = 0;
LinkedList<Grant> grants = new LinkedList<>();
for (DMP dmp : dmps) {
numberOfDatasets = numberOfDatasets + dmp.getDataset().stream()
.filter(item -> item.getStatus() == Dataset.Status.FINALISED.getValue()).count();
grants.add(dmp.getGrant());
}
CompletableFuture.allOf(dmpTask, datasetTask).join();
List<DMP> dmps = dmpData.get().getData().stream().map(DataManagementPlanListingModel::toDataModel).collect(Collectors.toList());
long numberOfDatasets = datasetData.get().getTotalCount();
grants.addAll(dmps.stream().map(DMP::getGrant).collect(Collectors.toList()));
statistics.setTotalDataManagementPlanCount((long) dmps.size());
statistics.setTotalDataManagementPlanCount(dmpData.get().getTotalCount());
statistics.setTotalDataSetCount(numberOfDatasets);
statistics.setTotalGrantCount(grants.stream().distinct().count());
statistics.setTotalGrantCount(grants.stream().filter(StreamDistinctBy.distinctByKey(Grant::getId)).count());
statistics.setTotalOrganisationCount(databaseRepository.getOrganisationDao().getWithCriteria(organisationCriteria).count());
return statistics;
......
package eu.eudat.logic.managers;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.configurations.dynamicgrant.DynamicGrantConfiguration;
......@@ -14,10 +13,8 @@ import eu.eudat.data.enumeration.notification.ActiveStatus;
import eu.eudat.data.enumeration.notification.ContactType;
import eu.eudat.data.enumeration.notification.NotificationType;
import eu.eudat.data.enumeration.notification.NotifyState;
import eu.eudat.data.query.items.item.dmp.DataManagementPlanCriteriaRequest;
import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem;
import eu.eudat.data.query.items.table.dmp.DataManagementPlanTableRequest;
import eu.eudat.data.query.items.table.dmp.DataManagmentPlanPublicTableRequest;
import eu.eudat.elastic.criteria.DmpCriteria;
import eu.eudat.elastic.entities.Collaborator;
import eu.eudat.elastic.entities.Dmp;
......@@ -83,8 +80,6 @@ import org.springframework.web.multipart.MultipartFile;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.JoinType;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
......
......@@ -11,7 +11,6 @@ import eu.eudat.data.enumeration.notification.ActiveStatus;
import eu.eudat.data.enumeration.notification.ContactType;
import eu.eudat.data.enumeration.notification.NotificationType;
import eu.eudat.data.enumeration.notification.NotifyState;
import eu.eudat.data.query.items.table.dataset.DatasetPublicTableRequest;
import eu.eudat.data.query.items.table.dataset.DatasetTableRequest;
import eu.eudat.data.query.items.table.datasetprofile.DatasetProfileTableRequestItem;
import eu.eudat.elastic.criteria.DatasetCriteria;
......@@ -198,7 +197,7 @@ public class DatasetManager {
return dataTable;
}
public DataTableData<DatasetListingModel> getPaged(DatasetPublicTableRequest datasetTableRequest, Principal principal) throws Exception {
/*public DataTableData<DatasetListingModel> getPaged(DatasetPublicTableRequest datasetTableRequest, Principal principal) throws Exception {
DatasetCriteria datasetCriteria = new DatasetCriteria();
datasetCriteria.setLike(datasetTableRequest.getCriteria().getLike());
datasetCriteria.setDatasetTemplates(datasetTableRequest.getCriteria().getDatasetProfile());
......@@ -214,7 +213,7 @@ public class DatasetManager {
}
datasetTableRequest.setQuery(databaseRepository.getDatasetDao().asQueryable().withHint(HintedModelFactory.getHint(DatasetListingModel.class)));
QueryableList<Dataset> items = datasetTableRequest.applyCriteria();
/*QueryableList<Dataset> items;
*//*QueryableList<Dataset> items;
if (datasets != null) {
if (!datasets.isEmpty()) {
items = databaseRepository.getDatasetDao().asQueryable().withHint(HintedModelFactory.getHint(DatasetListingModel.class));
......@@ -225,7 +224,7 @@ public class DatasetManager {
items.where((builder, root) -> root.get("id").in(new UUID[]{UUID.randomUUID()}));
} else {
items = datasetTableRequest.applyCriteria();
}*/
}*//*
if (principal.getId() != null && datasetTableRequest.getCriteria().getRole() != null) {
items.where((builder, root) -> {
......@@ -250,7 +249,7 @@ public class DatasetManager {
CompletableFuture.allOf(itemsFuture, countFuture).join();
return dataTable;
}
}*/
public DatasetWizardModel getSingle(String id, Principal principal) {
DatasetWizardModel dataset = new DatasetWizardModel();
......
package eu.eudat.models.data.listingmodels;
import eu.eudat.data.entities.DMP;
import eu.eudat.data.entities.DMPProfile;
import eu.eudat.data.entities.DatasetProfile;
import eu.eudat.logic.utilities.builders.XmlBuilder;
import eu.eudat.data.entities.Grant;
import eu.eudat.models.DataModel;
import eu.eudat.models.data.dmp.AssociatedProfile;
import eu.eudat.models.data.dmp.Organisation;
import eu.eudat.logic.utilities.helpers.LabelBuilder;
import eu.eudat.models.data.urls.DatasetUrlListing;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import java.util.Date;
import java.util.LinkedList;
......@@ -231,7 +228,38 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
@Override
public DMP toDataModel() {
return null;
DMP entity = new DMP();
entity.setStatus(Integer.valueOf(this.status).shortValue());
entity.setVersion(this.version);
entity.setGrant(new Grant());
entity.getGrant().setId(UUID.fromString(this.grantId));
entity.getGrant().setAbbreviation(this.grantAbbreviation);
entity.getGrant().setLabel(this.grant);
if (this.profile != null) {
entity.setProfile(new DMPProfile());
entity.getProfile().setLabel(this.profile);
}
entity.setCreated(this.creationTime);
entity.setModified(this.modifiedTime);
/*entity.setOrganisations();
this.organisations = LabelBuilder.getLabel(entity.getOrganisations().stream().map(item -> new Organisation().fromDataModel(item)).collect(Collectors.toList()));*/
/* entity.setDataset(this.datasets.stream().map((Function<DatasetUrlListing, Object>) DatasetUrlListing::toDataModel).co);
this.datasets = entity.getDataset().stream().map(x-> new DatasetUrlListing().fromDataModel(x)).collect(Collectors.toList());
this.users = entity.getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList());*/
entity.setDescription(this.description);
entity.setFinalizedAt(this.finalizedAt);
entity.setPublic(this.isPublic);
entity.setPublishedAt(this.publishedAt);
/*if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
this.associatedProfiles = new LinkedList<>();
for (DatasetProfile datasetProfile: entity.getAssociatedDmps()) {
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
this.associatedProfiles.add(associatedProfile);
}
}*/
return entity;
}
@Override
......
package eu.eudat.models.data.rda;
import eu.eudat.data.entities.UserInfo;
public class ContactRDAExportModel {
private String mbox;
private String name;
private IdRDAExportModel contact_id;
public String getMbox() {
return mbox;
}
public void setMbox(String mbox) {
this.mbox = mbox;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public IdRDAExportModel getContact_id() {
return contact_id;
}
public void setContact_id(IdRDAExportModel contact_id) {
this.contact_id = contact_id;
}
public ContactRDAExportModel fromDataModel(UserInfo entity) {
ContactRDAExportModel contact = new ContactRDAExportModel();
contact.mbox = entity.getEmail();
contact.name = entity.getName();
// TODO: we should use a contact_id and not our UUID.
if (!entity.getId().toString().isEmpty()) {
contact.contact_id = new IdRDAExportModel(entity.getId().toString(), "other");
}
else {
contact.contact_id = null;
}
return contact;
}
}
package eu.eudat.models.data.rda;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.List;
public class DatasetDistributionRDAExportModel {
private String access_url;
private String available_till;
private String byte_size;
private String data_access; // Allowed values: open / shared / closed
private String description;
private String download_url;
private List<String> format; // Format according to: https://www.iana.org/assignments/media-types/media-types.xhtml if appropriate, otherwise use the common name for this format
private HostRDAExportModel host;
private List<LicenseRDAExportModel> license;
private String title;
public String getAccess_url() {
return access_url;
}
public void setAccess_url(String access_url) {
this.access_url = access_url;
}
public String getAvailable_till() {
return available_till;
}
public void setAvailable_till(String available_till) {
this.available_till = available_till;
}
public String getByte_size() {
return byte_size;
}
public void setByte_size(String byte_size) {
this.byte_size = byte_size;
}
public String getData_access() {
return data_access;
}
public void setData_access(String data_access) {
this.data_access = data_access;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDownload_url() {
return download_url;
}
public void setDownload_url(String download_url) {
this.download_url = download_url;
}
public List<String> getFormat() {
return format;
}
public void setFormat(List<String> format) {
this.format = format;
}
public HostRDAExportModel getHost() {
return host;
}
public void setHost(HostRDAExportModel host) {
this.host = host;
}
public List<LicenseRDAExportModel> getLicense() {
return license;
}
public void setLicense(List<LicenseRDAExportModel> license) {
this.license = license;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@JsonIgnore
public boolean isValid() {
return title != null || data_access != null;
}
}
package eu.eudat.models.data.rda;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class DatasetMetadataRDAExportModel {
private String description; // Not mandatory.