/** * Build a list of related target node ids for the collection * @param result * @return List<String> list of related resource ids */ private List<String> buildRelatedAssetList(QueryResult result) { List<String> relatedIds = new ArrayList<String>(); List<Relationship> relationships = result.getRelationships(); for (Relationship relationship : relationships) { String name = relationship.getPropertyValue(PropertyIds.NAME); String targetId = relationship.getPropertyValue(PropertyIds.TARGET_ID); log.debug(name+" "+targetId); relatedIds.add(targetId); } return relatedIds; }
addResult(assertEquals(doc1.getId(), rel.getSourceId().getId(), null, f)); addResult(assertEquals(doc2.getId(), rel.getTarget().getId(), null, f)); found = false; for (Relationship r : doc1rels) { if (rel.getId().equals(r.getId())) { found = true; break; for (Relationship r : session.getRelationships(doc1, true, RelationshipDirection.SOURCE, null, SELECT_ALL_NO_CACHE_OC)) { if (rel.getId().equals(r.getId())) { found = true; break; found = false; for (Relationship r : doc2rels) { if (rel.getId().equals(r.getId())) { found = true; break; for (Relationship r : session.getRelationships(doc2, true, RelationshipDirection.TARGET, null, SELECT_ALL_NO_CACHE_OC)) { if (rel.getId().equals(r.getId())) { found = true; break;