From 783cd8fa9f9ac25eda184f68e98fd4b90279a71b Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Wed, 10 Apr 2024 01:14:34 +0200 Subject: [PATCH] added comments in entities --- .../Tables/ScientificPublications/Access.java | 14 +++++++++++--- .../Tables/ScientificPublications/Article.java | 15 +++++++++++---- .../ScientificPublications/ArticleCoAuthors.java | 8 ++++++++ .../Tables/ScientificPublications/PaperType.java | 6 +++--- .../Tables/ScientificPublications/Researcher.java | 8 ++++++++ 5 files changed, 41 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Access.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Access.java index 7914d22..2e50622 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Access.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Access.java @@ -1,7 +1,15 @@ package ovh.herisson.Clyde.Tables.ScientificPublications; +/****************************************************** + * @file Access.java + * @author Maxime Bartha + * @scope Extension Publications scientifiques + * + * Access Type for the Articles + * + ******************************************************/ public enum Access { - OpenSource, - Restricted, - Private, + OpenSource, // everyone can see + Restricted, // only Researchers and Staff Members (secretary, teachers and Inscription Service) + Private, // only authors and co-authors } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Article.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Article.java index dd5504c..446214f 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Article.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Article.java @@ -1,5 +1,13 @@ package ovh.herisson.Clyde.Tables.ScientificPublications; +/****************************************************** + * @file Article.java + * @author Maxime Bartha + * @scope Extension Publications scientifiques + * + * Article entity + * + ******************************************************/ import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter; @@ -24,15 +32,14 @@ public class Article { @ManyToOne(fetch = FetchType.EAGER) @OnDelete(action = OnDeleteAction.CASCADE) - @JoinColumn(name ="Users") - private User author; + @JoinColumn(name ="Researcher") + private Researcher author; - //todo change user to Researcher @CreationTimestamp @Column(nullable = false) private Date releaseDate; - private PublishType publishType; + private PaperType paperType; private String pdfLocation; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/ArticleCoAuthors.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/ArticleCoAuthors.java index 5407a4b..6048abe 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/ArticleCoAuthors.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/ArticleCoAuthors.java @@ -1,5 +1,13 @@ package ovh.herisson.Clyde.Tables.ScientificPublications; +/****************************************************** + * @file ArticleCoAuthors + * @author Maxime Bartha + * @scope Extension Publications scientifiques + * + * Co-Authors List entity (will be accessed by Articles) + * + ******************************************************/ import jakarta.persistence.FetchType; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/PaperType.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/PaperType.java index ae69364..b3b6196 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/PaperType.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/PaperType.java @@ -1,14 +1,14 @@ package ovh.herisson.Clyde.Tables.ScientificPublications; /****************************************************** - * @file Access.java + * @file PaperType.java * @author Maxime Bartha * @scope Extension Publications scientifiques * - * Type of the + * Type of the scientific paper * ******************************************************/ -public enum PublishType { +public enum PaperType { article, slides, } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java index 6366641..23fea98 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java @@ -1,5 +1,13 @@ package ovh.herisson.Clyde.Tables.ScientificPublications; +/****************************************************** + * @file Researcher.java + * @author Maxime Bartha + * @scope Extension Publications scientifiques + * + * Researcher entity + * + ******************************************************/ import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter;