Changeset 76:4e2dc67997a0 in AnnotationManagerN4J for src


Ignore:
Timestamp:
Jun 6, 2014, 7:26:21 AM (10 years ago)
Author:
casties
Branch:
default
Message:

save text quote from Annotator.

Location:
src/main/java/de/mpiwg/itgroup/annotations
Files:
3 edited

Legend:

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

    r70 r76  
    7676    protected FragmentTypes fragmentType;
    7777   
     78    /**
     79     * The selected text of the annotation target.
     80     */
     81    protected String quote;
    7882   
    7983    /**
     
    287291
    288292    /**
     293     * @return the quote
     294     */
     295    public String getQuote() {
     296        return quote;
     297    }
     298
     299    /**
     300     * @param quote the quote to set
     301     */
     302    public void setQuote(String quote) {
     303        this.quote = quote;
     304    }
     305
     306    /**
    289307     * @return the resource
    290308     */
  • src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java

    r75 r76  
    520520            annot.setBodyText((String) annotNode.getProperty("bodyText", null));
    521521            annot.setBodyUri((String) annotNode.getProperty("bodyUri", null));
     522            annot.setQuote((String) annotNode.getProperty("quote", null));
    522523            /*
    523524             * get annotation target and resource from relation
     
    701702            if (bodyUri != null) {
    702703                annotNode.setProperty("bodyUri", bodyUri);
     704            }
     705           
     706            /*
     707             * the annotation quote
     708             */
     709            String quote = annot.getQuote();
     710            if (quote != null) {
     711                annotNode.setProperty("quote", quote);
    703712            }
    704713               
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorResourceImpl.java

    r75 r76  
    226226            if (annot.getResourceUri() != null) {
    227227                jo.put("resource", annot.getResourceUri());
     228            }
     229            if (annot.getQuote() != null) {
     230                jo.put("quote", annot.getQuote());
    228231            }
    229232
     
    509512        }
    510513        /*
     514         * annotation quote
     515         */
     516        if (jo.has("quote")) {
     517            annot.setQuote(jo.getString("quote"));
     518        }
     519        /*
    511520         * check authentication
    512521         */
Note: See TracChangeset for help on using the changeset viewer.