* Copyright (C) 2017 AT&T 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.
+ * 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=========================================================
*/
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import org.openecomp.aai.serialization.db.EdgeRule;
+import org.openecomp.aai.serialization.db.EdgeRules;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.openecomp.aai.db.props.AAIProperties;
-import org.openecomp.aai.dbmodel.DbEdgeRules;
import org.openecomp.aai.introspection.Introspector;
import org.openecomp.aai.introspection.Loader;
import org.openecomp.aai.introspection.LoaderFactory;
* Creates the edge labels.
*/
private void createEdgeLabels() {
- Multimap<String, String> edgeRules = DbEdgeRules.EdgeRules;
+ Multimap<String, EdgeRule> edgeRules = EdgeRules.getInstance().getAllRules();
for (String key : edgeRules.keySet()) {
- Collection<String> collection = edgeRules.get(key);
+ Collection<EdgeRule> collection = edgeRules.get(key);
EdgeProperty prop = new EdgeProperty();
//there is only ever one, they used the wrong type for EdgeRules
String label = "";
- for (String item : collection) {
- label = item.split(",")[0];
+ for (EdgeRule item : collection) {
+ label = item.getLabel();
}
prop.setName(label);
prop.setMultiplicity(Multiplicity.MULTI);