/** * Default constructor. It only includes the InferredEquivalentClassAxiomGenerator and * InferredSubClassAxiomGenerator generators * @param reasoner */ public AdaptedInferredOntologyGenerator(OWLReasoner reasoner) { this.reasoner = reasoner; axiomGenerators = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); axiomGenerators.add(new InferredEquivalentClassAxiomGenerator()); axiomGenerators.add(new InferredSubClassAxiomGenerator()); }
/** * {@see InferredAxiomGenerator}s to use for the classify() reasoning method. * * Subclasses may want to change this. * * @return */ protected List<InferredAxiomGenerator<? extends OWLAxiom>> getClassifyAxiomGenerators() { List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); gens.add(new InferredClassAssertionAxiomGenerator()); gens.add(new InferredSubClassAxiomGenerator()); gens.add(new InferredEquivalentClassAxiomGenerator()); gens.add(new InferredDisjointClassesAxiomGenerator()); return gens; }
public InferredOntologyGenerator(OWLReasoner reasoner) { this.reasoner = reasoner; axiomGenerators = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); axiomGenerators.add(new InferredClassAssertionAxiomGenerator()); axiomGenerators.add(new InferredDataPropertyCharacteristicAxiomGenerator()); axiomGenerators.add(new InferredEquivalentClassAxiomGenerator()); axiomGenerators.add(new InferredEquivalentDataPropertiesAxiomGenerator()); axiomGenerators.add(new InferredEquivalentObjectPropertyAxiomGenerator()); axiomGenerators.add(new InferredInverseObjectPropertiesAxiomGenerator()); axiomGenerators.add(new InferredObjectPropertyCharacteristicAxiomGenerator()); axiomGenerators.add(new InferredPropertyAssertionGenerator()); axiomGenerators.add(new InferredSubClassAxiomGenerator()); axiomGenerators.add(new InferredSubDataPropertyAxiomGenerator()); axiomGenerators.add(new InferredSubObjectPropertyAxiomGenerator()); }
protected Set<OWLAxiom> turnHierarchyIntoAxioms(OWLReasoner r) { long t = System.currentTimeMillis(); // from Ernesto List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); gens.add(new InferredSubClassAxiomGenerator()); gens.add(new InferredEquivalentClassAxiomGenerator()); OWLOntology inferredOntology; try { inferredOntology = manager.createOntology(); InferredOntologyGenerator iog = null; iog = new InferredOntologyGenerator(r, gens); iog.fillOntology(manager, inferredOntology); t = System.currentTimeMillis() - t; LogOutput.print(t + "ms for the hierarchy rewriting"); return inferredOntology.getAxioms(); } catch (OWLOntologyCreationException e) { e.printStackTrace(); return null; } }
/** * {@see InferredAxiomGenerator}s to use for the enrich() reasoning method. * * Subclasses may want to change this. * * @return */ protected List<InferredAxiomGenerator<? extends OWLAxiom>> getEnrichAxiomGenerators() { List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); // Classes gens.add(new InferredClassAssertionAxiomGenerator()); gens.add(new InferredSubClassAxiomGenerator()); gens.add(new InferredEquivalentClassAxiomGenerator()); gens.add(new InferredDisjointClassesAxiomGenerator()); // data properties gens.add(new InferredDataPropertyCharacteristicAxiomGenerator()); gens.add(new InferredEquivalentDataPropertiesAxiomGenerator()); gens.add(new InferredSubDataPropertyAxiomGenerator()); // object properties gens.add(new InferredEquivalentObjectPropertyAxiomGenerator()); gens.add(new InferredInverseObjectPropertiesAxiomGenerator()); gens.add(new InferredObjectPropertyCharacteristicAxiomGenerator()); gens.add(new InferredSubObjectPropertyAxiomGenerator()); // individuals gens.add(new InferredClassAssertionAxiomGenerator()); gens.add(new InferredPropertyAssertionGenerator()); return gens; }
public void printHierarchy(File outputFile) throws FileNotFoundException, OWLOntologyCreationException, OWLOntologyStorageException { classifyClasses(); // To generate an inferred ontology we use implementations of inferred // axiom generators List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); gens.add(new InferredSubClassAxiomGenerator()); gens.add(new InferredEquivalentClassAxiomGenerator()); // Put the inferred axioms into a fresh empty ontology. OWLOntologyManager man = OWLManager.createOWLOntologyManager(); OWLOntology infOnt = man.createOntology(); InferredOntologyGenerator iog = null; iog = new InferredOntologyGenerator(owl2reasoner, gens); iog.fillOntology(man, infOnt); // Save the inferred ontology. OWLOntologyFormat format = new OWLFunctionalSyntaxOntologyFormat(); man.saveOntology(infOnt, format, IRI.create(outputFile.toURI())); }
public void printHierarchy(File outputFile) throws FileNotFoundException, OWLOntologyCreationException, OWLOntologyStorageException { classifyClasses(); // To generate an inferred ontology we use implementations of inferred // axiom generators List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>(); gens.add(new InferredSubClassAxiomGenerator()); gens.add(new InferredEquivalentClassAxiomGenerator()); // Put the inferred axioms into a fresh empty ontology. OWLOntologyManager man = OWLManager.createOWLOntologyManager(); OWLOntology infOnt = man.createOntology(); InferredOntologyGenerator iog = null; switch (classified) { case classifiedWithElk: iog = new InferredOntologyGenerator(lReasoner, gens); break; case classifiedWithOWL2Reasoner: iog = new InferredOntologyGenerator(owl2reasoner, gens); break; default: LogOutput.printAlways("Classification not yet computed"); } iog.fillOntology(man, infOnt); // Save the inferred ontology. OWLOntologyFormat format = new OWLFunctionalSyntaxOntologyFormat(); man.saveOntology(infOnt, format, IRI.create(outputFile.toURI())); }
generators.add(new InferredEquivalentClassAxiomGenerator()); generators.add(new InferredEquivalentDataPropertiesAxiomGenerator()); generators.add(new InferredEquivalentObjectPropertyAxiomGenerator());
private static List<InferredAxiomGenerator<? extends OWLAxiom>> generators() { return CollectionFactory.<InferredAxiomGenerator<? extends OWLAxiom>>list( new InferredClassAssertionAxiomGenerator(), new InferredDataPropertyCharacteristicAxiomGenerator(), new InferredEquivalentClassAxiomGenerator(), new InferredEquivalentDataPropertiesAxiomGenerator(), new InferredEquivalentObjectPropertyAxiomGenerator(), new InferredInverseObjectPropertiesAxiomGenerator(), new InferredObjectPropertyCharacteristicAxiomGenerator(), new InferredPropertyAssertionGenerator(), new InferredSubClassAxiomGenerator(), new InferredSubDataPropertyAxiomGenerator(), new InferredSubObjectPropertyAxiomGenerator()); }
private static List<InferredAxiomGenerator<? extends OWLAxiom>> generators() { return CollectionFactory.<InferredAxiomGenerator<? extends OWLAxiom>>list( new InferredClassAssertionAxiomGenerator(), new InferredDataPropertyCharacteristicAxiomGenerator(), new InferredEquivalentClassAxiomGenerator(), new InferredEquivalentDataPropertiesAxiomGenerator(), new InferredEquivalentObjectPropertyAxiomGenerator(), new InferredInverseObjectPropertiesAxiomGenerator(), new InferredObjectPropertyCharacteristicAxiomGenerator(), new InferredPropertyAssertionGenerator(), new InferredSubClassAxiomGenerator(), new InferredSubDataPropertyAxiomGenerator(), new InferredSubObjectPropertyAxiomGenerator()); }
private static List<InferredAxiomGenerator<? extends OWLAxiom>> generators() { return CollectionFactory.<InferredAxiomGenerator<? extends OWLAxiom>>list( new InferredClassAssertionAxiomGenerator(), new InferredDataPropertyCharacteristicAxiomGenerator(), new InferredEquivalentClassAxiomGenerator(), new InferredEquivalentDataPropertiesAxiomGenerator(), new InferredEquivalentObjectPropertyAxiomGenerator(), new InferredInverseObjectPropertiesAxiomGenerator(), new InferredObjectPropertyCharacteristicAxiomGenerator(), new InferredPropertyAssertionGenerator(), new InferredSubClassAxiomGenerator(), new InferredSubDataPropertyAxiomGenerator(), new InferredSubObjectPropertyAxiomGenerator()); }
public ExportInferredOntologyPanel() { map = new HashMap<>(); checkBoxBox = new Box(BoxLayout.Y_AXIS); setLayout(new BorderLayout(7, 7)); add(checkBoxBox); addCheckBox(new InferredSubClassAxiomGenerator(), true, false); addCheckBox(new InferredEquivalentClassAxiomGenerator(), true, false); addCheckBox(new InferredSubObjectPropertyAxiomGenerator(), true, false); addCheckBox(new InferredSubDataPropertyAxiomGenerator(), true, false); addCheckBox(new InferredEquivalentObjectPropertyAxiomGenerator(), true, false); addCheckBox(new InferredEquivalentDataPropertiesAxiomGenerator(), true, false); addCheckBox(new InferredObjectPropertyCharacteristicAxiomGenerator(), false, false); addCheckBox(new InferredDataPropertyCharacteristicAxiomGenerator(), false, false); addCheckBox(new InferredInverseObjectPropertiesAxiomGenerator(), false, false); addCheckBox(new InferredClassAssertionAxiomGenerator(), false, false); addCheckBox(new InferredPropertyAssertionGenerator(), false, true); addCheckBox(new InferredDisjointClassesAxiomGenerator(), false, true); }
public ExportInferredOntologyPanel() { map = new HashMap<JCheckBox, InferredAxiomGenerator<? extends OWLAxiom>>(); checkBoxBox = new Box(BoxLayout.Y_AXIS); setLayout(new BorderLayout(7, 7)); add(checkBoxBox); addCheckBox(new InferredSubClassAxiomGenerator()); addCheckBox(new InferredEquivalentClassAxiomGenerator()); addCheckBox(new InferredSubObjectPropertyAxiomGenerator()); addCheckBox(new InferredSubDataPropertyAxiomGenerator()); addCheckBox(new InferredEquivalentObjectPropertyAxiomGenerator()); addCheckBox(new InferredEquivalentDataPropertiesAxiomGenerator()); addCheckBox(new InferredObjectPropertyCharacteristicAxiomGenerator()); addCheckBox(new InferredDataPropertyCharacteristicAxiomGenerator()); addCheckBox(new InferredInverseObjectPropertiesAxiomGenerator()); addCheckBox(new InferredClassAssertionAxiomGenerator()); addCheckBox(new InferredDisjointClassesAxiomGenerator()); addCheckBox(new InferredPropertyAssertionGenerator()); }
public ExportInferredOntologyPanel() { map = new HashMap<>(); checkBoxBox = new Box(BoxLayout.Y_AXIS); setLayout(new BorderLayout(7, 7)); add(checkBoxBox); addCheckBox(new InferredSubClassAxiomGenerator(), true, false); addCheckBox(new InferredEquivalentClassAxiomGenerator(), true, false); addCheckBox(new InferredSubObjectPropertyAxiomGenerator(), true, false); addCheckBox(new InferredSubDataPropertyAxiomGenerator(), true, false); addCheckBox(new InferredEquivalentObjectPropertyAxiomGenerator(), true, false); addCheckBox(new InferredEquivalentDataPropertiesAxiomGenerator(), true, false); addCheckBox(new InferredObjectPropertyCharacteristicAxiomGenerator(), false, false); addCheckBox(new InferredDataPropertyCharacteristicAxiomGenerator(), false, false); addCheckBox(new InferredInverseObjectPropertiesAxiomGenerator(), false, false); addCheckBox(new InferredClassAssertionAxiomGenerator(), false, false); addCheckBox(new InferredPropertyAssertionGenerator(), false, true); addCheckBox(new InferredDisjointClassesAxiomGenerator(), false, true); }
public ExportInferredOntologyPanel() { map = new HashMap<JCheckBox, InferredAxiomGenerator<? extends OWLAxiom>>(); checkBoxBox = new Box(BoxLayout.Y_AXIS); setLayout(new BorderLayout(7, 7)); add(checkBoxBox); addCheckBox(new InferredSubClassAxiomGenerator()); addCheckBox(new InferredEquivalentClassAxiomGenerator()); addCheckBox(new InferredSubObjectPropertyAxiomGenerator()); addCheckBox(new InferredSubDataPropertyAxiomGenerator()); addCheckBox(new InferredEquivalentObjectPropertyAxiomGenerator()); addCheckBox(new InferredEquivalentDataPropertiesAxiomGenerator()); addCheckBox(new InferredObjectPropertyCharacteristicAxiomGenerator()); addCheckBox(new InferredDataPropertyCharacteristicAxiomGenerator()); addCheckBox(new InferredInverseObjectPropertiesAxiomGenerator()); addCheckBox(new InferredClassAssertionAxiomGenerator()); addCheckBox(new InferredDisjointClassesAxiomGenerator()); addCheckBox(new InferredPropertyAssertionGenerator()); }