import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.onap.aai.config.SpringContextAware;
-import org.onap.aai.db.props.AAIProperties;
import org.onap.aai.introspection.Loader;
import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.LoaderUtil;
import org.onap.aai.query.builder.QueryBuilder;
import org.onap.aai.setup.SchemaVersion;
import org.onap.aai.setup.SchemaVersions;
-
import java.net.URI;
/**
protected Loader loader = null;
protected Loader latestLoader = null;
protected QueryBuilder<Vertex> queryBuilder = null;
-
+
protected QueryBuilder<Vertex> parentQueryBuilder = null;
-
+
protected URI uri = null;
-
+
protected String resultResource = "";
-
+
protected String parentResourceType = "";
-
+
protected String containerResource = "";
-
+
/**
* Instantiates a new query parser.
*
this.queryBuilder = queryBuilder;
this.loader = loader;
LoaderFactory loaderFactory = SpringContextAware.getBean(LoaderFactory.class);
- SchemaVersion latest = SpringContextAware.getBean(SchemaVersions.class).getDefaultVersion();
+ SchemaVersion latest = ((SchemaVersions) SpringContextAware.getBean("schemaVersions")).getDefaultVersion();
+
this.latestLoader = loaderFactory.createLoaderForVersion(loader.getModelType(), latest);
}
-
+
/**
* Instantiates a new query parser.
*
protected QueryParser(Loader loader, QueryBuilder<Vertex> queryBuilder) {
this.queryBuilder = queryBuilder;
this.loader = loader;
- LoaderFactory loaderFactory = SpringContextAware.getBean(LoaderFactory.class);
- SchemaVersion latest = SpringContextAware.getBean(SchemaVersions.class).getDefaultVersion();
- this.latestLoader = loaderFactory.createLoaderForVersion(loader.getModelType(), latest);
+ this.latestLoader = LoaderUtil.getLatestVersion();
}
-
+
/**
* Gets the container type.
*
* @return the container type
*/
public String getContainerType() {
-
+
return this.containerResource;
}
-
+
/**
* Gets the parent result type.
*
public String getParentResultType() {
return this.parentResourceType;
}
-
+
/**
* Gets the result type.
*
public String getResultType() {
return this.resultResource;
}
-
+
/**
* Gets the query builder.
*
public QueryBuilder<Vertex> getQueryBuilder() {
return this.queryBuilder;
}
-
+
/**
* Gets the uri.
*
public URI getUri() {
return this.uri;
}
-
+
/**
* Gets the parent query builder.
*
return this.queryBuilder;
}
}
-
+
/**
* Checks if is dependent.
*