* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.aai.parsers.query;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+
+import java.io.UnsupportedEncodingException;
+
import org.onap.aai.config.SpringContextAware;
import org.onap.aai.edges.EdgeIngestor;
import org.onap.aai.exceptions.AAIException;
import org.onap.aai.query.builder.QueryBuilder;
import org.springframework.context.ApplicationContext;
-import java.io.UnsupportedEncodingException;
-
/**
* The Class RelationshipQueryParser.
*/
public class RelationshipQueryParser extends LegacyQueryParser {
- private static final EELFLogger logger = EELFManager.getInstance().getLogger(RelationshipQueryParser.class);
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(RelationshipQueryParser.class);
+
+ private Introspector relationship = null;
+
+ private ModelType modelType = null;
+
+ private EdgeIngestor edgeRules = null;
- private Introspector relationship = null;
-
- private ModelType modelType = null;
-
- private EdgeIngestor edgeRules = null;
-
- /**
- * Instantiates a new relationship query parser.
- *
- * @param loader the loader
- * @param queryBuilder the query builder
- * @param obj the obj
- * @throws UnsupportedEncodingException the unsupported encoding exception
- * @throws AAIException the AAI exception
- */
- public RelationshipQueryParser(Loader loader, QueryBuilder queryBuilder, Introspector obj) throws UnsupportedEncodingException, AAIException {
- super(loader, queryBuilder);
- this.relationship = obj;
- this.modelType = obj.getModelType();
- initBeans();
- RelationshipToURI rToUri = new RelationshipToURI(loader, obj);
- this.uri = rToUri.getUri();
- URIParser parser = new URIParser(loader, uri);
- parser.parse(this);
- }
+ /**
+ * Instantiates a new relationship query parser.
+ *
+ * @param loader the loader
+ * @param queryBuilder the query builder
+ * @param obj the obj
+ * @throws UnsupportedEncodingException the unsupported encoding exception
+ * @throws AAIException the AAI exception
+ */
+ public RelationshipQueryParser(Loader loader, QueryBuilder queryBuilder, Introspector obj)
+ throws UnsupportedEncodingException, AAIException {
+ super(loader, queryBuilder);
+ this.relationship = obj;
+ this.modelType = obj.getModelType();
+ initBeans();
+ RelationshipToURI rToUri = new RelationshipToURI(loader, obj);
+ this.uri = rToUri.getUri();
+ URIParser parser = new URIParser(loader, uri);
+ parser.parse(this);
+ }
- private void initBeans() {
- ApplicationContext ctx = SpringContextAware.getApplicationContext();
- if (ctx == null) {
- logger.warn("Unable to retrieve the spring context");
- } else {
- EdgeIngestor ei = ctx.getBean(EdgeIngestor.class);
- this.edgeRules = ei;
- }
- }
+ private void initBeans() {
+ ApplicationContext ctx = SpringContextAware.getApplicationContext();
+ if (ctx == null) {
+ logger.warn("Unable to retrieve the spring context");
+ } else {
+ EdgeIngestor ei = ctx.getBean(EdgeIngestor.class);
+ this.edgeRules = ei;
+ }
+ }
}