comparison src/main/java/de/mpiwg/itgroup/annotations/Annotation.java @ 48:0e00bf8e27fb

targets and resources of Annotation object are objects now.
author casties
date Wed, 26 Sep 2012 18:10:47 +0200
parents 03e0f7574224
children 64aa756c60cc
comparison
equal deleted inserted replaced
47:54a4a96ad0c3 48:0e00bf8e27fb
26 * The URI of the annotation text 26 * The URI of the annotation text
27 */ 27 */
28 protected String bodyUri; 28 protected String bodyUri;
29 29
30 /** 30 /**
31 * The base URI of the annotation target. 31 * The annotation target.
32 */ 32 */
33 protected String targetBaseUri; 33 protected Target target;
34 34
35 /** 35 /**
36 * The fragment part of the annotation target. 36 * The fragment part of the annotation target.
37 */ 37 */
38 protected String targetFragment; 38 protected String targetFragment;
50 */ 50 */
51 protected FragmentTypes fragmentType; 51 protected FragmentTypes fragmentType;
52 52
53 53
54 /** 54 /**
55 * The uri of the resource that is annotated e.g. a book. 55 * The Resource that is annotated e.g. a book.
56 * The target is part of this resource e.g. a page of a book. 56 * The target is part of this resource e.g. a page of a book.
57 */ 57 */
58 protected String resourceUri; 58 protected Resource resource;
59 59
60 /** 60 /**
61 * The creator of this annotation. 61 * The creator of this annotation.
62 */ 62 */
63 protected Actor creator; 63 protected Actor creator;
186 public void setBodyUri(String bodyUri) { 186 public void setBodyUri(String bodyUri) {
187 this.bodyUri = bodyUri; 187 this.bodyUri = bodyUri;
188 } 188 }
189 189
190 /** 190 /**
191 * @return the target
192 */
193 public Target getTarget() {
194 return target;
195 }
196
197 /**
198 * @param target the target to set
199 */
200 public void setTarget(Target target) {
201 this.target = target;
202 }
203
204 /**
191 * @return the targetBaseUri 205 * @return the targetBaseUri
192 */ 206 */
193 public String getTargetBaseUri() { 207 public String getTargetBaseUri() {
194 return targetBaseUri; 208 if (target == null) return null;
195 } 209 return target.getUri();
196
197 /**
198 * @param targetBaseUri the targetBaseUri to set
199 */
200 public void setTargetBaseUri(String targetBaseUri) {
201 this.targetBaseUri = targetBaseUri;
202 } 210 }
203 211
204 /** 212 /**
205 * @return the targetFragment 213 * @return the targetFragment
206 */ 214 */
228 public void setFragmentType(FragmentTypes fragmentType) { 236 public void setFragmentType(FragmentTypes fragmentType) {
229 this.fragmentType = fragmentType; 237 this.fragmentType = fragmentType;
230 } 238 }
231 239
232 /** 240 /**
241 * @return the resource
242 */
243 public Resource getResource() {
244 return resource;
245 }
246
247 /**
248 * @param resource the resource to set
249 */
250 public void setResource(Resource resource) {
251 this.resource = resource;
252 }
253
254 /**
233 * @return the resourceUri 255 * @return the resourceUri
234 */ 256 */
235 public String getResourceUri() { 257 public String getResourceUri() {
236 return resourceUri; 258 if (resource == null) return null;
237 } 259 return resource.getUri();
238
239 /**
240 * @param resourceUri the resourceUri to set
241 */
242 public void setResourceUri(String resourceUri) {
243 this.resourceUri = resourceUri;
244 } 260 }
245 261
246 /** 262 /**
247 * @return the creator 263 * @return the creator
248 */ 264 */