コード例 #1
0
 private Object calculateSLAParameter() {
   float res = -1;
   try {
     factory.disableAll();
     factory.getImp("Calculate" + parameterName).enable();
     MonitoringMain.display("[SLAont] applying rule Calculate" + parameterName + "...");
     bridge.infer();
     Result result = bridge.getQueryResult("Calculate" + parameterName);
     return result.getDatatypeValue("?x").toString();
   } catch (Throwable e) {
     e.printStackTrace();
     return -1;
   }
 }
コード例 #2
0
  public SWRLTableModel(OWLModel owlModel) {
    this.owlModel = owlModel;
    factory = new SWRLFactory(owlModel);

    for (Object o : factory.getImps()) if (o instanceof SWRLImp) imps.add((SWRLImp) o);

    sortImps();
    initListeners();
  }
コード例 #3
0
 private void addReferencingImps(RDFResource rdfResource) {
   for (SWRLImp imp : factory.getImps()) if (isSuitable(imp)) imps.add(imp);
 } // addReferencingImps