+ throw createErrorException(getResult, javax.ws.rs.core.Response.Status.NOT_FOUND, "No edge with id " + id + " found in graph");
+ }
+ }
+
+ @Override
+ public Edge getEdge(String id) throws CrudException {
+ String url = baseRelationshipUrl + "/" + id;
+ OperationResult getResult = client.get(url, createHeader(), MediaType.APPLICATION_JSON_TYPE);
+
+ if (getResult.getResultCode() == 200) {
+ Edge edge = Edge.fromJson(getResult.getResult());
+ return edge;
+ } else {
+ // We didn't find an edge with the supplied id, so just throw an exception.
+ throw createErrorException(getResult, javax.ws.rs.core.Response.Status.NOT_FOUND, "No edge with id " + id + " found in graph");