Changeset 43:d1bef7952bec in AnnotationManagerN4J
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/neo4j/AnnotationStore.java
r42 r43 93 93 Node person = getNodeIndex(NodeTypes.TAG).get("uri", tagUri).getSingle(); 94 94 return person; 95 } 96 97 /** 98 * @param resourceUri 99 * @return 100 */ 101 public Node getResourceNodeByUri(String resourceUri) { 102 return getNodeFromIndex("uri", resourceUri, NodeTypes.RESOURCE); 103 } 104 105 /** 106 * @param targetUri 107 * @return 108 */ 109 public Node getTargetNodeByUri(String targetUri) { 110 return getNodeFromIndex("uri", targetUri, NodeTypes.RESOURCE); 95 111 } 96 112 … … 567 583 } 568 584 585 /** 586 * @param resourceNode 587 * @return 588 */ 589 public Resource createResourceFromNode(Node resourceNode) { 590 return (Resource) createUriFromNode(resourceNode); 591 } 592 593 /** 594 * @param targetNode 595 * @return 596 */ 597 public Target createTargetFromNode(Node targetNode) { 598 return (Target) createUriFromNode(targetNode); 599 } 600 601 569 602 protected Uri createUriFromNode(Node uriNode) { 570 603 if (uriNode == null) return null; … … 1073 1106 Iterable<Relationship> rels = tag.getRelationships(Direction.INCOMING, RelationTypes.ANNOTATES); 1074 1107 for (Relationship rel : rels) { 1075 Node node = rel.getStartNode(); 1076 ret.add(createAnnotationFromNode(node)); 1108 Node an = rel.getStartNode(); 1109 Node rn = rel.getEndNode(); 1110 if (rn.getProperty("TYPE", "").equals("RESOURCE")) { 1111 logger.error("getAnnotationsByResource got ANNOTATES != RESOURCE"); 1112 } 1113 ret.add(createAnnotationFromNode(an)); 1077 1114 } 1078 1115 return ret;
Note: See TracChangeset
for help on using the changeset viewer.