View Javadoc
1   /*
2    * Copyright 2018-2022 Medical Information Systems Research Group (https://medical.zcu.cz),
3    * Department of Computer Science and Engineering, University of West Bohemia.
4    * Address: Univerzitni 8, 306 14 Plzen, Czech Republic.
5    *
6    * Author Petr Vcelak (vcelak@kiv.zcu.cz).
7    *
8    * This file is part of MRECore project.
9    *
10   * MRECore is free software: you can redistribute it and/or modify
11   * it under the terms of the GNU General Public License as published by
12   * the Free Software Foundation, either version 3 of the License.
13   *
14   * MRECore is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17   * GNU General Public License for more details.
18   *
19   * You should have received a copy of the GNU General Public License
20   * along with MRECore. If not, see <http://www.gnu.org/licenses/>.
21   */
22  package cz.zcu.mre.data.account;
23  
24  import com.fasterxml.jackson.annotation.JsonIgnore;
25  import cz.zcu.mre.annotation.data.MREDataOntology;
26  import cz.zcu.mre.annotation.data.MREDataURIBasename;
27  import cz.zcu.mre.data.core.MREData;
28  import cz.zcu.mre.data.core.MREDataImpl;
29  import cz.zcu.mre.vocab.MRE;
30  import cz.zcu.mre.vocab.NS;
31  import java.time.LocalDate;
32  
33  /**
34   * 
35   * @author Petr Vcelak (vcelak@kiv.zcu.cz)
36   */
37  @MREDataOntology(namespace = MRE.NS)
38  @MREDataURIBasename(basename = NS.ID)
39  public class Account extends MREDataImpl implements MREData {
40  
41      private String email;
42  
43      @JsonIgnore
44      private String password;
45  
46      private String role;
47  
48      private LocalDate created;
49  
50      public Account() {
51      }
52  
53      public Account(String email, String password, String role) {
54          this.email = email;
55          this.password = password;
56          this.role = role;
57          this.created = LocalDate.now();
58      }
59  
60      public Account(String email) {
61          this.email = email;
62      }
63  
64      public String getEmail() {
65          return email;
66      }
67  
68      public void setEmail(String email) {
69          this.email = email;
70      }
71  
72      public String getPassword() {
73          return password;
74      }
75  
76      public void setPassword(String password) {
77          this.password = password;
78      }
79  
80      public String getRole() {
81          return role;
82      }
83  
84      public void setRole(String role) {
85          this.role = role;
86      }
87  
88      public LocalDate getCreated() {
89          return created;
90      }
91  }