28
|
1 package de.mpiwg.itgroup.annotations;
|
|
2
|
58
|
3 import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
|
|
4
|
28
|
5 /**
|
|
6 * @author dwinter
|
|
7 *
|
|
8 */
|
|
9 public class Tag {
|
|
10
|
|
11 public String uri;
|
|
12 public String name;
|
|
13 public String id;
|
|
14
|
|
15
|
|
16 public Tag(String id, String uri, String name) {
|
|
17 this.uri=uri;
|
|
18 this.id=id;
|
|
19 this.name=name;
|
|
20 }
|
|
21 public String getUri() {
|
|
22 if (uri==null){
|
58
|
23 return BaseRestlet.TAGS_URI_PREFIX+getId(); // erzeuge uri aus if falls keine ID
|
28
|
24 }
|
|
25 return uri;
|
|
26 }
|
|
27 public void setUri(String uri) {
|
|
28 this.uri = uri;
|
|
29 }
|
|
30 public String getName() {
|
|
31 return name;
|
|
32 }
|
|
33 public void setName(String name) {
|
|
34 this.name = name;
|
|
35 }
|
|
36 public String getId() {
|
|
37 if (id==null){
|
|
38 return getName(); //take name if id not defined
|
|
39 }
|
|
40 return id;
|
|
41 }
|
|
42 public void setId(String id) {
|
|
43 this.id = id;
|
|
44 }
|
|
45
|
|
46 }
|