use of org.semanticweb.owlapi.util.InferredPropertyAssertionGenerator in project goci by EBISPOT.
the class DefaultGWASOWLPublisher method saveGWASDataInferredView.
public void saveGWASDataInferredView(OWLReasoner reasoner, File outputFile) throws OWLConversionException {
try {
// create new ontology to hold inferred axioms
OWLOntology inferredOntology = getConverter().createConversionOntology();
getLog().info("Saving inferred view...");
List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<InferredAxiomGenerator<? extends OWLAxiom>>();
// we require all inferred stuff except for disjoints...
gens.add(new InferredClassAssertionAxiomGenerator());
gens.add(new InferredDataPropertyCharacteristicAxiomGenerator());
gens.add(new InferredEquivalentClassAxiomGenerator());
gens.add(new InferredEquivalentDataPropertiesAxiomGenerator());
gens.add(new InferredEquivalentObjectPropertyAxiomGenerator());
gens.add(new InferredInverseObjectPropertiesAxiomGenerator());
gens.add(new InferredObjectPropertyCharacteristicAxiomGenerator());
gens.add(new InferredPropertyAssertionGenerator());
gens.add(new InferredSubClassAxiomGenerator());
gens.add(new InferredSubDataPropertyAxiomGenerator());
gens.add(new InferredSubObjectPropertyAxiomGenerator());
// now create the target ontology and save
OWLOntologyManager inferredManager = inferredOntology.getOWLOntologyManager();
InferredOntologyGenerator iog = new InferredOntologyGenerator(reasoner, gens);
iog.fillOntology(inferredManager, inferredOntology);
inferredManager.saveOntology(inferredOntology, IRI.create(outputFile));
getLog().info("Inferred view saved ok");
} catch (OWLOntologyStorageException e) {
throw new OWLConversionException("Failed to save GWAS data (inferred view)", e);
}
}
use of org.semanticweb.owlapi.util.InferredPropertyAssertionGenerator in project stanbol by apache.
the class AbstractOWLApiReasoningService method getEnrichAxiomGenerators.
/**
* {@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;
}
Aggregations