import org.onap.aai.schema.enums.ObjectMetadata;
import org.onap.aai.serialization.db.DBSerializer;
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 org.onap.aai.serialization.engines.query.QueryEngine;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.fge.jsonpatch.JsonPatchException;
import com.github.fge.jsonpatch.mergepatch.JsonMergePatch;
-import com.thinkaurelius.titan.core.TitanException;
+import org.janusgraph.core.JanusGraphException;
+import org.onap.aai.serialization.queryformats.Format;
+import org.onap.aai.serialization.queryformats.FormatFactory;
+import org.onap.aai.serialization.queryformats.Formatter;
/**
* The Class HttpEntry.
this.queryStyle = queryStyle;
this.version = version;
this.loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
- this.dbEngine = new TitanDBEngine(
+ this.dbEngine = new JanusGraphDBEngine(
queryStyle,
connectionType,
loader);
status = Status.OK;
MarshallerProperties properties;
if (!request.getMarshallerProperties().isPresent()) {
- properties =
+ properties =
new MarshallerProperties.Builder(org.onap.aai.restcore.MediaType.getEnum(outputMediaType)).build();
} else {
properties = request.getMarshallerProperties().get();
responses.add(pairedResp);
//break out of retry loop
break;
- } catch (TitanException e) {
+ } catch (JanusGraphException e) {
this.dbEngine.rollback();
LOGGER.info ("Caught exception: " + e.getMessage());
depth = AAIProperties.MAXIMUM_DEPTH;
}
} else {
- if (depthParam.length() > 0 && !depthParam.equals("all")){
+ if (!depthParam.isEmpty() && !"all".equals(depthParam)){
try {
- depth = Integer.valueOf(depthParam);
+ depth = Integer.parseInt(depthParam);
} catch (Exception e) {
throw new AAIException("AAI_4016");
}