congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.batfish.datamodel.questions
Code IndexAdd Tabnine to your IDE (free)

How to use org.batfish.datamodel.questions

Best Java code snippets using org.batfish.datamodel.questions (Showing top 20 results out of 315)

origin: batfish/batfish

 @Override
 public Set<String> resolve(SpecifierContext ctxt) {
  return _shorthandSpecifier.getMatchingNodes(ctxt);
 }
}
origin: batfish/batfish

@Override
public boolean getDataPlane() {
 for (Question question : _questions) {
  if (question.getDataPlane()) {
   return true;
  }
 }
 return false;
}
origin: batfish/batfish

/**
 * Checks is this row is covered by the provided exclusion.
 *
 * @param exclusion The exclusion to check against.
 * @return The result of the check
 */
public boolean isCovered(ObjectNode exclusion) {
 return Exclusion.firstCoversSecond(exclusion, _data);
}
origin: batfish/batfish

private DisplayHints getComposition(String displayVariable) {
 DisplayHints displayHints = new DisplayHints();
 Map<String, Composition> compositions = new HashMap<>();
 Composition composition = _displayHints.getCompositions().get(displayVariable);
 compositions.put(displayVariable, composition);
 displayHints.setCompositions(compositions);
 Map<String, Extraction> extractions = new HashMap<>();
 for (String varName : composition.getDictionary().values()) {
  extractions.put(varName, _displayHints.getExtractions().get(varName));
 }
 displayHints.setExtractions(extractions);
 return displayHints;
}
origin: batfish/batfish

@Override
public String loadQuestionClassId(
  NetworkId networkId, QuestionId questionId, AnalysisId analysisId) throws IOException {
 return Question.parseQuestion(loadQuestion(networkId, questionId, analysisId)).getName();
}
origin: batfish/batfish

public static TableMetadata createMetadata(Question question) {
 String textDesc = DEFAULT_TEXT_DESC;
 DisplayHints dhints = question.getDisplayHints();
 if (dhints != null && dhints.getTextDesc() != null) {
  textDesc = dhints.getTextDesc();
 }
 return new TableMetadata(COLUMN_METADATA, textDesc);
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query, based on {@link
 * PropertySpecifier#baseAutoComplete}.
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet());
}
origin: batfish/batfish

 /** Returns what is actually inserted into the answer */
 static SelfDescribingObject insertedObject(Object obj, String structType) {
  Schema targetSchema = NamedStructureSpecifier.JAVA_MAP.get(structType).getSchema();
  return new SelfDescribingObject(
    targetSchema, PropertySpecifier.convertTypeIfNeeded(obj, targetSchema));
 }
}
origin: batfish/batfish

@Override
public boolean equals(Object o) {
 if (!(o instanceof Assertion)) {
  return false;
 }
 Assertion other = (Assertion) o;
 return Objects.equals(_assertionType, other.getType())
   && Objects.equals(_expect, other.getExpect());
}
origin: batfish/batfish

protected FilterTableQuestion() {
 _innerQuestion =
   new Question() {
    @Override
    public boolean getDataPlane() {
     return false;
    }
    @Override
    public String getName() {
     return null;
    }
   };
}
origin: batfish/batfish

 public static TableMetadata createMetadata(Question question) {
  String textDesc = DEFAULT_TEXT_DESC;
  DisplayHints dhints = question.getDisplayHints();
  if (dhints != null && dhints.getTextDesc() != null) {
   textDesc = dhints.getTextDesc();
  }
  return new TableMetadata(COLUMN_METADATA, textDesc);
 }
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query, based on {@link
 * PropertySpecifier#baseAutoComplete}.
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet());
}
origin: batfish/batfish

@Override
public boolean getDataPlane() {
 return _innerQuestion.getDataPlane();
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query. The current implementation treats the query
 * as a prefix of the property string.
 *
 * @param query The query to auto complete
 * @return The list of suggestions
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet());
}
origin: batfish/batfish

@Override
public boolean getDataPlane() {
 return _innerQuestion.getDataPlane();
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query, based on {@link
 * PropertySpecifier#baseAutoComplete}.
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, MAP.keySet());
}
origin: batfish/batfish

@Override
public boolean getDataPlane() {
 return _innerQuestion.getDataPlane();
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query. The current implementation treats the query
 * as a prefix of the property string.
 *
 * @param query The query to auto complete
 * @return The list of suggestions
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet());
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query, based on {@link
 * PropertySpecifier#baseAutoComplete}.
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, _map.keySet());
}
origin: batfish/batfish

/**
 * Returns a list of suggestions based on the query, based on {@link
 * PropertySpecifier#baseAutoComplete}.
 */
public static List<AutocompleteSuggestion> autoComplete(String query) {
 return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet());
}
org.batfish.datamodel.questions

Most used classes

  • InstanceData
    Configuration and template description for a specific instance of a org.batfish.datamodel.questions.
  • NodesSpecifier
    Enables specification of groups of nodes in various questions.Currently supported example specifiers
  • Question
  • BgpPeerPropertySpecifier
    Enables specification a set of BGP peer properties.Example specifiers: * multipath-ebgp —> gets the
  • BgpProcessPropertySpecifier
    Enables specification a set of BGP process properties.Example specifiers: * multipath_ebgp —> gets t
  • Exclusion,
  • InterfacePropertySpecifier,
  • NodePropertySpecifier,
  • Variable$Type,
  • ConfiguredSessionStatus,
  • FiltersSpecifier,
  • InterfacesSpecifier,
  • NamedStructureSpecifier,
  • OspfPropertySpecifier,
  • PropertySpecifier,
  • Variable,
  • AllowedValue,
  • DisplayHints$Composition,
  • DisplayHints$Extraction
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now