@Override public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology, new SimpleConfiguration()); }
@Override public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology, new SimpleConfiguration()); }
public static void getEntityDependencyMatrix(OWLOntology ontology) { OWLReasoner reasoner = new StructuralReasonerFactory().createNonBufferingReasoner(ontology);
/** * Given a string of a reasoner name from user input, return the reasoner factory. If the user * input is not valid, throw IllegalArgumentExcepiton. * * @param line the command line to use * @param allowEMR boolean specifying if EMR can be returned * @return OWLReasonerFactory if successful */ public static OWLReasonerFactory getReasonerFactory(CommandLine line, boolean allowEMR) { // ELK is the default reasoner String reasonerName = getDefaultValue(line, "reasoner", "ELK").trim().toLowerCase(); logger.info("Reasoner: " + reasonerName); if (reasonerName.equals("structural")) { return new org.semanticweb.owlapi.reasoner.structural.StructuralReasonerFactory(); } else if (reasonerName.equals("hermit")) { return new org.semanticweb.HermiT.ReasonerFactory(); } else if (reasonerName.equals("jfact")) { return new JFactFactory(); // Reason must change behavior with EMR, so not all commands can use it } else if (reasonerName.equals("emr") && allowEMR) { ElkReasonerFactory innerReasonerFactory = new org.semanticweb.elk.owlapi.ElkReasonerFactory(); return new ExpressionMaterializingReasonerFactory(innerReasonerFactory); } else if (reasonerName.equals("elk")) { return new org.semanticweb.elk.owlapi.ElkReasonerFactory(); } else { throw new IllegalArgumentException(String.format(invalidReasonerError, reasonerName)); } }
/** * Given an ontology, a set of upper-level IRIs, and a set of annotation properties, return a new * ontology with just those terms and their named descendants, their subclass relations, and the * selected annotations. The input ontology is not changed. * * @param inputOntology the ontology to extract from * @param upperIRIs these terms and their descendants will be copied * @param annotationProperties the annotation properties to copy; if null, all will be copied * @return a new ontology with the target terms and their named ancestors * @throws OWLOntologyCreationException on problems creating new ontology */ public static OWLOntology getDescendants( OWLOntology inputOntology, Set<IRI> upperIRIs, Set<OWLAnnotationProperty> annotationProperties) throws OWLOntologyCreationException { logger.debug("Extract with MIREOT ..."); OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory(); OWLReasoner reasoner = reasonerFactory.createReasoner(inputOntology); OWLOntologyManager outputManager = OWLManager.createOWLOntologyManager(); OWLOntology outputOntology = outputManager.createOntology(); Set<OWLEntity> upperEntities = OntologyHelper.getEntities(inputOntology, upperIRIs); for (OWLEntity entity : upperEntities) { OntologyHelper.copy(inputOntology, outputOntology, entity, annotationProperties); copyDescendants(reasoner, inputOntology, outputOntology, entity, annotationProperties); } return outputOntology; }
@Override public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology, new SimpleConfiguration()); }
@Override public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology, new SimpleConfiguration()); }
logger.debug("Extract with MIREOT ..."); OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory(); OWLReasoner reasoner = reasonerFactory.createReasoner(inputOntology);
@Override public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology, new SimpleConfiguration()); }
@Override public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology, new SimpleConfiguration()); }
reasonerFactory = new StructuralReasonerFactory(); break; default:
@Override public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology, new SimpleConfiguration()); }
@Override public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology, new SimpleConfiguration()); }
public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology, new SimpleConfiguration()); }
public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology, new SimpleConfiguration()); }
public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology, new SimpleConfiguration()); }
public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology, new SimpleConfiguration()); }