source: AnnotationManagerN4J/src/main/java/de/mpiwg/itgroup/annotations/Person.java @ 15:58357a4b86de

Last change on this file since 15:58357a4b86de was 15:58357a4b86de, checked in by casties, 12 years ago

ASSIGNED - # 249: Annotations shared in groups
https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-software/ticket/249

File size: 967 bytes
Line 
1/**
2 *
3 */
4package de.mpiwg.itgroup.annotations;
5
6/**
7 * @author casties
8 *
9 */
10public class Person extends Actor {
11
12    public Person() {
13    }
14
15    public Person(String id) {
16        super();
17        this.id = id;
18    }
19
20    public Person(String uri, String name) {
21        super();
22        this.uri = uri;
23        this.name = name;
24    }
25
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
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
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    }
57}
Note: See TracBrowser for help on using the repository browser.