transitive/symmetric properties

29 views
Skip to first unread message

Guillermo

unread,
Nov 22, 2011, 3:31:24 AM11/22/11
to skos-dev
Hi,

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

Simon Jupp

unread,
Nov 22, 2011, 5:07:41 AM11/22/11
to skos...@googlegroups.com
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


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.


Guillermo

unread,
Nov 23, 2011, 4:59:23 AM11/23/11
to skos...@googlegroups.com
Hi again, 

I finally figured how to import the SKOS ontology into my ontology, later today I will post a commented example.

Guillermo.

Guillermo

unread,
Nov 22, 2011, 4:42:38 PM11/22/11
to skos-dev
Hi Simon, thanks for the response

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

[1] - http://skosapi.svn.sourceforge.net/viewvc/skosapi/version_2/skosapi/src/examples/ReadInferredSKOS.java?view=markup

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...

Simon Jupp

unread,
Nov 23, 2011, 5:09:01 AM11/23/11
to skos-dev
Great, I noticed my examples are a little out of date. I will try and
update them.
If you have an example for the importing and reasoning I will gladly
put it on the docs page.

Cheers
Simon

Guillermo

unread,
Nov 23, 2011, 7:26:10 AM11/23/11
to skos...@googlegroups.com
Hi, 

I have finished my example and commented the interesting parts of it, feel free to give me your opinion.

I could clean up a bit the code if you want to put it on the docs page, or feel free to change it to your liking.

Guillermo
MyExample.java
Reply all
Reply to author
Forward
0 new messages