Tabnine Logo
Question.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
org.batfish.datamodel.questions.Question

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

origin: batfish/batfish

 @Override
 public @Nullable Answerer createAnswerer(@Nonnull Question question) {
  AnswererCreator creator = _answererCreators.get(question.getName());
  return creator != null ? creator.create(question, this) : null;
 }
}
origin: batfish/batfish

public static Answerer create(Question question, IBatfish batfish) {
 String questionName = question.getName();
 Answerer answerer = batfish.createAnswerer(question);
 if (answerer == null) {
  throw new BatfishException(
    "Cannot create answerer for missing question with name: " + questionName);
 }
 return answerer;
}
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

@Override
public @Nullable String loadQuestionSettings(@Nonnull Question question) {
 String questionClassId = question.getName();
 NetworkId networkId = _settings.getContainer();
 if (!_idResolver.hasQuestionSettingsId(questionClassId, networkId)) {
  return null;
 }
 try {
  QuestionSettingsId questionSettingsId =
    _idResolver.getQuestionSettingsId(questionClassId, networkId);
  return _storage.loadQuestionSettings(_settings.getContainer(), questionSettingsId);
 } catch (IOException e) {
  throw new BatfishException(
    String.format("Failed to read question settings for question: '%s'", questionClassId), e);
 }
}
origin: batfish/batfish

 @Override
 protected final void pluginInitialize() {
  Question question = createQuestion();
  String questionName = question.getName();
  String questionClassName = question.getClass().getCanonicalName();
  switch (_pluginConsumer.getType()) {
   case BATFISH:
    {
     IBatfish batfish = (IBatfish) _pluginConsumer;
     batfish.registerAnswerer(questionName, questionClassName, this::createAnswerer);
     break;
    }
   case CLIENT:
    {
     IClient client = (IClient) _pluginConsumer;
     client.registerQuestion(questionName, this::createQuestion);
     break;
    }
   default:
    break;
  }
 }
}
origin: batfish/batfish

} else {
 throw new BatfishException(
   "The question " + innerQuestion.getName() + " does not implement INodeRegexQuestion");
origin: batfish/batfish

@Test
public void testGetAnswerMetadataAnalysisMissingQuestion()
  throws JsonProcessingException, FileNotFoundException {
 String networkName = "network1";
 String snapshotName = "snapshot1";
 String analysisName = "analysis1";
 Question question = new TestQuestion();
 String questionName = "question1";
 _manager.initNetwork(networkName, null);
 _manager.configureAnalysis(
   networkName, true, analysisName, ImmutableMap.of(), ImmutableList.of(), null);
 NetworkId networkId = _idManager.getNetworkId(networkName);
 SnapshotId snapshotId = _idManager.generateSnapshotId();
 _idManager.assignSnapshot(snapshotName, networkId, snapshotId);
 QuestionSettingsId questionSettingsId = new QuestionSettingsId("blah");
 _idManager.assignQuestionSettingsId(question.getName(), networkId, questionSettingsId);
 _thrown.expect(IllegalArgumentException.class);
 _thrown.expectMessage(containsString(questionName));
 _manager.getAnswerMetadata(networkName, snapshotName, questionName, null, analysisName);
}
origin: batfish/batfish

@Test
public void testGetAnswerMetadataAnalysisMissingAnalysis()
  throws JsonProcessingException, FileNotFoundException {
 String networkName = "network1";
 String snapshotName = "snapshot1";
 String analysisName = "analysis1";
 Question question = new TestQuestion();
 String questionName = "question1";
 _manager.initNetwork(networkName, null);
 NetworkId networkId = _idManager.getNetworkId(networkName);
 SnapshotId snapshotId = _idManager.generateSnapshotId();
 _idManager.assignSnapshot(snapshotName, networkId, snapshotId);
 // the analysis id is not assigned, so the analysis is effectively missing
 QuestionSettingsId questionSettingsId = new QuestionSettingsId("blah");
 _idManager.assignQuestionSettingsId(question.getName(), networkId, questionSettingsId);
 _thrown.expect(IllegalArgumentException.class);
 _thrown.expectMessage(containsString(analysisName));
 _manager.getAnswerMetadata(networkName, snapshotName, questionName, null, analysisName);
}
origin: batfish/batfish

QuestionId questionId = _idManager.getQuestionId(questionName, networkId, null);
QuestionSettingsId questionSettingsId = new QuestionSettingsId("blah");
_idManager.assignQuestionSettingsId(question.getName(), networkId, questionSettingsId);
AnswerId baseAnswerId =
  _idManager.getBaseAnswerId(
org.batfish.datamodel.questionsQuestiongetName

Javadoc

Returns the short name of this question, used in place of the classname to identify this question.

Popular methods of Question

  • parseQuestion
  • getDataPlane
    Returns true iff this question requires a computed data plane as input.
  • getDifferential
  • getDisplayHints
  • getInstance
  • prettyPrint
  • <init>
  • configureTemplate
  • getAssertion
  • getExclusions
  • getIncludeOneTableKeys
  • getIndependent
    Returns true iff this question does not need the testrig to be properly parsed
  • getIncludeOneTableKeys,
  • getIndependent,
  • isQuestionClass,
  • preprocessQuestion,
  • recursivelyRemoveOptionalVar,
  • setDifferential,
  • setExclusions,
  • setInstance,
  • toFullJsonString

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Github Copilot alternatives
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