Ejemplo n.º 1
0
  private void ConnectKnowledgeBaseBtnMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_ConnectKnowledgeBaseBtnMouseClicked

    String sPrjFile = ProjectNameTF.getText().trim();
    String sLocationURI = sURI + "Location";

    Collection errors = new ArrayList();
    Date d1 = new Date();
    long l1 = d1.getTime();
    prj = Project.loadProjectFromFile(sPrjFile, errors);
    owlModel = (OWLModel) prj.getKnowledgeBase();

    kb = prj.getKnowledgeBase();
    URI uri = prj.getActiveRootURI();

    Collection colNumberOfInstance = kb.getInstances();
    lNumberOfInstance = colNumberOfInstance.size();

    Date d2 = new Date();
    long l2 = d2.getTime();
    lLoadedTime = (l2 - l1);

    theLogger.info("Connected to MySQL in " + lLoadedTime + " ms");
    theLogger.info("KB has " + lNumberOfInstance + " instances");

    LoggingAreaTA.append("Project has " + lNumberOfInstance + " in total\n");
    LoggingAreaTA.append("Project is loaded in " + lLoadedTime + " ms\n");
  } // GEN-LAST:event_ConnectKnowledgeBaseBtnMouseClicked
Ejemplo n.º 2
0
 private void BriefInfoBtnMouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_BriefInfoBtnMouseClicked
   // TODO add your handling code here:
   Collection colNumberOfInstance = kb.getInstances();
   long lNumberOfInstance = colNumberOfInstance.size();
   LoggingAreaTA.append("Project has " + lNumberOfInstance + " in total");
   LoggingAreaTA.append("Project is loaded in " + lLoadedTime + " ms");
 } // GEN-LAST:event_BriefInfoBtnMouseClicked
Ejemplo n.º 3
0
 public void loggingMessagesUpdate(String str) {
   if (bGUI) {
     LoggingAreaTA.append(str + "\n");
   } else {
     System.out.println(str);
   }
 }
Ejemplo n.º 4
0
  private void EvaluateJessRuleMouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_EvaluateJessRuleMouseClicked

    // Evaluate the jess rule.
    // Engine is created, now passing rules to the engine:
    String sRule = JessRuleArea.getText();
    String sResult = qThread.EvaluateJessRule(sRule);
    LoggingAreaTA.append(sResult + "\n");
  } // GEN-LAST:event_EvaluateJessRuleMouseClicked
Ejemplo n.º 5
0
 private void CountInstancesBtnMouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_CountInstancesBtnMouseClicked
   // TODO add your handling code here:
   LoggingAreaTA.append("Total: " + Long.toString(InstancesCount()) + " instances");
 } // GEN-LAST:event_CountInstancesBtnMouseClicked