Changeset 31:9f653697437e in AnnotationManagerN4J for src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java
r29 r31 85 85 } 86 86 87 88 87 89 public List<Actor> getActors(String key, String query, NodeTypes type) { 88 90 ArrayList<Actor> actors = new ArrayList<Actor>(); … … 123 125 } 124 126 127 128 /** 129 * Returns List of Annotations. 130 * Key has to be indexed. 131 * 132 * @param key 133 * @param query 134 * @return 135 */ 136 public List<Annotation> getAnnotations(String key, String query) { 137 ArrayList<Annotation> annotations = new ArrayList<Annotation>(); 138 Index<Node> idx = getNodeIndex(NodeTypes.ANNOTATION); 139 if (key == null) { 140 key = "id"; 141 query = "*"; 142 } 143 IndexHits<Node> annotNodes = idx.query(key, query); 144 for (Node annotNode : annotNodes) { 145 Annotation annotation = createAnnotationFromNode(annotNode); 146 annotations.add(annotation); 147 } 148 return annotations; 149 } 150 151 125 152 126 153 /**
Note: See TracChangeset
for help on using the changeset viewer.