Skip to topic | Skip to bottom
Home

Tesi
Tesi.ProveJenar1.11 - 28 Jan 2011 - 13:06 - FrancescoPoggitopic end

Start of topic | Skip to actions

Jena API

Ritorna al diario di bordo.

Riferimenti e commenti

Jena:

  • Jena RDF API.
  • Jena Ontology API. Note:
    • In RDF un letterale non puņ essere soggetto di uno statement, per cui in OWL le datatype property non possono essere transitive nč simmetriche.
    • Le Jena Ontology API sono language-neutral: č presente un profilo per ogni ontology language (RDFS, OWL, DAML...).
    • ProfileRegistry: provides a means to map between the URI's that represent ontology languages and their language profiles.
    • OntModelSpec: encapsulates a description of the components of an ontology model, including the storage scheme, reasoner and language profile.
    • OntDocumentManager: assists with the processing and handling of documents-related concerns, providing services for managing ontology documents, including loading imported documents, and locally caching documents from resolvable URL's to improve load performance.
  • Jena 2 Inference support.

Definizione ontologia:

Jena Classes

Model: An RDF Model. An RDF model is a set of Statements. Methods are provided for creating resources, properties and literals and the Statements which link them, for adding statements to and removing them from a model, for querying a model and set operations for combining models.

InfModel extends Model: An extension to the normal Model interface that supports access to any underlying inference capability. In Jena the primary use of inference is to generate additional entailments from a set of RDF data. These entailments just appear as additional RDF data in the inferred model and are accessed through the normal API.

OntModel extends InfModel: An enhanced view of a Jena model that is known to contain ontology data, under a given ontology (such as OWL). This class does not by itself compute the deductive extension of the graph under the semantic rules of the language. Instead, we wrap an underlying model with this ontology interface, that presents a convenience syntax for accessing the language elements. Depending on the inference capability of the underlying model, the OntModel will appear to contain more or less triples. For example, if this class is used to wrap a plain memory or database model, only the relationships asserted by the document will be reported through this convenience API. Alternatively, if the OntModel? wraps an OWL inferencing model, the inferred triples from the extension will be reported as well.

Default settings:

  • OWL-Full language
  • in-memory storage
  • RDFS inference, which principally produces entailments from the sub-class and sub-property hierarchies.

OntModelSpec: Encapsulates a description of the components of an ontology model, including the storage scheme, reasoner and language profile.

OntDocumentManager: Provides services for managing and processing ontology documents, including loading imported documents, and locally caching documents from resolvable URL's to improve load performance.

OntResource extends Resource: Provides a common super-type for all of the abstractions in this ontology representation package. All of the classes in the ontology API that represent ontology values have OntResource? as a common super-class.

ARQ Classes

La classe QueryExecution? ha il metodo execSelect() per eseguire una query SPARQL. Questo metodo ritorna un oggetto di tipo ResulSet?, che permette di esaminare il risultato della query. Il ResultSet? č consultabile fino a che non si applica il metodo close() di QueryExecution?, che libera tutte le risorse coinvolte nella query, fra cui anche il ResultSet?.

Puņ essere problematico ritornare un ResultSet? come risultato di un metodo che esegue una query. E' ipotizzabile restituire un nuovo modello, o un array di stringhe.

Note

Errore nel Javadoc di del metodo createResource della classe com.hp.hpl.jena.rdf.model.Model:

   public Resource createResource( String uri ) ;

   /**
        Create a property with a given URI composed from a namespace part and a
        localname part by concatenating the strings.
    <p>
        This method may return an existing property with the correct URI and model, or it
        may construct a fresh one, as it sees fit.
    <p>
        Subsequent operations on the returned property may modify this model.
      @param nameSpace the nameSpace of the property
      @param localName the name of the property within its namespace
      @return a property instance
   */

Si fa riferimento sempre a una proprietą mentre si tratta invece di una risorsa.
to top


Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Fabio's Wiki? Send feedback