Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorTags.java @ 58:f5c0e6df7e88
made uri prefixes in store configurable.
author | casties |
---|---|
date | Tue, 20 Nov 2012 18:23:52 +0100 |
parents | 64aa756c60cc |
children | c0dd5314bada |
comparison
equal
deleted
inserted
replaced
57:4efb21cf0ce0 | 58:f5c0e6df7e88 |
---|---|
12 import org.restlet.data.Status; | 12 import org.restlet.data.Status; |
13 import org.restlet.ext.json.JsonRepresentation; | 13 import org.restlet.ext.json.JsonRepresentation; |
14 import org.restlet.representation.Representation; | 14 import org.restlet.representation.Representation; |
15 import org.restlet.resource.Get; | 15 import org.restlet.resource.Get; |
16 | 16 |
17 import de.mpiwg.itgroup.annotations.NS; | |
18 import de.mpiwg.itgroup.annotations.Tag; | 17 import de.mpiwg.itgroup.annotations.Tag; |
19 import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; | 18 import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; |
20 | 19 |
21 | 20 |
22 /** | 21 /** |
57 } | 56 } |
58 } | 57 } |
59 | 58 |
60 protected Representation getTag(String id){ | 59 protected Representation getTag(String id){ |
61 AnnotationStore store = getAnnotationStore(); | 60 AnnotationStore store = getAnnotationStore(); |
62 String tagUri=NS.MPIWG_TAGS_URL+id; | 61 String tagUri = BaseRestlet.TAGS_URI_PREFIX + id; |
63 Node tagNode = store.getTagNodeByUri(tagUri); | 62 Node tagNode = store.getTagNodeByUri(tagUri); |
64 Tag tag = store.createTagFromNode(tagNode); | 63 Tag tag = store.createTagFromNode(tagNode); |
65 JSONObject jo = new JSONObject(); | 64 JSONObject jo = new JSONObject(); |
66 try { | 65 try { |
67 jo.put("id", tag.getId()); | 66 jo.put("id", tag.getId()); |