To determine if a class does not have a named superclass, you could
use the SPARQL idiom for negation:
CONSTRUCT
{ ?cls ?cls rdfs:subClassOf owl:Thing . owl:Thing .
}
WHERE
{ ?cls a owl:Class .
OPTIONAL {?cls rdfs:subClassOf ?subc .} .
FILTER (!bound(?subc)) .
}
If you do this in a SPARQLMotion script, import the RDF from the
ontology you need to modify, apply the above construct query, then
write to a file.
-- Scott
On Jun 30, 3:18 pm, J-MAN <[email protected]> wrote:
> Thanks Holger, thats very helpful.
>
> Is there an easy way (sparql query) to determine if a class does not
> have a named superclass?
>
> -J
>
> On Jun 30, 3:51 pm, Holger Knublauch <[email protected]> wrote:
>
> > Hi J,
>
> > TopBraid does some background inferencing to infer extra superclass
> > triples. This makes sure that any class has at least one named
> > superclass, so that it can be reached from a tree traversal. You would
> > need to either re-implement this logic yourself, or activate
> > inferencing on sesame, or simply include the inference graph when you
> > export the TBC to Sesame. Making matters a bit more complicating, the
> > triple
>
> > owl:Thing rdfs:subClassOf rdfs:Resource
>
> > has been added by TopBraid into its system triples model, which is
> > also imported by any project but cannot easily be exported as well.
> > So, in this case I would recommend to replicate this same triple in
> > your own file before exporting to Sesame, from the form of owl:Thing.
>
> > Regards,
> > Holger
>
> > On Jun 30, 2009, at 12:39 PM, J-MAN wrote:
>
> > > We are using TopBraid to build ontologies and data for our
> > > application. We then move the data & onts to our sesame knowledge
> > > store.
>
> > > Our RDF works fine inside topbraid composer, but when we move it into
> > > our sesame store, we are having problems because owl:Thing is not
> > > being inferred as the base class.
>
> > > How do you infer a class is a direct subclass of owl:Thing? Without
> > > specifically asserting it?
>
> > > Any suggestions?
>
> > > Thanks
>
> > > -J
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---