28
|
1 package de.mpiwg.itgroup.annotations;
|
|
2
|
70
|
3 /*
|
|
4 * #%L
|
|
5 * AnnotationManager
|
|
6 * %%
|
|
7 * Copyright (C) 2012 - 2014 MPIWG Berlin
|
|
8 * %%
|
|
9 * This program is free software: you can redistribute it and/or modify
|
|
10 * it under the terms of the GNU Lesser General Public License as
|
|
11 * published by the Free Software Foundation, either version 3 of the
|
|
12 * License, or (at your option) any later version.
|
|
13 *
|
|
14 * This program 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 Lesser Public License for more details.
|
|
18 *
|
|
19 * You should have received a copy of the GNU General Lesser Public
|
|
20 * License along with this program. If not, see
|
|
21 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
|
|
22 * #L%
|
|
23 */
|
|
24
|
58
|
25 import de.mpiwg.itgroup.annotations.restlet.BaseRestlet;
|
|
26
|
28
|
27 /**
|
|
28 * @author dwinter
|
|
29 *
|
|
30 */
|
|
31 public class Tag {
|
|
32
|
|
33 public String uri;
|
|
34 public String name;
|
|
35 public String id;
|
|
36
|
|
37
|
|
38 public Tag(String id, String uri, String name) {
|
|
39 this.uri=uri;
|
|
40 this.id=id;
|
|
41 this.name=name;
|
|
42 }
|
|
43 public String getUri() {
|
|
44 if (uri==null){
|
58
|
45 return BaseRestlet.TAGS_URI_PREFIX+getId(); // erzeuge uri aus if falls keine ID
|
28
|
46 }
|
|
47 return uri;
|
|
48 }
|
|
49 public void setUri(String uri) {
|
|
50 this.uri = uri;
|
|
51 }
|
|
52 public String getName() {
|
|
53 return name;
|
|
54 }
|
|
55 public void setName(String name) {
|
|
56 this.name = name;
|
|
57 }
|
|
58 public String getId() {
|
|
59 if (id==null){
|
|
60 return getName(); //take name if id not defined
|
|
61 }
|
|
62 return id;
|
|
63 }
|
|
64 public void setId(String id) {
|
|
65 this.id = id;
|
|
66 }
|
|
67
|
|
68 }
|