diff src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java @ 9:b2bfc3bc9ba8

new internal actor class for creator.
author casties
date Thu, 12 Jul 2012 12:54:46 +0200
parents c3cc6a41dd1c
children 90911b2da322
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java	Thu Jul 12 11:14:39 2012 +0200
+++ b/src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java	Thu Jul 12 12:54:46 2012 +0200
@@ -17,6 +17,7 @@
 import org.neo4j.graphdb.index.Index;
 import org.neo4j.graphdb.index.IndexHits;
 
+import de.mpiwg.itgroup.annotations.Actor;
 import de.mpiwg.itgroup.annotations.Annotation;
 import de.mpiwg.itgroup.annotations.Annotation.FragmentTypes;
 
@@ -94,13 +95,15 @@
 		if (ft != null) {
 			annot.setFragmentType(FragmentTypes.valueOf(ft));
 		}
-		// get creator form relation
+		// get creator from relation
 		Iterable<Relationship> creatorRels = annotNode
 				.getRelationships(RelationTypes.CREATED);
 		for (Relationship creatorRel : creatorRels) {
-			Node creator = creatorRel.getStartNode();
-			annot.setCreatorUri((String) creator.getProperty("uri", null));
-			annot.setCreatorName((String) creator.getProperty("name", null));
+			Node creatorNode = creatorRel.getStartNode();
+			String uri = (String) creatorNode.getProperty("uri", null);
+			String name = (String) creatorNode.getProperty("name", null);
+            Actor creator = new Actor(false, uri, name);
+            annot.setCreator(creator);
 			// just the first one
 			break;
 		}