public ProtegeOWLReasonerFactoryWrapper(ProtegeOWLReasonerInfo info) { this.info = info; this.reasonerFactory = info.getReasonerFactory(); }
public int compare(ProtegeOWLReasonerInfo ri1, ProtegeOWLReasonerInfo ri2) { boolean nullReasoner1 = ri1.getReasonerFactory() instanceof NoOpReasonerFactory; boolean nullReasoner2 = ri2.getReasonerFactory() instanceof NoOpReasonerFactory; if (nullReasoner1 && nullReasoner2) { return 0; } else if (nullReasoner1) { return 1; } else if (nullReasoner2) { return -1; } else { return ri1.getReasonerName().compareTo(ri2.getReasonerName()); } }
public int compare(ProtegeOWLReasonerInfo ri1, ProtegeOWLReasonerInfo ri2) { boolean nullReasoner1 = ri1.getReasonerFactory() instanceof NoOpReasonerFactory; boolean nullReasoner2 = ri2.getReasonerFactory() instanceof NoOpReasonerFactory; if (nullReasoner1 && nullReasoner2) { return 0; } else if (nullReasoner1) { return 1; } else if (nullReasoner2) { return -1; } else { return ri1.getReasonerName().compareTo(ri2.getReasonerName()); } }
public int compare(ProtegeOWLReasonerInfo ri1, ProtegeOWLReasonerInfo ri2) { boolean nullReasoner1 = ri1.getReasonerFactory() instanceof NoOpReasonerFactory; boolean nullReasoner2 = ri2.getReasonerFactory() instanceof NoOpReasonerFactory; if (nullReasoner1 && nullReasoner2) { return 0; } else if (nullReasoner1) { return 1; } else if (nullReasoner2) { return -1; } else { return ri1.getReasonerName().compareTo(ri2.getReasonerName()); } }
public int compare(ProtegeOWLReasonerInfo ri1, ProtegeOWLReasonerInfo ri2) { boolean nullReasoner1 = ri1.getReasonerFactory() instanceof NoOpReasonerFactory; boolean nullReasoner2 = ri2.getReasonerFactory() instanceof NoOpReasonerFactory; if (nullReasoner1 && nullReasoner2) { return 0; } else if (nullReasoner1) { return 1; } else if (nullReasoner2) { return -1; } else { return ri1.getReasonerName().compareTo(ri2.getReasonerName()); } }
public static OWLReasoner createReasoner(OWLOntology ontology, ProtegeOWLReasonerInfo info, ReasonerProgressMonitor monitor) { OWLReasonerFactory factory = info.getReasonerFactory(); OWLReasonerConfiguration configuration = info.getConfiguration(monitor); switch (info.getRecommendedBuffering()) { case BUFFERING: return factory.createReasoner(ontology, configuration); case NON_BUFFERING: return factory.createNonBufferingReasoner(ontology, configuration); default: throw new UnsupportedOperationException("Programmer error: missed a case " + info.getRecommendedBuffering()); } }
public ReasonerStatus getReasonerStatus() { synchronized (reasonerMap) { if (classificationInProgress) { return ReasonerStatus.INITIALIZATION_IN_PROGRESS; } if (currentReasonerFactory.getReasonerFactory() instanceof NoOpReasonerFactory) { return ReasonerStatus.NO_REASONER_FACTORY_CHOSEN; } else { OWLReasoner reasoner = getCurrentReasoner(); if (reasoner instanceof NoOpReasoner) { return ReasonerStatus.REASONER_NOT_INITIALIZED; } else if (!reasoner.isConsistent()) { return ReasonerStatus.INCONSISTENT; } else if (reasoner.getPendingChanges().isEmpty()) { return ReasonerStatus.INITIALIZED; } else { return ReasonerStatus.OUT_OF_SYNC; } } } }
public static OWLReasoner createReasoner(OWLOntology ontology, ProtegeOWLReasonerInfo info, ReasonerProgressMonitor monitor) { OWLReasonerFactory factory = info.getReasonerFactory(); OWLReasonerConfiguration configuration = info.getConfiguration(monitor); switch (info.getRecommendedBuffering()) { case BUFFERING: return factory.createReasoner(ontology, configuration); case NON_BUFFERING: return factory.createNonBufferingReasoner(ontology, configuration); default: throw new UnsupportedOperationException("Programmer error: missed a case " + info.getRecommendedBuffering()); } }
public static OWLReasoner createReasoner(OWLOntology ontology, ProtegeOWLReasonerInfo info, ReasonerProgressMonitor monitor) { OWLReasonerFactory factory = info.getReasonerFactory(); OWLReasonerConfiguration configuration = info.getConfiguration(monitor); switch (info.getRecommendedBuffering()) { case BUFFERING: return factory.createReasoner(ontology, configuration); case NON_BUFFERING: return factory.createNonBufferingReasoner(ontology, configuration); default: throw new UnsupportedOperationException("Programmer error: missed a case " + info.getRecommendedBuffering()); } }
public static OWLReasoner createReasoner(OWLOntology ontology, ProtegeOWLReasonerInfo info, ReasonerProgressMonitor monitor) { OWLReasonerFactory factory = info.getReasonerFactory(); OWLReasonerConfiguration configuration = info.getConfiguration(monitor); switch (info.getRecommendedBuffering()) { case BUFFERING: return factory.createReasoner(ontology, configuration); case NON_BUFFERING: return factory.createNonBufferingReasoner(ontology, configuration); default: throw new UnsupportedOperationException("Programmer error: missed a case " + info.getRecommendedBuffering()); } }
return ReasonerStatus.INITIALIZATION_IN_PROGRESS; if (currentReasonerFactory.getReasonerFactory() instanceof NoOpReasonerFactory) { return ReasonerStatus.NO_REASONER_FACTORY_CHOSEN;
return ReasonerStatus.INITIALIZATION_IN_PROGRESS; if (currentReasonerFactory.getReasonerFactory() instanceof NoOpReasonerFactory) { return ReasonerStatus.NO_REASONER_FACTORY_CHOSEN;
return ReasonerStatus.INITIALIZATION_IN_PROGRESS; if (currentReasonerFactory.getReasonerFactory() instanceof NoOpReasonerFactory) { return ReasonerStatus.NO_REASONER_FACTORY_CHOSEN;
public void run() { try { OWLModelManager p4Manager = owlEditorKit.getOWLModelManager(); successfulExplanation = phase01.run(p4Manager.getActiveOntology(), p4Manager.getOWLReasonerManager().getCurrentReasonerFactory().getReasonerFactory()); } catch (OWLOntologyCreationException oce) { ProtegeApplication.getErrorLog().logError(oce); } finally { dialog.dispose(); } if (successfulExplanation) { createGui(); } } }, "Protege Explanation Thread").start();
public ExplanationResult explain(OWLAxiom axiom) { OWLOntology activeOntology = getOWLModelManager().getActiveOntology(); OWLReasonerFactory rFactory = getOWLModelManager().getOWLReasonerManager().getCurrentReasonerFactory().getReasonerFactory(); OWLReasoner reasoner = getOWLModelManager().getOWLReasonerManager().getCurrentReasoner(); BlackBoxExplanation explain = new BlackBoxExplanation(activeOntology, rFactory, reasoner); Set<OWLAxiom> axioms = explain.getExplanation(getClassExpression(axiom)); AxiomListFrame frame = new AxiomListFrame(getOWLEditorKit()); frame.setRootObject(axioms); final OWLFrameList<Set<OWLAxiom>> frameList = new OWLFrameList<Set<OWLAxiom>>(getOWLEditorKit(), frame); frameList.setPreferredSize(new Dimension(800, 600)); frameList.refreshComponent(); ExplanationResult result = new ExplanationResult() { @Override public void dispose() { frameList.dispose(); } }; result.setLayout(new BorderLayout()); result.add(new JScrollPane(frameList), BorderLayout.CENTER); return result; }