comparison src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java @ 98:5a764c625290

oops, forgot to store updated timestamp in db.
author casties
date Wed, 11 Feb 2015 19:04:14 +0100
parents 3be57c18c693
children 7268c3ca025b
comparison
equal deleted inserted replaced
97:434264e1839a 98:5a764c625290
557 annot.setCreator(creator); 557 annot.setCreator(creator);
558 } else { 558 } else {
559 logger.warning("annotation " + annotNode + " has no creator node!"); 559 logger.warning("annotation " + annotNode + " has no creator node!");
560 } 560 }
561 /* 561 /*
562 * get creation date 562 * get creation and update date
563 */ 563 */
564 annot.setCreated((String) annotNode.getProperty("created", null)); 564 annot.setCreated((String) annotNode.getProperty("created", null));
565 annot.setUpdated((String) annotNode.getProperty("updated", null));
565 /* 566 /*
566 * get permissions 567 * get permissions
567 */ 568 */
568 Relationship adminRel = getRelation(annotNode, RelationTypes.PERMITS_ADMIN, null); 569 Relationship adminRel = getRelation(annotNode, RelationTypes.PERMITS_ADMIN, null);
569 if (adminRel != null) { 570 if (adminRel != null) {
755 Node creatorNode = getOrCreateActorNode(creator); 756 Node creatorNode = getOrCreateActorNode(creator);
756 getOrCreateRelation(creatorNode, RelationTypes.CREATED, annotNode); 757 getOrCreateRelation(creatorNode, RelationTypes.CREATED, annotNode);
757 } 758 }
758 759
759 /* 760 /*
760 * The creation date of this annotation. 761 * The creation and update date of this annotation.
761 */ 762 */
762 String created = annot.getCreated(); 763 String created = annot.getCreated();
763 if (created != null) { 764 if (created != null) {
764 annotNode.setProperty("created", created); 765 annotNode.setProperty("created", created);
766 }
767 String updated = annot.getUpdated();
768 if (updated != null) {
769 annotNode.setProperty("updated", updated);
765 } 770 }
766 771
767 /* 772 /*
768 * Permissions for this annotation. 773 * Permissions for this annotation.
769 */ 774 */