On 22/04/14 14:57, Joshua TAYLOR wrote:
On Tue, Apr 22, 2014 at 9:25 AM, Lebling, David (US SSA)
<[email protected]> wrote:
Do these Individuals have to explicitly import the referenced ontologies? The Models they
live in all have attached document managers that know about the ontologies. When you talk
about "inventing a URI for the ontology" it makes me think the Individuals,
which are effectively business objects, have to have, in the Model they live in, an
Ontology object. Is this the case?
I've been putting in explicit import triples, and the ontology triple we've been
discussing. (When writing to a text file I also but in a Base URI.) I find that if I
don't put in explicit imports, things seem to work fine, but any files I create by
writing out the Individuals, get dire warnings when opened by TopBraid Composer
("offering" to fix the file by adding explicit imports). TopBraid also seems to
insist that there be a Base URI. (I realize this isn't a TopBraid list, but I naively
assume TopBraid is written by people who know more about OWL than I do, so it makes me
nervous when this happens.) Should I just not be nervous?
There's a bit of difference between what you have to or don't have to
do with Jena models, and what's required in OWL ontologies. Though
there's an OntModel layer to make some of the ontology abstractions
nicer, and Jena's submodel concepts helps in working with ontology
imports, Jena models are really RDF-based. That means that if you've
got an OntModel with just the triple:
:JohnDoe :hasName "John Doe" .
it's OK. In OWL ontologies, however, it's actually required that all
the properties, etc., have declarations. So if you want a legal OWL
ontology, you actually need something more along the lines of (and I
may be missing some of the details here, but this is the general
idea):
:JohnDoe a owl:NamedIndividual .
:hasName a owl:DatatypeProperty .
:JohnDoe :hasName "John Doe" .
If you don't have those declarations in ontology, then you'll need to
import some ontology that does. E.g.,
_:ont a owl:Ontology .
_:ont owl:imports <http://example.org/namingOntology> .
:JohnDoe a owl:NamedIndividual . # if namingOntology declares
:JohnDoe, you won't need this triple here
:JohnDoe :hasName "John Doe" .
So yes, in general, if you've got an ontology O that declares some
vocabulary, then a dataset that's based on that vocabulary should
import O.
Hmm. There's two assumptions there which may not be warranted for
David's case but only he can tell.
Firstly, you are assuming that there is some value in having the data be
legal OWL/DL. A large part of the point of RDF is the whole open world
assumption. There is no need at the RDF level (or indeed OWL with RDF
semantics) to have every document be self contained in this way. This is
not about what Jena models allows it as about what RDF allows and what
OWL profile you need to support (if any).
Secondly, even if David needs OWL DL compliance somewhere it is not
clear that each named graph in a DataSet needs to be separately a
self-contained ontology. David seems to have a separate named graph for
each individual. I would suspect that he regards the ontology as being
the union of a set of those named graphs (might even be doing this via a
union-default in TDB). In which case perhaps it is only the Union that
needs to be DL compliant and have relevant import statements - not every
individual component graph (which may there just for data management
purposes).
Dave