Commit b10f93a2 by TJBChris

Moved a comment that should have been moved to

GraphBackendDiscoveryService as it relates to the graph directly. The code was inactive but remains commented as a reminder for future work.
parent b3d8e037
......@@ -272,6 +272,19 @@ public class GraphBackedMetadataRepository implements MetadataRepository {
HashMap<String,Map<String,String>> vertices = new HashMap<String,Map<String,String>>();
HashMap<String,Map<String,String>> edges = new HashMap<String,Map<String,String>>();
/* Later - when we allow search limitation by "type".
ArrayList<String> typesList = new ArrayList<String>();
for (String s: types.split(",")) {
// Types validity check.
if (typesList.contains(s)) {
LOG.error("Specifyed type is not a member of the Type System= {}", s);
throw new WebApplicationException(
Servlets.getErrorResponse("Invalid type specified in query.", Response.Status.INTERNAL_SERVER_ERROR));
}
typesList.add(s);
}*/
int resultCount = 0;
for (Vertex v: graphService.getBlueprintsGraph().query().has(prop,searchText).vertices()) {
......
......@@ -165,20 +165,7 @@ public class MetadataDiscoveryResource {
LOG.info("Performing full text search for vertices with property {} matching= {}", prop, searchText);
Preconditions.checkNotNull(searchText, "Invalid argument: \"text\" cannot be null.");
Preconditions.checkNotNull(prop, "Invalid argument: \"prop\" cannot be null.");
/* Later - when we allow search limitation by "type".
ArrayList<String> typesList = new ArrayList<String>();
for (String s: types.split(",")) {
// Types validity check.
if (typesList.contains(s)) {
LOG.error("Specifyed type is not a member of the Type System= {}", s);
throw new WebApplicationException(
Servlets.getErrorResponse("Invalid type specified in query.", Response.Status.INTERNAL_SERVER_ERROR));
}
typesList.add(s);
}*/
Preconditions.checkNotNull(prop, "Invalid argument: \"prop\" cannot be null.");
// Parent JSON Object
JSONObject response = new JSONObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment