- if (getResult.getResultCode() == 200) {
- return champGson.fromJson(getResult.getResult(), new TypeToken<List<Edge>>() {
- }.getType());
- } else {
- // We didn't find a vertex with the supplied id, so just throw an
- // exception.
- throw createErrorException(getResult, javax.ws.rs.core.Response.Status.NOT_FOUND, "No vertex with id " + id + " found in graph");
- }
+ if (!queryParamsCopy.isEmpty())
+ {
+ strBuild.append("?");
+ strBuild.append(URLEncodedUtils.format(convertToNameValuePair(queryParamsCopy), Charset.defaultCharset()));
+ }
+
+ OperationResult getResult = client.get(strBuild.toString(), createHeader(), MediaType.APPLICATION_JSON_TYPE);
+
+ if (getResult.getResultCode() == 200) {
+ return champGson.fromJson(getResult.getResult(), new TypeToken<List<Edge>>() {
+ }.getType());
+ } else {
+ // We didn't find a vertex with the supplied id, so just throw an
+ // exception.
+ throw createErrorException(getResult, javax.ws.rs.core.Response.Status.NOT_FOUND, "No vertex with id " + id + " found in graph");
+ }