From 7e69be504213aa92893fd3354a767128b3a583f1 Mon Sep 17 00:00:00 2001 From: Shwetank Dave Date: Tue, 22 Aug 2017 10:36:30 -0400 Subject: Using DbEdgeRules.json files from aai-core jar. Before we were aai_relationship_vxx.json files. Now using the edge rules directly from aai-core jar. Issue-ID: AAI-21 Change-Id: Id62494caabc75bc29e4f3558268ec78897946937 Signed-off-by: Shwetank Dave --- .../org/openecomp/schema/RelationshipSchemaValidator.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/org/openecomp/schema/RelationshipSchemaValidator.java') diff --git a/src/main/java/org/openecomp/schema/RelationshipSchemaValidator.java b/src/main/java/org/openecomp/schema/RelationshipSchemaValidator.java index 552b60a..af20699 100644 --- a/src/main/java/org/openecomp/schema/RelationshipSchemaValidator.java +++ b/src/main/java/org/openecomp/schema/RelationshipSchemaValidator.java @@ -56,7 +56,7 @@ public class RelationshipSchemaValidator { throw new CrudException("", Status.NOT_FOUND); } - HashMap> props = schema.lookupRelationType(type); + Map> props = schema.lookupRelationType(type); Map result = new HashMap(); for (String key : filter.keySet()) { @@ -128,7 +128,7 @@ public class RelationshipSchemaValidator { String key = sourceNodeType + ":" + targetNodeType + ":" + type; // find the validate the key from the schema - HashMap> schemaObject = schema.lookupRelation(key); + Map> schemaObject = schema.lookupRelation(key); if (schemaObject == null) { throw new CrudException("Invalid source/target/relationship type: " + key, @@ -185,7 +185,7 @@ public class RelationshipSchemaValidator { + ":" + edge.getType(); // find the validate the key from the schema - HashMap> schemaObject = schema.lookupRelation(key); + Map> schemaObject = schema.lookupRelation(key); if (schemaObject == null) { Logger.warn("key :" + key @@ -267,7 +267,7 @@ public class RelationshipSchemaValidator { + ":" + edge.getType(); // find the validate the key from the schema - HashMap> schemaObject = schema.lookupRelation(key); + Map> schemaObject = schema.lookupRelation(key); if (schemaObject == null) { Logger.warn("key :" + key @@ -295,7 +295,7 @@ public class RelationshipSchemaValidator { private static void validateEdgeProps(Edge.Builder builder, JsonElement props, - HashMap> schemaObject) + Map> schemaObject) throws CrudException { Set> entries = props.getAsJsonObject().entrySet(); @@ -323,7 +323,7 @@ public class RelationshipSchemaValidator { String key = edge.getSource().getType() + ":" + edge.getTarget().getType() + ":" + edge.getType(); - HashMap> schemaObject = schema.lookupRelation(key); + Map> schemaObject = schema.lookupRelation(key); if (schemaObject == null || schemaObject.isEmpty()) { return edge; -- cgit 1.2.3-korg