Changeset 8:c3cc6a41dd1c in AnnotationManagerN4J
- Timestamp:
- Jul 12, 2012, 9:14:39 AM (12 years ago)
- Branch:
- default
- Location:
- src/main/java/de/mpiwg/itgroup/annotations
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/Annotation.java
r5 r8 62 62 protected String created; 63 63 64 protected String adminPermission; 65 64 66 /** 65 67 * @return the uri -
src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java
r6 r8 38 38 39 39 public static enum RelationTypes implements RelationshipType { 40 ANNOTATES, CREATED 40 ANNOTATES, CREATED, PERMITS 41 41 } 42 42 … … 65 65 public Annotation getAnnotationById(String id) { 66 66 Node annotNode = getNodeIndex(NodeTypes.ANNOTATION).get("id", id).getSingle(); 67 Annotation annot = createAnnotation (annotNode);67 Annotation annot = createAnnotationFromNode(annotNode); 68 68 return annot; 69 69 } … … 75 75 * @return 76 76 */ 77 public Annotation createAnnotation (Node annotNode) {77 public Annotation createAnnotationFromNode(Node annotNode) { 78 78 Annotation annot = new Annotation(); 79 79 annot.setUri((String) annotNode.getProperty("id", null)); … … 188 188 189 189 // re-read and return annotation 190 Annotation storedAnnot = createAnnotation (annotNode);190 Annotation storedAnnot = createAnnotationFromNode(annotNode); 191 191 return storedAnnot; 192 192 } … … 221 221 } 222 222 } 223 224 223 } 225 224 … … 245 244 Node ann = relation.getStartNode(); 246 245 if (ann.getProperty("TYPE", "").equals("ANNOTATION")) { 247 Annotation annot = createAnnotation (ann);246 Annotation annot = createAnnotationFromNode(ann); 248 247 annotations.add(annot); 249 248 } else { … … 263 262 Node ann = relation.getEndNode(); 264 263 if (ann.getProperty("TYPE", "").equals("ANNOTATION")) { 265 Annotation annot = createAnnotation (ann);264 Annotation annot = createAnnotationFromNode(ann); 266 265 annotations.add(annot); 267 266 } else {
Note: See TracChangeset
for help on using the changeset viewer.