[Pellet-users] What are the differences in using the different interfaces (i.e. Pellet API, OWL API, Jena API) to a
Michael Smith
msmith at clarkparsia.com
Tue May 27 13:40:18 UTC 2008
On Tue, 2008-05-27 at 16:18 +0800, Koh Shu Lin wrote:
> I'm very new to PELLET. Currently I'm looking into the PELLET
> examples, and I've found that there are many ways that one can create
> an instance of a reasoner (i.e. using OWL API, Pellet API, JENA API).
> But what I'm interested is on Pellet, but not Jena. Can anyone explain
> to me what are the differences in the following statements in creating
> reasoners? And how do I decide when to use which APIs?
This is largely based on developer preference and the "view" of the
data you prefer to have. Some personal views...
Jena is an RDF framework and presents a triple-based view of the data.
This view can be cumbersome for some OWL constructs which are not
cleanly mapped to triples (such as value restrictions). The OntModel
interface hides some of these constructs from the application.
The OWL API provides a DL view of the data. The interface intentionally
mirrors the OWL 2 functional syntax and is generally more object
oriented that the Jena framework.
The Pellet (ATerm) API is not intended to be a public interface and we
generally discourage end users from developing against it. All of the
features it contains should exist in the other interfaces.
There are some additional technical factors to consider:
+ Pellet supports SPARQL query answering with ARQ, which integrates with
the Jena framework. There is not an OWL API based SPARQL solution (this
reflects that SPARQL is an RDF query language, not a DL query language).
+ The OWL API supports I/O using some of the less common OWL concrete
syntaxes that are not RDF based. This includes the reader friendly
Manchester syntax and the machine friendly OWL XML syntax.
> Example 1 (Pellet API):
>
> ModelReader reader = new ModelReader();
> Model model = reader.read( mindswappers );
> // load the model to the reasoner
> OWLReasoner reasoner = new OWLReasoner();
This is another view of the Jena API, not the Pellet API.
> Example 2 (OWL API):
>
> OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
> OWLDataFactory factory = manager.getOWLDataFactory();
> OWLOntology ontology =
> manager.loadOntology( URI.create( mindswappers ) );
> Reasoner reasoner = new Reasoner( manager );
>
> Example 3 (Jena API):
>
> import com.hp.hpl.jena.reasoner.Reasoner;
>
> Reasoner reasoner = PelletReasonerFactory.theInstance().create();
--
Mike Smith
Clark & Parsia
More information about the Pellet-users
mailing list