* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 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.
* 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.parsers.query;
import org.junit.Test;
import org.onap.aai.AAISetup;
import org.onap.aai.exceptions.AAIException;
-import org.onap.aai.introspection.LoaderFactory;
-import org.onap.aai.introspection.ModelInjestor;
+
import org.onap.aai.introspection.ModelType;
-import org.onap.aai.introspection.Version;
+import org.onap.aai.setup.SchemaVersion;
import org.onap.aai.serialization.engines.QueryStyle;
-import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.JanusGraphDBEngine;
import org.onap.aai.serialization.engines.TransactionalGraphEngine;
import javax.ws.rs.core.UriBuilder;
@Ignore
public class UniqueURIQueryTest extends AAISetup {
- private ModelInjestor injestor = ModelInjestor.getInstance();
- private TransactionalGraphEngine dbEngine =
- new TitanDBEngine(QueryStyle.GREMLIN_UNIQUE,
- LoaderFactory.createLoaderForVersion(ModelType.MOXY, Version.v8),
- false);
- private final Version version = Version.v8;
- private DynamicJAXBContext context = injestor.getContextForVersion(version);
+
+ private TransactionalGraphEngine dbEngine;
+ private SchemaVersion version;
+ private DynamicJAXBContext context = nodeIngestor.getContextForVersion(version);
/**
* Parent query.
*/
@Test
public void parentQuery() throws UnsupportedEncodingException, AAIException {
+ version = new SchemaVersion("v8");
+ dbEngine = new JanusGraphDBEngine(QueryStyle.GREMLIN_UNIQUE,
+ loaderFactory.createLoaderForVersion(ModelType.MOXY, version),
+ false);
URI uri = UriBuilder.fromPath("cloud-infrastructure/complexes/complex/key1").build();
String key = "complex/key1";
QueryParser query = dbEngine.getQueryBuilder().createQueryFromURI(uri);