Search in sources :

Example 1 with InferredPropertyAssertionGenerator

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);
    }
}
Also used : InferredSubClassAxiomGenerator(org.semanticweb.owlapi.util.InferredSubClassAxiomGenerator) InferredDataPropertyCharacteristicAxiomGenerator(org.semanticweb.owlapi.util.InferredDataPropertyCharacteristicAxiomGenerator) InferredEquivalentDataPropertiesAxiomGenerator(org.semanticweb.owlapi.util.InferredEquivalentDataPropertiesAxiomGenerator) InferredPropertyAssertionGenerator(org.semanticweb.owlapi.util.InferredPropertyAssertionGenerator) InferredObjectPropertyCharacteristicAxiomGenerator(org.semanticweb.owlapi.util.InferredObjectPropertyCharacteristicAxiomGenerator) InferredInverseObjectPropertiesAxiomGenerator(org.semanticweb.owlapi.util.InferredInverseObjectPropertiesAxiomGenerator) InferredAxiomGenerator(org.semanticweb.owlapi.util.InferredAxiomGenerator) ArrayList(java.util.ArrayList) InferredSubDataPropertyAxiomGenerator(org.semanticweb.owlapi.util.InferredSubDataPropertyAxiomGenerator) InferredEquivalentClassAxiomGenerator(org.semanticweb.owlapi.util.InferredEquivalentClassAxiomGenerator) OWLConversionException(uk.ac.ebi.spot.goci.exception.OWLConversionException) OWLOntology(org.semanticweb.owlapi.model.OWLOntology) InferredClassAssertionAxiomGenerator(org.semanticweb.owlapi.util.InferredClassAssertionAxiomGenerator) OWLAxiom(org.semanticweb.owlapi.model.OWLAxiom) OWLOntologyManager(org.semanticweb.owlapi.model.OWLOntologyManager) InferredSubObjectPropertyAxiomGenerator(org.semanticweb.owlapi.util.InferredSubObjectPropertyAxiomGenerator) InferredEquivalentObjectPropertyAxiomGenerator(org.semanticweb.owlapi.util.InferredEquivalentObjectPropertyAxiomGenerator) InferredOntologyGenerator(org.semanticweb.owlapi.util.InferredOntologyGenerator) OWLOntologyStorageException(org.semanticweb.owlapi.model.OWLOntologyStorageException)

Example 2 with InferredPropertyAssertionGenerator

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;
}
Also used : InferredSubClassAxiomGenerator(org.semanticweb.owlapi.util.InferredSubClassAxiomGenerator) InferredDataPropertyCharacteristicAxiomGenerator(org.semanticweb.owlapi.util.InferredDataPropertyCharacteristicAxiomGenerator) InferredEquivalentDataPropertiesAxiomGenerator(org.semanticweb.owlapi.util.InferredEquivalentDataPropertiesAxiomGenerator) InferredPropertyAssertionGenerator(org.semanticweb.owlapi.util.InferredPropertyAssertionGenerator) InferredObjectPropertyCharacteristicAxiomGenerator(org.semanticweb.owlapi.util.InferredObjectPropertyCharacteristicAxiomGenerator) InferredInverseObjectPropertiesAxiomGenerator(org.semanticweb.owlapi.util.InferredInverseObjectPropertiesAxiomGenerator) InferredAxiomGenerator(org.semanticweb.owlapi.util.InferredAxiomGenerator) ArrayList(java.util.ArrayList) InferredDisjointClassesAxiomGenerator(org.semanticweb.owlapi.util.InferredDisjointClassesAxiomGenerator) InferredSubDataPropertyAxiomGenerator(org.semanticweb.owlapi.util.InferredSubDataPropertyAxiomGenerator) InferredEquivalentClassAxiomGenerator(org.semanticweb.owlapi.util.InferredEquivalentClassAxiomGenerator) InferredClassAssertionAxiomGenerator(org.semanticweb.owlapi.util.InferredClassAssertionAxiomGenerator) OWLAxiom(org.semanticweb.owlapi.model.OWLAxiom) InferredSubObjectPropertyAxiomGenerator(org.semanticweb.owlapi.util.InferredSubObjectPropertyAxiomGenerator) InferredEquivalentObjectPropertyAxiomGenerator(org.semanticweb.owlapi.util.InferredEquivalentObjectPropertyAxiomGenerator)

Aggregations

ArrayList (java.util.ArrayList)2 OWLAxiom (org.semanticweb.owlapi.model.OWLAxiom)2 InferredAxiomGenerator (org.semanticweb.owlapi.util.InferredAxiomGenerator)2 InferredClassAssertionAxiomGenerator (org.semanticweb.owlapi.util.InferredClassAssertionAxiomGenerator)2 InferredDataPropertyCharacteristicAxiomGenerator (org.semanticweb.owlapi.util.InferredDataPropertyCharacteristicAxiomGenerator)2 InferredEquivalentClassAxiomGenerator (org.semanticweb.owlapi.util.InferredEquivalentClassAxiomGenerator)2 InferredEquivalentDataPropertiesAxiomGenerator (org.semanticweb.owlapi.util.InferredEquivalentDataPropertiesAxiomGenerator)2 InferredEquivalentObjectPropertyAxiomGenerator (org.semanticweb.owlapi.util.InferredEquivalentObjectPropertyAxiomGenerator)2 InferredInverseObjectPropertiesAxiomGenerator (org.semanticweb.owlapi.util.InferredInverseObjectPropertiesAxiomGenerator)2 InferredObjectPropertyCharacteristicAxiomGenerator (org.semanticweb.owlapi.util.InferredObjectPropertyCharacteristicAxiomGenerator)2 InferredPropertyAssertionGenerator (org.semanticweb.owlapi.util.InferredPropertyAssertionGenerator)2 InferredSubClassAxiomGenerator (org.semanticweb.owlapi.util.InferredSubClassAxiomGenerator)2 InferredSubDataPropertyAxiomGenerator (org.semanticweb.owlapi.util.InferredSubDataPropertyAxiomGenerator)2 InferredSubObjectPropertyAxiomGenerator (org.semanticweb.owlapi.util.InferredSubObjectPropertyAxiomGenerator)2 OWLOntology (org.semanticweb.owlapi.model.OWLOntology)1 OWLOntologyManager (org.semanticweb.owlapi.model.OWLOntologyManager)1 OWLOntologyStorageException (org.semanticweb.owlapi.model.OWLOntologyStorageException)1 InferredDisjointClassesAxiomGenerator (org.semanticweb.owlapi.util.InferredDisjointClassesAxiomGenerator)1 InferredOntologyGenerator (org.semanticweb.owlapi.util.InferredOntologyGenerator)1 OWLConversionException (uk.ac.ebi.spot.goci.exception.OWLConversionException)1