Examples of ExplanationPhrase


Examples of edu.gmu.seor.prognos.unbbayesplugin.jt.prs.bn.ExplanationPhrase

  public void addExplanationPhrase(ExplanationPhrase explanationPhrase) {
    phrasesMap.put(explanationPhrase.getNode(), explanationPhrase);
  }

  public ExplanationPhrase getExplanationPhrase(String node) throws Exception {
    ExplanationPhrase ep = phrasesMap.get(node);
    if (ep == null) {
      throw new Exception("N� n�o encontrado.");
    } else {
      return (ExplanationPhrase) ep;
    }
View Full Code Here

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

Examples of unbbayes.prs.bn.ExplanationPhrase

  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
Copyright © 2018 www.massapi.com. 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.