10
|
1 /**
|
|
2 *
|
|
3 */
|
|
4 package de.mpiwg.itgroup.annotations;
|
|
5
|
|
6 /**
|
|
7 * @author casties
|
|
8 *
|
|
9 */
|
|
10 public class Person extends Actor {
|
|
11
|
12
|
12 public Person() {
|
|
13 }
|
|
14
|
|
15 public Person(String id) {
|
|
16 super();
|
|
17 this.id = id;
|
|
18 }
|
|
19
|
10
|
20 public Person(String uri, String name) {
|
|
21 super();
|
|
22 this.uri = uri;
|
|
23 this.name = name;
|
|
24 }
|
|
25
|
15
|
26 public Person(String id, String uri, String name) {
|
|
27 super();
|
|
28 this.id = id;
|
|
29 this.uri = uri;
|
|
30 this.name = name;
|
|
31 }
|
|
32
|
10
|
33 @Override
|
|
34 public boolean isGroup() {
|
|
35 return false;
|
|
36 }
|
|
37
|
|
38 public String getIdString() {
|
|
39 if (id == null) {
|
|
40 id = getIdFromUri(uri, false);
|
|
41 }
|
|
42 return id;
|
|
43 }
|
|
44
|
15
|
45 /**
|
|
46 * Returns a Person with this id or null.
|
|
47 *
|
|
48 * @param id
|
|
49 * @return
|
|
50 */
|
|
51 public static Person createPersonWithId(String id) {
|
|
52 if (id != null) {
|
|
53 return new Person(id);
|
|
54 }
|
|
55 return null;
|
|
56 }
|
10
|
57 }
|