All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarkparsia.modularity.PelletIncremantalReasonerFactory Maven / Gradle / Ivy

There is a newer version: 2.3.6-ansell
Show newest version
// Copyright (c) 2006 - 2008, Clark & Parsia, LLC. 
// This source code is available under the terms of the Affero General Public
// License v3.
//
// Please see LICENSE.txt for full license terms, including the availability of
// proprietary exceptions.
// Questions, comments, or requests for clarification: [email protected]

package com.clarkparsia.modularity;

import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.Set;

import org.kohsuke.MetaInfServices;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.profiles.OWLProfile;
import org.semanticweb.owlapi.profiles.OWLProfileRegistry;
import org.semanticweb.owlapi.reasoner.IllegalConfigurationException;
import org.semanticweb.owlapi.reasoner.OWLReasonerConfiguration;
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory;

import com.clarkparsia.modularity.io.IncrementalClassifierPersistence;
import com.clarkparsia.pellet.owlapiv3.PelletReasoner;


/**
 * 

* Title: *

*

* Description: *

*

* Copyright: Copyright (c) 2007 *

*

* Company: Clark & Parsia, LLC. *

* * @author Evren Sirin */ @MetaInfServices(org.semanticweb.owlapi.reasoner.OWLReasonerFactory.class) public class PelletIncremantalReasonerFactory implements OWLReasonerFactory { private static final PelletIncremantalReasonerFactory INSTANCE = new PelletIncremantalReasonerFactory(); /** * Returns a static factory instance that can be used to create reasoners. * * @return a static factory instance */ public static PelletIncremantalReasonerFactory getInstance() { return INSTANCE; } /** * {@inheritDoc} */ public String getReasonerName() { return "Pellet (Incremental)"; } public String toString() { return getReasonerName(); } public IncrementalClassifier createReasoner(InputStream is) throws IOException { return IncrementalClassifierPersistence.load( is ); } public IncrementalClassifier createReasoner(InputStream is, OWLOntology ontology) throws IOException { return IncrementalClassifierPersistence.load( is, ontology ); } public IncrementalClassifier createReasoner(PelletReasoner reasoner) { return new IncrementalClassifier( reasoner ); } /** * {@inheritDoc} */ public IncrementalClassifier createReasoner(OWLOntology ontology) { return new IncrementalClassifier( ontology ); } public IncrementalClassifier createReasoner(OWLOntology ontology, ModuleExtractor moduleExtractor) { return new IncrementalClassifier( ontology, moduleExtractor ); } /** * {@inheritDoc} */ public IncrementalClassifier createReasoner(OWLOntology ontology, OWLReasonerConfiguration config) throws IllegalConfigurationException { return new IncrementalClassifier( ontology, config ); } /** * {@inheritDoc} */ public IncrementalClassifier createNonBufferingReasoner(OWLOntology ontology) { return new IncrementalClassifier( ontology ); } /** * {@inheritDoc} */ public IncrementalClassifier createNonBufferingReasoner(OWLOntology ontology, OWLReasonerConfiguration config) throws IllegalConfigurationException { return new IncrementalClassifier( ontology, config ); } @Override public Set getSupportedProfiles() { return Collections.singleton(OWLProfileRegistry.getInstance().getProfile(OWLProfile.OWL2_DL)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy