* ============LICENSE_START==========================================
* org.onap.aai
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END============================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.aai.champcore.ie;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
final DocumentBuilder builder = factory.newDocumentBuilder();
final InputSource inputSource = new InputSource(is);
final Document doc = builder.parse(inputSource);
final String graphName = graph.getAttributes().getNamedItem("id").getNodeValue();
final NodeList nodesAndEdges = graph.getChildNodes();
+ List<String> fields = new ArrayList<String>();
+ fields.add("importAssignedId");
api.getGraph(graphName).storeObjectIndex(ChampObjectIndex.create()
.ofName("importAssignedId")
.onAnyType()
- .forField("importAssignedId")
+ .forFields(fields)
.build());
for (int j = 0; j < nodesAndEdges.getLength(); j++) {