1 | /** |
---|
2 | * |
---|
3 | */ |
---|
4 | package de.mpiwg.itgroup.annotations; |
---|
5 | |
---|
6 | /** |
---|
7 | * @author casties |
---|
8 | * |
---|
9 | */ |
---|
10 | public class Annotation { |
---|
11 | /** |
---|
12 | * The URI of this annotation. |
---|
13 | */ |
---|
14 | protected String uri; |
---|
15 | |
---|
16 | /** |
---|
17 | * The annotation (body) text. |
---|
18 | */ |
---|
19 | protected String bodyText; |
---|
20 | |
---|
21 | /** |
---|
22 | * The URI of the annotation text |
---|
23 | */ |
---|
24 | protected String bodyUri; |
---|
25 | |
---|
26 | /** |
---|
27 | * The base URI of the annotation target. |
---|
28 | */ |
---|
29 | protected String targetBaseUri; |
---|
30 | |
---|
31 | /** |
---|
32 | * The fragment part of the annotation target. |
---|
33 | */ |
---|
34 | protected String targetFragment; |
---|
35 | |
---|
36 | /** |
---|
37 | * The types of annotation targets. |
---|
38 | * |
---|
39 | */ |
---|
40 | public static enum FragmentTypes { |
---|
41 | XPOINTER, AREA |
---|
42 | }; |
---|
43 | |
---|
44 | /** |
---|
45 | * The type of the annotation target fragment. |
---|
46 | */ |
---|
47 | protected FragmentTypes fragmentType; |
---|
48 | |
---|
49 | /** |
---|
50 | * The creator of this annotation. |
---|
51 | */ |
---|
52 | protected Actor creator; |
---|
53 | |
---|
54 | /** |
---|
55 | * The creation date of this annotation. |
---|
56 | */ |
---|
57 | protected String created; |
---|
58 | |
---|
59 | /** |
---|
60 | * The user or group that has admin permissions. |
---|
61 | * null means any user. |
---|
62 | */ |
---|
63 | protected Actor adminPermission; |
---|
64 | |
---|
65 | /** |
---|
66 | * The user or group that has delete permissions. |
---|
67 | * null means any user. |
---|
68 | */ |
---|
69 | protected Actor deletePermission; |
---|
70 | |
---|
71 | /** |
---|
72 | * The user or group that has update permissions. |
---|
73 | * null means any user. |
---|
74 | */ |
---|
75 | protected Actor updatePermission; |
---|
76 | |
---|
77 | /** |
---|
78 | * The user or group that has read permissions. |
---|
79 | * null means any user. |
---|
80 | */ |
---|
81 | protected Actor readPermission; |
---|
82 | |
---|
83 | /** |
---|
84 | * @return the uri |
---|
85 | */ |
---|
86 | public String getUri() { |
---|
87 | return uri; |
---|
88 | } |
---|
89 | |
---|
90 | /** |
---|
91 | * @param uri the uri to set |
---|
92 | */ |
---|
93 | public void setUri(String uri) { |
---|
94 | this.uri = uri; |
---|
95 | } |
---|
96 | |
---|
97 | /** |
---|
98 | * @return the bodyText |
---|
99 | */ |
---|
100 | public String getBodyText() { |
---|
101 | return bodyText; |
---|
102 | } |
---|
103 | |
---|
104 | /** |
---|
105 | * @param bodyText the bodyText to set |
---|
106 | */ |
---|
107 | public void setBodyText(String bodyText) { |
---|
108 | this.bodyText = bodyText; |
---|
109 | } |
---|
110 | |
---|
111 | /** |
---|
112 | * @return the bodyUri |
---|
113 | */ |
---|
114 | public String getBodyUri() { |
---|
115 | return bodyUri; |
---|
116 | } |
---|
117 | |
---|
118 | /** |
---|
119 | * @param bodyUri the bodyUri to set |
---|
120 | */ |
---|
121 | public void setBodyUri(String bodyUri) { |
---|
122 | this.bodyUri = bodyUri; |
---|
123 | } |
---|
124 | |
---|
125 | /** |
---|
126 | * @return the targetBaseUri |
---|
127 | */ |
---|
128 | public String getTargetBaseUri() { |
---|
129 | return targetBaseUri; |
---|
130 | } |
---|
131 | |
---|
132 | /** |
---|
133 | * @param targetBaseUri the targetBaseUri to set |
---|
134 | */ |
---|
135 | public void setTargetBaseUri(String targetBaseUri) { |
---|
136 | this.targetBaseUri = targetBaseUri; |
---|
137 | } |
---|
138 | |
---|
139 | /** |
---|
140 | * @return the targetFragment |
---|
141 | */ |
---|
142 | public String getTargetFragment() { |
---|
143 | return targetFragment; |
---|
144 | } |
---|
145 | |
---|
146 | /** |
---|
147 | * @param targetFragment the targetFragment to set |
---|
148 | */ |
---|
149 | public void setTargetFragment(String targetFragment) { |
---|
150 | this.targetFragment = targetFragment; |
---|
151 | } |
---|
152 | |
---|
153 | /** |
---|
154 | * @return the targetType |
---|
155 | */ |
---|
156 | public FragmentTypes getFragmentType() { |
---|
157 | return fragmentType; |
---|
158 | } |
---|
159 | |
---|
160 | /** |
---|
161 | * @param fragmentType the fragmentType to set |
---|
162 | */ |
---|
163 | public void setFragmentType(FragmentTypes fragmentType) { |
---|
164 | this.fragmentType = fragmentType; |
---|
165 | } |
---|
166 | |
---|
167 | /** |
---|
168 | * @return the creator |
---|
169 | */ |
---|
170 | public Actor getCreator() { |
---|
171 | return creator; |
---|
172 | } |
---|
173 | |
---|
174 | /** |
---|
175 | * @param creator the creator to set |
---|
176 | */ |
---|
177 | public void setCreator(Actor creator) { |
---|
178 | this.creator = creator; |
---|
179 | } |
---|
180 | |
---|
181 | /** |
---|
182 | * @return the creatorUri |
---|
183 | */ |
---|
184 | public String getCreatorUri() { |
---|
185 | if (creator != null) { |
---|
186 | return creator.getUri(); |
---|
187 | } |
---|
188 | return null; |
---|
189 | } |
---|
190 | |
---|
191 | /** |
---|
192 | * @return the creatorName |
---|
193 | */ |
---|
194 | public String getCreatorName() { |
---|
195 | if (creator != null) { |
---|
196 | return creator.getName(); |
---|
197 | } |
---|
198 | return null; |
---|
199 | } |
---|
200 | |
---|
201 | /** |
---|
202 | * @return the created |
---|
203 | */ |
---|
204 | public String getCreated() { |
---|
205 | return created; |
---|
206 | } |
---|
207 | |
---|
208 | /** |
---|
209 | * @param created the created to set |
---|
210 | */ |
---|
211 | public void setCreated(String created) { |
---|
212 | this.created = created; |
---|
213 | } |
---|
214 | |
---|
215 | /** |
---|
216 | * @return the adminPermission |
---|
217 | */ |
---|
218 | public Actor getAdminPermission() { |
---|
219 | return adminPermission; |
---|
220 | } |
---|
221 | |
---|
222 | /** |
---|
223 | * @param adminPermission the adminPermission to set |
---|
224 | */ |
---|
225 | public void setAdminPermission(Actor adminPermission) { |
---|
226 | this.adminPermission = adminPermission; |
---|
227 | } |
---|
228 | |
---|
229 | /** |
---|
230 | * @return the deletePermission |
---|
231 | */ |
---|
232 | public Actor getDeletePermission() { |
---|
233 | return deletePermission; |
---|
234 | } |
---|
235 | |
---|
236 | /** |
---|
237 | * @param deletePermission the deletePermission to set |
---|
238 | */ |
---|
239 | public void setDeletePermission(Actor deletePermission) { |
---|
240 | this.deletePermission = deletePermission; |
---|
241 | } |
---|
242 | |
---|
243 | /** |
---|
244 | * @return the updatePermission |
---|
245 | */ |
---|
246 | public Actor getUpdatePermission() { |
---|
247 | return updatePermission; |
---|
248 | } |
---|
249 | |
---|
250 | /** |
---|
251 | * @param updatePermission the updatePermission to set |
---|
252 | */ |
---|
253 | public void setUpdatePermission(Actor updatePermission) { |
---|
254 | this.updatePermission = updatePermission; |
---|
255 | } |
---|
256 | |
---|
257 | /** |
---|
258 | * @return the readPermission |
---|
259 | */ |
---|
260 | public Actor getReadPermission() { |
---|
261 | return readPermission; |
---|
262 | } |
---|
263 | |
---|
264 | /** |
---|
265 | * @param readPermission the readPermission to set |
---|
266 | */ |
---|
267 | public void setReadPermission(Actor readPermission) { |
---|
268 | this.readPermission = readPermission; |
---|
269 | } |
---|
270 | |
---|
271 | |
---|
272 | } |
---|