diff --git a/dmp-backend/src/main/java/entities/DMP.java b/dmp-backend/src/main/java/entities/DMP.java index 8850d2231..9aaf98f18 100644 --- a/dmp-backend/src/main/java/entities/DMP.java +++ b/dmp-backend/src/main/java/entities/DMP.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -100,6 +101,47 @@ public class DMP implements Serializable { private Set users; + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + + public Set getUsers() { return users; } diff --git a/dmp-backend/src/main/java/entities/DMPProfile.java b/dmp-backend/src/main/java/entities/DMPProfile.java index 012197425..c28738562 100644 --- a/dmp-backend/src/main/java/entities/DMPProfile.java +++ b/dmp-backend/src/main/java/entities/DMPProfile.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -52,6 +53,47 @@ public class DMPProfile implements Serializable { @Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true) private String definition; + + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + public UUID getId() { return id; } diff --git a/dmp-backend/src/main/java/entities/DataRepository.java b/dmp-backend/src/main/java/entities/DataRepository.java index 4515498ea..65791a0f9 100644 --- a/dmp-backend/src/main/java/entities/DataRepository.java +++ b/dmp-backend/src/main/java/entities/DataRepository.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -68,6 +69,45 @@ public class DataRepository implements Serializable { private Set datasets; + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + public UUID getId() { diff --git a/dmp-backend/src/main/java/entities/Dataset.java b/dmp-backend/src/main/java/entities/Dataset.java index e3aacb626..cb2bb82e5 100644 --- a/dmp-backend/src/main/java/entities/Dataset.java +++ b/dmp-backend/src/main/java/entities/Dataset.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -95,7 +96,46 @@ public class Dataset implements Serializable { private Set services; + @Column(name = "\"Status\"", nullable = false) + private Short status; + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + public Set getRegistries() { return registries; } diff --git a/dmp-backend/src/main/java/entities/DatasetProfile.java b/dmp-backend/src/main/java/entities/DatasetProfile.java index 535dd10b8..bd7840586 100644 --- a/dmp-backend/src/main/java/entities/DatasetProfile.java +++ b/dmp-backend/src/main/java/entities/DatasetProfile.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -62,6 +63,48 @@ public class DatasetProfile implements Serializable { @Column(name = "\"Definition\"", columnDefinition = "xml", nullable = false) private String definition; + + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + + public UUID getId() { return id; } diff --git a/dmp-backend/src/main/java/entities/Organisation.java b/dmp-backend/src/main/java/entities/Organisation.java index 1f1afae6f..0a08eb0ce 100644 --- a/dmp-backend/src/main/java/entities/Organisation.java +++ b/dmp-backend/src/main/java/entities/Organisation.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -69,6 +70,47 @@ public class Organisation implements Serializable { private Set dMPs; + + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + public UUID getId() { return id; } diff --git a/dmp-backend/src/main/java/entities/Project.java b/dmp-backend/src/main/java/entities/Project.java index 391182bfc..5582fc8d5 100644 --- a/dmp-backend/src/main/java/entities/Project.java +++ b/dmp-backend/src/main/java/entities/Project.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -69,6 +70,73 @@ public class Project implements Serializable { private String definition; + @Column(name = "\"StartDate\"", nullable = false) + private Date startdate = null; + + @Column(name = "\"EndDate\"", nullable = false) + private Date enddate = null; + + + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + + public Date getStartdate() { + return startdate; + } + + + public void setStartdate(Date startdate) { + this.startdate = startdate; + } + + + public Date getEnddate() { + return enddate; + } + + + public void setEnddate(Date enddate) { + this.enddate = enddate; + } + + public UUID getId() { return id; } diff --git a/dmp-backend/src/main/java/entities/Registry.java b/dmp-backend/src/main/java/entities/Registry.java index 28532f610..def5da279 100644 --- a/dmp-backend/src/main/java/entities/Registry.java +++ b/dmp-backend/src/main/java/entities/Registry.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -69,6 +70,45 @@ public class Registry implements Serializable { + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + public UUID getId() { return id; } diff --git a/dmp-backend/src/main/java/entities/Researcher.java b/dmp-backend/src/main/java/entities/Researcher.java index 0cedb72a6..a755a03a5 100644 --- a/dmp-backend/src/main/java/entities/Researcher.java +++ b/dmp-backend/src/main/java/entities/Researcher.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -69,6 +70,46 @@ public class Researcher implements Serializable { private Set dMPs; + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + + public UUID getId() { return id; } diff --git a/dmp-backend/src/main/java/entities/Service.java b/dmp-backend/src/main/java/entities/Service.java index 1474aa890..fc5b2cd21 100644 --- a/dmp-backend/src/main/java/entities/Service.java +++ b/dmp-backend/src/main/java/entities/Service.java @@ -2,6 +2,7 @@ package entities; import java.io.Serializable; +import java.util.Date; import java.util.Set; import java.util.UUID; @@ -69,6 +70,45 @@ public class Service implements Serializable { private Set datasets; + @Column(name = "\"Status\"", nullable = false) + private Short status; + + @Column(name = "\"Created\"", nullable = false) + private Date created = null; + + @Column(name = "\"Modified\"", nullable = false) + private Date modified = null; + + + public Short getStatus() { + return status; + } + + + public void setStatus(Short status) { + this.status = status; + } + + + public Date getCreated() { + return created; + } + + + public void setCreated(Date created) { + this.created = created; + } + + + public Date getModified() { + return modified; + } + + + public void setModified(Date modified) { + this.modified = modified; + } + public UUID getId() { return id; diff --git a/dmp-db-scema/DataManagementPlanDB.sql b/dmp-db-scema/DataManagementPlanDB.sql index 8ab9dcaf7..b7c54b14f 100644 --- a/dmp-db-scema/DataManagementPlanDB.sql +++ b/dmp-db-scema/DataManagementPlanDB.sql @@ -50,6 +50,9 @@ CREATE TABLE "DMP" ( "Version" integer NOT NULL, "Project" uuid NOT NULL, "ProfileData" xml, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Profile" uuid ); @@ -80,6 +83,9 @@ COMMENT ON COLUMN "DMPOrganisation"."Role" IS 'Enumerator of roles'; CREATE TABLE "DMPProfile" ( "ID" uuid DEFAULT uuid_generate_v4() NOT NULL, "Label" character varying(250) NOT NULL, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -108,6 +114,10 @@ CREATE TABLE "Dataset" ( "DMP" uuid, "Uri" character varying(250), "Properties" xml, + "Reference" xml, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Profile" uuid ); @@ -126,6 +136,9 @@ CREATE TABLE "DatasetProfile" ( "Label" character varying(250) NOT NULL, "Ruleset" uuid, "Viewstyle" uuid, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml NOT NULL ); @@ -167,6 +180,9 @@ CREATE TABLE "Organisation" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -195,6 +211,11 @@ CREATE TABLE "Project" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), + "StartDate" timestamp, + "EndDate" timestamp, "Definition" xml ); @@ -233,6 +254,9 @@ CREATE TABLE "Researcher" ( "Uri" character varying(250), "PrimaryEmail" character varying(250), "Definition" xml, + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Reference" xml ); @@ -354,6 +378,9 @@ CREATE TABLE "Service" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -369,6 +396,9 @@ CREATE TABLE "DataRepository" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -385,6 +415,9 @@ CREATE TABLE "Registry" ( "Abbreviation" character varying(50), "Reference" xml, "Uri" character varying(250), + "Status" smallint not null default 0, + "Created" timestamp not null default NOW(), + "Modified" timestamp not null default NOW(), "Definition" xml ); @@ -462,7 +495,7 @@ CREATE TABLE "UserInfo" ( "authentication" uuid, "verified_email" boolean, "name" character varying(250), - "created" timestamp, + "created" timestamp not null, "lastloggedin" timestamp, "additionalinfo" xml, PRIMARY KEY (id)