Ignore:
Timestamp:
Sep 26, 2012, 4:10:47 PM (12 years ago)
Author:
casties
Branch:
default
Message:

targets and resources of Annotation object are objects now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/Annotation.java

    r40 r48  
    2929   
    3030    /**
    31      * The base URI of the annotation target.
    32      */
    33     protected String targetBaseUri;
     31     * The annotation target.
     32     */
     33    protected Target target;
    3434   
    3535    /**
     
    5353   
    5454    /**
    55      * The uri of the resource that is annotated e.g. a book.
     55     * The Resource that is annotated e.g. a book.
    5656     * The target is part of this resource e.g. a page of a book.
    5757     */
    58     protected String resourceUri;
     58    protected Resource resource;
    5959   
    6060    /**
     
    189189
    190190    /**
     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    /**
    191205     * @return the targetBaseUri
    192206     */
    193207    public String getTargetBaseUri() {
    194         return targetBaseUri;
    195     }
    196 
    197     /**
    198      * @param targetBaseUri the targetBaseUri to set
    199      */
    200     public void setTargetBaseUri(String targetBaseUri) {
    201         this.targetBaseUri = targetBaseUri;
     208        if (target == null) return null;
     209        return target.getUri();
    202210    }
    203211
     
    231239
    232240    /**
     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    /**
    233255     * @return the resourceUri
    234256     */
    235257    public String getResourceUri() {
    236         return resourceUri;
    237     }
    238 
    239     /**
    240      * @param resourceUri the resourceUri to set
    241      */
    242     public void setResourceUri(String resourceUri) {
    243         this.resourceUri = resourceUri;
     258        if (resource == null) return null;
     259        return resource.getUri();
    244260    }
    245261
Note: See TracChangeset for help on using the changeset viewer.