Search in sources :

Example 1 with JsonPathQuery

use of org.batfish.question.jsonpath.JsonPathQuery in project batfish by batfish.

the class InferPoliciesQuestionPlugin method makeQuestionWithHints.

private static JsonPathQuestion makeQuestionWithHints(AbstractRoleConsistencyQuestion roleQ) {
    JsonPathQuestion ret = new JsonPathQuestion();
    ret.setInnerQuestion(roleQ);
    JsonPathQuery path = new JsonPathQuery("$.answers[?(@.outliers)]", true);
    path.setDisplayHints(getDisplayHintsForQuestion(roleQ));
    ret.setPaths(Collections.singletonList(path));
    InstanceData instance = new InstanceData();
    instance.setInstanceName(getInstanceNameForQuestion(roleQ));
    ret.setInstance(instance);
    return ret;
}
Also used : InstanceData(org.batfish.datamodel.questions.Question.InstanceData) JsonPathQuery(org.batfish.question.jsonpath.JsonPathQuery) JsonPathQuestion(org.batfish.question.jsonpath.JsonPathQuestionPlugin.JsonPathQuestion)

Aggregations

InstanceData (org.batfish.datamodel.questions.Question.InstanceData)1 JsonPathQuery (org.batfish.question.jsonpath.JsonPathQuery)1 JsonPathQuestion (org.batfish.question.jsonpath.JsonPathQuestionPlugin.JsonPathQuestion)1