I'm currently using SKOS API to build some kind of category tree,
these categories will be linked with skos:broader, but I want to know
when a category is broader of another via its transitive property (I
have to use broaderTransitive) and as far as I know SKOS API doesnt
apply transitiveProperty to skos:broaderTransitive (or symmetric to
skos:related).
I want to know if I'm missing something or it's not implemented yet.
For now I'm using this:
OWLDataFactory owlFactory =
manager.getOWLManger().getOWLDataFactory();
OWLTransitiveObjectPropertyAxiom transitiveBroader =
owlFactory.getOWLTransitiveObjectPropertyAxiom(
owlFactory.getOWLObjectProperty(IRI.create(baseSKOS +
"#broaderTransitive")));
OWLOntology ont =
manager.getOWLManger().getOntology(IRI.create(baseURI));
manager.getOWLManger().addAxiom(ont, transitiveBroader);
Thanks
Guillermo
Guillermo
--
You received this message because you are subscribed to the Google Groups "skos-dev" group.
To post to this group, send email to skos...@googlegroups.com.
To unsubscribe from this group, send email to skos-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/skos-dev?hl=en.
I don't really like to add transitivity like I'm adding it right now,
but I don't know how to import the SKOS ontology into mine.
Also, I may be wrong, but I think the example with reasoner [1] is
outdated, in my code it looks like this:
OWLReasoner owlReasoner = new
PelletReasoner(conv.getAsOWLOntology(dataSet),
BufferingMode.BUFFERING);
As you can see, all data the reasoner is getting is my ontology (and
not the manager), so I don't know how it could load the SKOS ontology.
Any idea will be well-welcome.
Thanks,
Guillermo
On 22 nov, 11:07, Simon Jupp <simon.j...@gmail.com> wrote:
> Hi Guillermo,
> You are absolutely correct, it's doesn't apply the transitivity. The reason
> is that
> this information already lives in the SKOS ontology in [1], so you just
> need to import
> that ontology into your SKOS vocabulary. If you don't want to do it like
> that, then
> explicitly adding the statement using the OWL API bridge, like you are
> doing, is the best way to do it.
>
> I had thought about re-constructing the SKOS ontology using the OWL API as
> part of the implementation,
> but figured there was title point given that all you needed to do was
> import/load the SKOS ontology from 1.
>
> Of course, if you want to do some querying along the transitive closure you
> will need a reasoner, like in example [2].
>
> Hope that helps,
> Simon
>
> 1 - RDF/OWL File <http://www.w3.org/TR/skos-reference/skos-owl1-dl.rdf>
> 2 -http://skosapi.svn.sourceforge.net/viewvc/skosapi/version_2/skosapi/s...
Cheers
Simon