From 84fd2a57046d6f717626197372a5de0676360384 Mon Sep 17 00:00:00 2001 From: annabakouli Date: Fri, 8 Dec 2017 16:52:12 +0200 Subject: [PATCH] persist referential integrity --- .../java/dao/entities/DataRepositoryDao.java | 3 + .../dao/entities/DataRepositoryDaoImpl.java | 16 + .../main/java/dao/entities/RegistryDao.java | 3 + .../java/dao/entities/RegistryDaoImpl.java | 16 + .../main/java/dao/entities/ServiceDao.java | 4 + .../java/dao/entities/ServiceDaoImpl.java | 16 + .../main/java/entities/DataRepository.java | 3 +- .../src/main/java/entities/Registry.java | 3 +- .../src/main/java/entities/Service.java | 5 +- .../java/models/dataset/DataRepository.java | 50 + .../src/main/java/models/dataset/Dataset.java | 113 ++ .../main/java/models/dataset/Registry.java | 13 + .../src/main/java/models/dataset/Service.java | 12 + .../models/dataset/criteria/Criteria.java | 15 + .../criteria/DataRepositoryCriteria.java | 7 + .../dataset/criteria/RegistryCriteria.java | 7 + .../dataset/criteria/ServiceCriteria.java | 7 + .../src/main/java/rest/entities/Datasets.java | 39 +- dmp-frontend/databaseviewstyle.xml | 1165 +++++++++++++++++ .../src/app/datasets/dataset.component.ts | 2 +- dmp-frontend/src/app/datasets/dataset.html | 2 +- 21 files changed, 1488 insertions(+), 13 deletions(-) create mode 100644 dmp-backend/src/main/java/models/dataset/DataRepository.java create mode 100644 dmp-backend/src/main/java/models/dataset/Dataset.java create mode 100644 dmp-backend/src/main/java/models/dataset/Registry.java create mode 100644 dmp-backend/src/main/java/models/dataset/Service.java create mode 100644 dmp-backend/src/main/java/models/dataset/criteria/Criteria.java create mode 100644 dmp-backend/src/main/java/models/dataset/criteria/DataRepositoryCriteria.java create mode 100644 dmp-backend/src/main/java/models/dataset/criteria/RegistryCriteria.java create mode 100644 dmp-backend/src/main/java/models/dataset/criteria/ServiceCriteria.java create mode 100644 dmp-frontend/databaseviewstyle.xml diff --git a/dmp-backend/src/main/java/dao/entities/DataRepositoryDao.java b/dmp-backend/src/main/java/dao/entities/DataRepositoryDao.java index 7ca2c4038..239178068 100644 --- a/dmp-backend/src/main/java/dao/entities/DataRepositoryDao.java +++ b/dmp-backend/src/main/java/dao/entities/DataRepositoryDao.java @@ -6,11 +6,14 @@ import java.util.UUID; import dao.Dao; import entities.DataRepository; import entities.responses.IDLabelPair; +import models.dataset.criteria.Criteria; public interface DataRepositoryDao extends Dao { List listAllIDs(); List listAllIDsLabels(); + + List listBy(Criteria criteria); } \ No newline at end of file diff --git a/dmp-backend/src/main/java/dao/entities/DataRepositoryDaoImpl.java b/dmp-backend/src/main/java/dao/entities/DataRepositoryDaoImpl.java index c5e902916..bc3fc176a 100644 --- a/dmp-backend/src/main/java/dao/entities/DataRepositoryDaoImpl.java +++ b/dmp-backend/src/main/java/dao/entities/DataRepositoryDaoImpl.java @@ -5,12 +5,17 @@ import java.util.UUID; import java.util.stream.Collectors; import javax.persistence.TypedQuery; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Root; import org.hibernate.query.Query; import dao.JpaDao; import entities.DataRepository; +import entities.Registry; import entities.responses.IDLabelPair; +import models.dataset.criteria.Criteria; public class DataRepositoryDaoImpl extends JpaDao implements DataRepositoryDao { @@ -37,6 +42,17 @@ public class DataRepositoryDaoImpl extends JpaDao implemen }) .collect(Collectors.toList()); } + + + @Override + public List listBy(Criteria criteria) { + CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); + CriteriaQuery criteriaQuery = criteriaBuilder .createQuery(DataRepository.class); + Root root = criteriaQuery.from(DataRepository.class); + criteriaQuery.where(criteriaBuilder.equal(root.get("reference"), criteria.getLike())); + TypedQuery typedQuery = entityManager.createQuery(criteriaQuery); + return typedQuery.getResultList(); + } } diff --git a/dmp-backend/src/main/java/dao/entities/RegistryDao.java b/dmp-backend/src/main/java/dao/entities/RegistryDao.java index eebeed1fe..08291fae4 100644 --- a/dmp-backend/src/main/java/dao/entities/RegistryDao.java +++ b/dmp-backend/src/main/java/dao/entities/RegistryDao.java @@ -4,9 +4,11 @@ import java.util.List; import java.util.UUID; import dao.Dao; +import entities.DataRepository; import entities.Registry; import entities.Researcher; import entities.responses.IDLabelPair; +import models.dataset.criteria.Criteria; public interface RegistryDao extends Dao { @@ -14,5 +16,6 @@ public interface RegistryDao extends Dao { List listAllIDsLabels(); + List listBy(Criteria criteria); } \ No newline at end of file diff --git a/dmp-backend/src/main/java/dao/entities/RegistryDaoImpl.java b/dmp-backend/src/main/java/dao/entities/RegistryDaoImpl.java index 1c8bb1a17..5a52b8e95 100644 --- a/dmp-backend/src/main/java/dao/entities/RegistryDaoImpl.java +++ b/dmp-backend/src/main/java/dao/entities/RegistryDaoImpl.java @@ -5,13 +5,18 @@ import java.util.UUID; import java.util.stream.Collectors; import javax.persistence.TypedQuery; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Root; import org.hibernate.query.Query; import dao.JpaDao; +import entities.DataRepository; import entities.Registry; import entities.Researcher; import entities.responses.IDLabelPair; +import models.dataset.criteria.Criteria; public class RegistryDaoImpl extends JpaDao implements RegistryDao { @@ -39,5 +44,16 @@ public class RegistryDaoImpl extends JpaDao implements RegistryD .collect(Collectors.toList()); } + @Override + public List listBy(Criteria criteria) { + CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); + CriteriaQuery criteriaQuery = criteriaBuilder .createQuery(Registry.class); + Root root = criteriaQuery.from(Registry.class); + criteriaQuery.where(criteriaBuilder.equal(root.get("reference"), criteria.getLike())); + TypedQuery typedQuery = entityManager.createQuery(criteriaQuery); + return typedQuery.getResultList(); + } + + } diff --git a/dmp-backend/src/main/java/dao/entities/ServiceDao.java b/dmp-backend/src/main/java/dao/entities/ServiceDao.java index fd69e8341..de0fcfaf5 100644 --- a/dmp-backend/src/main/java/dao/entities/ServiceDao.java +++ b/dmp-backend/src/main/java/dao/entities/ServiceDao.java @@ -4,8 +4,10 @@ import java.util.List; import java.util.UUID; import dao.Dao; +import entities.DataRepository; import entities.Service; import entities.responses.IDLabelPair; +import models.dataset.criteria.Criteria; public interface ServiceDao extends Dao { @@ -13,4 +15,6 @@ public interface ServiceDao extends Dao { List listAllIDsLabels(); + List listBy(Criteria criteria); + } \ No newline at end of file diff --git a/dmp-backend/src/main/java/dao/entities/ServiceDaoImpl.java b/dmp-backend/src/main/java/dao/entities/ServiceDaoImpl.java index 2f6ed120f..4dd8aac96 100644 --- a/dmp-backend/src/main/java/dao/entities/ServiceDaoImpl.java +++ b/dmp-backend/src/main/java/dao/entities/ServiceDaoImpl.java @@ -5,12 +5,18 @@ import java.util.UUID; import java.util.stream.Collectors; import javax.persistence.TypedQuery; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Root; import org.hibernate.query.Query; import dao.JpaDao; +import entities.DataRepository; +import entities.Registry; import entities.Service; import entities.responses.IDLabelPair; +import models.dataset.criteria.Criteria; public class ServiceDaoImpl extends JpaDao implements ServiceDao { @@ -37,6 +43,16 @@ public class ServiceDaoImpl extends JpaDao implements ServiceDao }) .collect(Collectors.toList()); } + + @Override + public List listBy(Criteria criteria) { + CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); + CriteriaQuery criteriaQuery = criteriaBuilder .createQuery(Service.class); + Root root = criteriaQuery.from(Service.class); + criteriaQuery.where(criteriaBuilder.equal(root.get("reference"), criteria.getLike())); + TypedQuery typedQuery = entityManager.createQuery(criteriaQuery); + return typedQuery.getResultList(); + } } diff --git a/dmp-backend/src/main/java/entities/DataRepository.java b/dmp-backend/src/main/java/entities/DataRepository.java index 8d4962139..6ae5b9224 100644 --- a/dmp-backend/src/main/java/entities/DataRepository.java +++ b/dmp-backend/src/main/java/entities/DataRepository.java @@ -48,8 +48,7 @@ public class DataRepository implements Serializable { @Column(name = "\"Abbreviation\"") private String abbreviation; - @Type(type="typedefinition.XMLType") - @Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true) + @Column(name = "\"Reference\"", nullable = false) private String reference; @Column(name = "\"Uri\"") diff --git a/dmp-backend/src/main/java/entities/Registry.java b/dmp-backend/src/main/java/entities/Registry.java index 82da1e84f..e1d59a955 100644 --- a/dmp-backend/src/main/java/entities/Registry.java +++ b/dmp-backend/src/main/java/entities/Registry.java @@ -49,8 +49,7 @@ public class Registry implements Serializable { @Column(name = "\"Abbreviation\"") private String abbreviation; - @Type(type="typedefinition.XMLType") - @Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true) + @Column(name = "\"Reference\"", nullable = true) private String reference; @Column(name = "\"Uri\"") diff --git a/dmp-backend/src/main/java/entities/Service.java b/dmp-backend/src/main/java/entities/Service.java index 51d3b2ed9..4f79e7035 100644 --- a/dmp-backend/src/main/java/entities/Service.java +++ b/dmp-backend/src/main/java/entities/Service.java @@ -50,15 +50,14 @@ public class Service implements Serializable { @Column(name = "\"Abbreviation\"") private String abbreviation; - @Type(type="typedefinition.XMLType") - @Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true) + @Column(name = "\"Reference\"", nullable = true) private String reference; @Column(name = "\"Uri\"") private String uri; @Type(type="typedefinition.XMLType") - @Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true) + @Column(name = "\"Definition\"", columnDefinition = "xml", nullable = false) private String definition; diff --git a/dmp-backend/src/main/java/models/dataset/DataRepository.java b/dmp-backend/src/main/java/models/dataset/DataRepository.java new file mode 100644 index 000000000..c99c8104c --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/DataRepository.java @@ -0,0 +1,50 @@ +package models.dataset; + +import java.util.Date; + +public class DataRepository { + private String pid; + private String name; + private String uri; + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUri() { + return uri; + } + + public void setUri(String uri) { + this.uri = uri; + } + + public void fromDataModel(entities.DataRepository entity){ + this.pid = entity.getReference(); + this.name = entity.getLabel(); + this.uri = entity.getUri(); + } + + public entities.DataRepository toDataModel(){ + entities.DataRepository entity = new entities.DataRepository(); + entity.setReference(this.pid); + entity.setLabel(this.name); + entity.setUri(this.uri); + entity.setCreated(new Date()); + entity.setModified(new Date()); + entity.setStatus((short)0); + return entity; + } +} diff --git a/dmp-backend/src/main/java/models/dataset/Dataset.java b/dmp-backend/src/main/java/models/dataset/Dataset.java new file mode 100644 index 000000000..8d0a7da99 --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/Dataset.java @@ -0,0 +1,113 @@ +package models.dataset; + +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.UUID; + +public class Dataset { + private UUID id; + private String label; + private String reference; + private String uri; + private short status; + private String properties; + private List registries; + private List services; + private List dataRepositories; + + public UUID getId() { + return id; + } + public void setId(UUID id) { + this.id = id; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public String getReference() { + return reference; + } + + public void setReference(String reference) { + this.reference = reference; + } + public String getUri() { + return uri; + } + public void setUri(String uri) { + this.uri = uri; + } + public short getStatus() { + return status; + } + public void setStatus(short status) { + this.status = status; + } + public String getProperties() { + return properties; + } + public void setProperties(String properties) { + this.properties = properties; + } + public List getRegistries() { + return registries; + } + public void setRegistries(List registries) { + this.registries = registries; + } + public List getServices() { + return services; + } + public void setServices(List services) { + this.services = services; + } + public List getDataRepositories() { + return dataRepositories; + } + public void setDataRepositories(List dataRepositories) { + this.dataRepositories = dataRepositories; + } + + public void fromDataModel(entities.DataRepository entity){ + + } + + public entities.Dataset toDataModel(){ + entities.Dataset entity = new entities.Dataset(); + entity.setId(this.id); + entity.setLabel(this.label); + entity.setReference(this.reference); + entity.setUri(this.uri); + entity.setProperties(this.properties); + entity.setStatus(this.status); + + if(!this.registries.isEmpty()){ + entity.setRegistries(new HashSet()); + for(Registry registry:this.registries){ + entity.getRegistries().add(registry.toDataModel()); + } + } + + if(!this.dataRepositories.isEmpty()){ + entity.setDataRepositories(new HashSet()); + for(DataRepository dataRepository:this.dataRepositories){ + entity.getDataRepositories().add(dataRepository.toDataModel()); + } + } + + if(!this.services.isEmpty()){ + entity.setServices(new HashSet()); + for(Service service:this.services){ + entity.getServices().add(service.toDataModel()); + } + } + + + return entity; + } + +} diff --git a/dmp-backend/src/main/java/models/dataset/Registry.java b/dmp-backend/src/main/java/models/dataset/Registry.java new file mode 100644 index 000000000..e1c99dbea --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/Registry.java @@ -0,0 +1,13 @@ +package models.dataset; + +public class Registry { + + public void fromDataModel(entities.Registry entity){ + + } + + public entities.Registry toDataModel(){ + entities.Registry entity = new entities.Registry(); + return entity; + } +} diff --git a/dmp-backend/src/main/java/models/dataset/Service.java b/dmp-backend/src/main/java/models/dataset/Service.java new file mode 100644 index 000000000..972f666da --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/Service.java @@ -0,0 +1,12 @@ +package models.dataset; + +public class Service { + public void fromDataModel(entities.Service entity){ + + } + + public entities.Service toDataModel(){ + entities.Service entity = new entities.Service(); + return entity; + } +} diff --git a/dmp-backend/src/main/java/models/dataset/criteria/Criteria.java b/dmp-backend/src/main/java/models/dataset/criteria/Criteria.java new file mode 100644 index 000000000..9f1387045 --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/criteria/Criteria.java @@ -0,0 +1,15 @@ +package models.dataset.criteria; + +public abstract class Criteria { + private String like; + + public String getLike() { + return like; + } + + public void setLike(String like) { + this.like = like; + } + + +} diff --git a/dmp-backend/src/main/java/models/dataset/criteria/DataRepositoryCriteria.java b/dmp-backend/src/main/java/models/dataset/criteria/DataRepositoryCriteria.java new file mode 100644 index 000000000..0b5c0f0a5 --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/criteria/DataRepositoryCriteria.java @@ -0,0 +1,7 @@ +package models.dataset.criteria; + +import entities.DataRepository; + +public class DataRepositoryCriteria extends Criteria{ + +} diff --git a/dmp-backend/src/main/java/models/dataset/criteria/RegistryCriteria.java b/dmp-backend/src/main/java/models/dataset/criteria/RegistryCriteria.java new file mode 100644 index 000000000..aa387ea9b --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/criteria/RegistryCriteria.java @@ -0,0 +1,7 @@ +package models.dataset.criteria; + +import entities.Registry; + +public class RegistryCriteria extends Criteria{ + +} diff --git a/dmp-backend/src/main/java/models/dataset/criteria/ServiceCriteria.java b/dmp-backend/src/main/java/models/dataset/criteria/ServiceCriteria.java new file mode 100644 index 000000000..0da5acf95 --- /dev/null +++ b/dmp-backend/src/main/java/models/dataset/criteria/ServiceCriteria.java @@ -0,0 +1,7 @@ +package models.dataset.criteria; + +import entities.Service; + +public class ServiceCriteria extends Criteria{ + +} diff --git a/dmp-backend/src/main/java/rest/entities/Datasets.java b/dmp-backend/src/main/java/rest/entities/Datasets.java index b50fa2cf9..93f7bd106 100644 --- a/dmp-backend/src/main/java/rest/entities/Datasets.java +++ b/dmp-backend/src/main/java/rest/entities/Datasets.java @@ -57,6 +57,9 @@ import entities.UserInfo; import helpers.SafeCleanAttribs; import helpers.SerializerProvider; import helpers.Transformers; +import models.dataset.criteria.DataRepositoryCriteria; +import models.dataset.criteria.RegistryCriteria; +import models.dataset.criteria.ServiceCriteria; import responses.RestResponse; @@ -126,10 +129,8 @@ public class Datasets { @RequestMapping(method = RequestMethod.POST, value = { "/dataset/create" }, consumes = "application/json", produces="application/json") - public @ResponseBody ResponseEntity createDataset(@RequestBody Dataset dataset) { - - - + public @ResponseBody ResponseEntity createDataset(@RequestBody models.dataset.Dataset modeldataset) { + String userID = null; try { userID = SecurityContextHolder.getContext().getAuthentication().getPrincipal().toString(); @@ -143,6 +144,36 @@ public class Datasets { return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("There's no such a user on the system. You shouldn't be here"); + Dataset dataset = modeldataset.toDataModel(); + if(dataset.getDataRepositories()!=null&&!dataset.getDataRepositories().isEmpty()){ + for(entities.DataRepository dataRepo : dataset.getDataRepositories()){ + DataRepositoryCriteria criteria = new DataRepositoryCriteria(); + criteria.setLike(dataRepo.getReference()); + List entries = this.dataRepositoryDao.listBy(criteria); + if(entries!=null&&!entries.isEmpty())dataRepo.setId(entries.get(0).getId()); + else dataRepo = this.dataRepositoryDao.create(dataRepo); + } + } + + if(dataset.getServices()!=null&&!dataset.getServices().isEmpty()){ + for(entities.Service service : dataset.getServices()){ + ServiceCriteria criteria = new ServiceCriteria(); + criteria.setLike(service.getReference()); + List entries = this.serviceDao.listBy(criteria); + if(entries!=null&&!entries.isEmpty())service.setId(entries.get(0).getId()); + else service = this.serviceDao.create(service); + } + } + + if(dataset.getRegistries()!=null&&!dataset.getRegistries().isEmpty()){ + for(entities.Registry registry : dataset.getRegistries()){ + RegistryCriteria criteria = new RegistryCriteria(); + criteria.setLike(registry.getReference()); + List entries = this.registryDao.listBy(criteria); + if(entries!=null&&!entries.isEmpty())registry.setId( entries.get(0).getId()); + else registry = this.registryDao.create(registry); + } + } dataset.setId(null); dataset.setCreated(new Date()); diff --git a/dmp-frontend/databaseviewstyle.xml b/dmp-frontend/databaseviewstyle.xml new file mode 100644 index 000000000..471b3c307 --- /dev/null +++ b/dmp-frontend/databaseviewstyle.xml @@ -0,0 +1,1165 @@ + + + +
+ + + + +
+ + + + <visible style=""/> + <extendedDescription/> + <viewStyle cssClass="" renderstyle="textarea"/> + <description/> + </field> + </fields> + </fieldSet> + </fieldsets> + <title>Data Summary + + + + + Data Summary + + +
+
+ +
+ +
+ + + + <extendedDescription/> + <description/> + </section> + </sections> + <fieldGroups> + <fieldGroup defaultVisibility="true" id="FindDataMetadataGroup" ordinal="1" page="0"> + <fieldsets> + <fieldSet id="useMetadataQ211FS" ordinal="1"> + <fields> + <field defaultVisibility="true" id="useMetadataQ211" ordinal="1"> + <title>Q2.1.1 Will you use metadata to describe the data? + + + true + + + true + + + false + + + true + + + true + + + + + User can select from a list of metadata standards. If they cannot find the standard in the list provided then they should choose "not listed". Selecting this will result in a field in which the user can insert the URL to the description of the metadata scheme used. A "comments" box should exist to allow users to add comments. They may select more than one metadata standard. They may specify more than one URL when selecting "not listed". They are also presented with a field in which to specify the location of the metadata service. Users can select the "no metadata" button to specify no metadata will be used to describe the data. + + + +
+ + + Metadata standards + + + + The data will be described by metadata that follows the metadata standards described in <url1>, <url2> + + + + + +
+
+ + + Not listed + + + true + + + + + + + + +
+
+ + + Url + + + + URL to the description of the metadata scheme used + + +
+
+ + + The data will not be described by any metadata + + + + + + + +
+
+ + + Comments + + + + + + +
+
+ + + Q2.1.1a Will your metadata use standardised vocabularies? + + + + User selects from a drop-down list of existing standardised vocabularies or ‘not listed’ or ‘none’. There should be a ‘comments’ fields for additional information. If ‘not listed’ is selected the user is presented with two additional fields in which the user can put the URL to the new vocabulary along with a short description. The user should be allowed to select more than one option. + + + + + + +
+
+ + + Not listed + + + true + + + true + + + + + + + + +
+
+ + + None + + + + The metadata will not make use of any vocabulary + + + +
+
+ + + Url + + + + + + + Description + + + + + + +
+
+ + + Q2.1.1b Will you make the metadata available free-of-charge? + + + + User is presented with a ‘yes’ or ‘no’ along with a ‘comments’ field for additional information. + + +
+
+ + + Q2.1.1c Will your metadata be harvestable? + + + + + + +
+ + + <description/> + <extendedDescription/> + </fieldGroup> + <fieldGroup defaultVisibility="true" id="namingConventionGroup" ordinal="2" page="0"> + <fieldsets> + <fieldSet id="namingConventionQ212FS" ordinal="1"> + <fields> + <field defaultVisibility="true" id="namingConventionQ212" ordinal="1"> + <title>Q2.1.2 Will you use a naming conventions for your data? + + + true + + + + + User selects either ‘yes’ or ‘no’. If they choose ‘yes’ they are presented with a field asking them to put in the URLs where the naming conventions are described. There should be a ‘comments’ section to allow users to add additional information. + + + +
+ + + Url + + + + + + +
+
+ + + Comments + + + + + + +
+ + Naming convention + + + + + +
+ + + Q2.1.3 Will you provide clear version numbers for your data? + + + + User selects a yes or no response. There should be a ‘comments’ field for the user to add additional notes. + + +
+
+ + + Comments + + + + + + +
+
+ Version numbers + + +
+ + +
+ + + Q2.1.4 Will you provide persistent identifiers for your data? + + + true + + + + + Users can select from a list: DOI, Persistent Unique Identifier. They can select the ‘no identifiers’ to indicate no persistent identifiers will be provided to the data. There should be a ‘comments’ field to allow the user to add additional information. + + +
+
+ + + The data will be issued with <identifier type> identifiers once the data has reached an approved level of maturity for consumption by interested parties. + + + + + + + + + + +
+
+ + + Comments + + + + + + +
+
+ Persistent identifiers + + +
+ + +
+ + + Q2.1.5 Will you provide searchable metadata for your data? + + + true + + + + + Users are given the choices: ‘yes’ and ‘no’. There should be a ‘comments’ field to allow users to provide additional information. + + +
+
+ + + Q2.1.5a What services will you use to provide searchable metadata? + + + + User can select from a list of discovery services (eg openAIRE etc) that allow the user to publish metadata on their datasets. They can choose ‘not listed’ to supply the URL and name of the discovery service that is not specified in the list. + + + + + +
+
+ + + Not listed + + + + + + + +
+
+ + + Url + + + + + + + Name + + + + + + +
+
+ Searchable metadata + + +
+ + +
+ + + Q2.1.6 Will you use standardised formats for some or all of your data? + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + +
+
+ + + Comments + + + + + + +
+
+ + + Q2.1.6a Which standardised data formats do you plan on using? + + + + User can select multiple formats from a list. The list could be harvested from the PRONOM registry (https://www.nationalarchives.gov.uk/PRONOM/Default.aspx not all formats may be listed). There should be an ‘other’ to allow the user to specify the ‘standard’ formats they use. This should include a ‘name’ and ‘url’ to information on the format. There should be a ‘comments’ field allowing the user to add additional information. + + + + + +
+
+ + + Other + + + true + + + true + + + + + + + + +
+
+ + + Commnets + + + + + + +
+
+ + + Url + + + + + + + Name + + + + + + +
+
+ + + Q2.1.6b Please describe the formats you plan to store your data in, including any URLs to documentation. + + + + User is presented with a ‘name’, ‘url’ field. They should be allowed to add more ‘name’ and ‘url’ fields. There should be a checkbox to indicate it’s a commonly used format in their field. There should be a ‘comments’ field to allow the user to add additional information. + + +
+
+ + + Name + + + + + + + Url + + + + + + +
+
+ + + it’s a commonly used format + + + + + + + +
+
+ + + Comments + + + + + + +
+
+ Standardised formats + + +
+ + +
+ + + Q2.1.7 Are the file formats you will use open? + + + true + + + + + User presented with a choice of ‘all’, ‘some’, ‘none’. There should be a ‘comments’ field for additional information. + + + + + + +
+
+ + + Comments + + + + + + +
+
+ + + + <visible style=""/> + <extendedDescription/> + <viewStyle cssClass="" renderstyle="textarea"/> + <description>User is presented with a field in which they can describe the data that are not in an open format and the reason why.</description> + </field> + </fields> + </fieldSet> + </fieldsets> + <title>Open File Formats + + + + + +
+ + + Q2.1.8 Do supported open-source tools exist for accessing the data? + + + for_some_data + + + + + + + + User is presented with a choice of ‘for all data’, ‘for some data’, ‘for no data’. The user is provided with a ‘comments’ section for additional information. + + + + + + +
+
+ + + Comments + + + + + + +
+
+ + + Q2.1.8a Please describe which data are require proprietary tools to access the data? + + + + + + +
+
+ Open source Tools + + +
+ + +
+ + + Q2.1.9 Will you provide metadata describing the quality of the data? + + + + User is presented with a ‘yes’, ‘no’ choice along with a ‘comments’ field for additional information. + + +
+
+ + + Comments + + + + + + +
+
+ Quality Of Tha Data + + +
+ + 2.1 Making data findable, including provisions for metadata + + +
+
+ + + + +
+ + + Q2.2.1 Are there ethical or legal issues that can impact sharing the data? + + + true + + + + + User is presented with a ‘yes’, ‘no’. A ‘comments’ field should be provided for the user to provide any additional information. + + +
+
+ + + Comments + + + + + + +
+
+ + + Q2.2.1a Please provide a description of the ethical or legal restrictions on sharing the data User is presented with a field in which they can supply a description of the restrictions. + + + + + + +
+
+ ethical or legal issues + ethical or legal issues + +
+ + +
+ + + Q2.2.2 Will all your data be openly accessible? + + + true + + + + + + + + + + + +
+
+ openly accessible data + + +
+ + +
+ + + Data type + + + + + + + Reason + + + + + + + Url + + + + + + +
+
+ Q2.2.2a Please indicate the types of data that are closed and the reason. + + +
+ + +
+ + + Q2.2.3 How will the data be made available? + + + + User can select from a list of repositories where the data would be stored. If the repository is not specified the user can select ‘not listed’ + + + + + +
+
+ + + Comments + + + + + + +
+
+ + + Not listed + + + true + + + + + + + + +
+
+ + + Url + + + + + + +
+
+ Available data + + +
+ + +
+ + + Q2.2.4 Is the storage sufficiently secure for the data and does the storage provide backup and recovery procedures? + + + insecure_backup_recovery + + + insecure_nobackup_norecovery + + + + + + + + + + + +
+
+ + + Q2.2.4a Please describe the reason you chose an insecure repository + + + + + + +
+
+ + + Q2.2.4a Please describe the reason you chose an insecure repository without backup or recovery + + + + + + +
+
+ Storage sufficiently secure + + +
+ + +
+ + + Q2.2.5 Will you provide methods and tools to access the data? + + + true + + + true + + + true + + + true + + + + + The user can select ‘yes’ or ‘no’ for the methods. There is a ‘comments’ field for the user to provide additional information. + + +
+
+ + + Comments + + + + + + +
+
+ Q2.2.5 Will you provide methods and tools to access the data? + + +
+ + +
+ + + + <visible style=""/> + <extendedDescription/> + <viewStyle cssClass="" renderstyle="freetext"/> + <description/> + </field> + <field defaultVisibility="false" id="urlA2225a" ordinal="2"> + <title>Url + + + + + + +
+
+ + + Comments + + + + + + +
+
+ Q2.2.5a Please provide links describing the methods for accessing the data. + + +
+ + +
+ + + tool + + + + + + + Url + + + + + + +
+
+ + + Comments + + + + + + +
+
+ Q2.2.5b Please provide links describing the tools for accessing the data. + + +
+ + +
+ + + Q2.2.6 Will you also make auxiliary data that may be of interest to researchers available? + + + never + + + + + User is presented with a list of options: ‘no auxiliary data’, ‘after publication’, ‘at end of project’, ‘never’. There is a ‘comments’ field for users to provide additional information. + + + + + + +
+
+ + + Comments + + + + + + +
+
+ + + Reason + + + + + + +
+
+ + <description/> + <extendedDescription/> + </fieldGroup> + </fieldGroups> + <title>2.2 Making data openly accessible + + +
+
+ + + + +
+ + + Q2.3.1 Will you use a standard vocabulary for your data types? + + + + User is presented with a selection of ‘all data types’, ‘some data types’, ‘none’. A ‘comments’ field is also provided for additional information. + + + + + + +
+
+ + + Q2.3.1a Will you provide a mapping to more commonly used ontologies? + + + + + + +
+
+ + <description/> + <extendedDescription/> + </fieldGroup> + </fieldGroups> + <title>2.3 Making data interoperable + + +
+
+ + 2 Fair Data + + +
+
+ \ No newline at end of file diff --git a/dmp-frontend/src/app/datasets/dataset.component.ts b/dmp-frontend/src/app/datasets/dataset.component.ts index 401f6a602..656d0dc7a 100644 --- a/dmp-frontend/src/app/datasets/dataset.component.ts +++ b/dmp-frontend/src/app/datasets/dataset.component.ts @@ -136,7 +136,7 @@ export class DatasetsComponent implements OnInit { dmp: { "id": '' }, services:[], registries:[], - repositories:[] + dataRepositories:[] } } diff --git a/dmp-frontend/src/app/datasets/dataset.html b/dmp-frontend/src/app/datasets/dataset.html index 6a1944e98..79ca5835f 100644 --- a/dmp-frontend/src/app/datasets/dataset.html +++ b/dmp-frontend/src/app/datasets/dataset.html @@ -147,7 +147,7 @@
-