Package unbbayes.prs.bn

Examples of unbbayes.prs.bn.ExplanationPhrase


      updateExplanationInformation(item);
  }

  private void updateExplanationInformation(String item)
  {   try
      {   ExplanationPhrase explanationPhrase = node.getExplanationPhrase(item);
          int evidenceType = explanationPhrase.getEvidenceType();
          switch (evidenceType)
          {   case (ExplanationPhrase.TRIGGER_EVIDENCE_TYPE) :        triggerRadioButton.setSelected(true);
                                                                      break;
              case (ExplanationPhrase.NECESSARY_EVIDENCE_TYPE) :      necessaryRadioButton.setSelected(true);
                                                                      break;
              case (ExplanationPhrase.COMPLEMENTARY_EVIDENCE_TYPE) :  complementaryRadioButton.setSelected(true);
                                                                      break;
              case (ExplanationPhrase.EXCLUSIVE_EVIDENCE_TYPE) :      exclusiveRadioButton.setSelected(true);
                                                                      break;
              default : naRadioButton.setSelected(true);
          }
          evidencePhraseTextArea.setText(explanationPhrase.getPhrase());
      }
      catch (Exception e)
      {   naRadioButton.setSelected(true);
          evidencePhraseTextArea.setText("");
      }
View Full Code Here


  void evidencePhraseTextArea_focusLost(FocusEvent e)
  {   addEvidence(e);
  }

  private void addEvidence(AWTEvent e)
  {   ExplanationPhrase explanationPhrase = new ExplanationPhrase();
      explanationPhrase.setNode(evidenceNodeComboBox.getSelectedItem().toString());
      if (triggerRadioButton.isSelected())
      {   explanationPhrase.setEvidenceType(ExplanationPhrase.TRIGGER_EVIDENCE_TYPE);
      }
      else if (necessaryRadioButton.isSelected())
      {   explanationPhrase.setEvidenceType(ExplanationPhrase.NECESSARY_EVIDENCE_TYPE);
      }
      else if (complementaryRadioButton.isSelected())
      {   explanationPhrase.setEvidenceType(ExplanationPhrase.COMPLEMENTARY_EVIDENCE_TYPE);
      }
      else if (exclusiveRadioButton.isSelected())
      {   explanationPhrase.setEvidenceType(ExplanationPhrase.EXCLUSIVE_EVIDENCE_TYPE);
      }
      else
      {   explanationPhrase.setEvidenceType(ExplanationPhrase.NA_EVIDENCE_TYPE);
      }
      explanationPhrase.setPhrase(evidencePhraseTextArea.getText());
      node.addExplanationPhrase(explanationPhrase);
  }
View Full Code Here

TOP

Related Classes of unbbayes.prs.bn.ExplanationPhrase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.