aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/aai/graphgraph/SchemaResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/aai/graphgraph/SchemaResource.java')
-rw-r--r--src/main/java/org/onap/aai/graphgraph/SchemaResource.java31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/SchemaResource.java b/src/main/java/org/onap/aai/graphgraph/SchemaResource.java
index f6823ee..af98289 100644
--- a/src/main/java/org/onap/aai/graphgraph/SchemaResource.java
+++ b/src/main/java/org/onap/aai/graphgraph/SchemaResource.java
@@ -1,3 +1,22 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2019 Orange Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.aai.graphgraph;
import org.onap.aai.graphgraph.dto.Graph;
@@ -41,7 +60,7 @@ public class SchemaResource {
@PathVariable("schema") String schemaName,
@RequestParam("fromNode") String fromNodeName,
@RequestParam("toNode") String toNodeName) {
- return repository.getSchemaReader(schemaName).getEdgeProperties(fromNodeName, toNodeName);
+ return repository.getSchemaReader(schemaName).getEdgeProperties(fromNodeName, toNodeName, "edgerule");
}
@@ -51,9 +70,10 @@ public class SchemaResource {
@RequestParam("node") String initialNodeName,
@RequestParam("parentHops") Integer parentHops,
@RequestParam("cousinHops") Integer cousinHops,
- @RequestParam("childHops") Integer childHops)
+ @RequestParam("childHops") Integer childHops,
+ @RequestParam("edgeFilter") String edgeFilter)
{
- Graph graph = repository.getSchemaReader(schemaName).getGraph(initialNodeName, parentHops, cousinHops, childHops);
+ Graph graph = repository.getSchemaReader(schemaName).getGraph(initialNodeName, parentHops, cousinHops, childHops, edgeFilter);
graph.setPaths(Collections.emptyList());
return graph;
}
@@ -63,9 +83,10 @@ public class SchemaResource {
public Graph loadGraphWithPaths(
@PathVariable("schema") String schemaName,
@RequestParam("fromNode") String fromNode,
- @RequestParam("toNode") String toNode)
+ @RequestParam("toNode") String toNode,
+ @RequestParam("edgeFilter") String edgeFilter)
{
- return repository.getSchemaReader(schemaName).getGraph(fromNode, toNode);
+ return repository.getSchemaReader(schemaName).getGraph(fromNode, toNode, edgeFilter);
}