Discussion:
[protege-user] How to save the 'Subclass of (Anonymous Ancestor)' field?
Hai Doan-Nguyen
2015-02-10 19:54:17 UTC
Permalink
Dear list,

I'm using Protege 5 for Windows. I need to save the 'Subclass of
(Anonymous Ancestor)' field of an ontology (don't ask me why :-)), but
don't know how, despite my intensive search in the documents and the
Web. Could someone help me with this please? Below is an example:

Class Person is a subclass of 'hasName some Name'.
Class Woman is a subclass of Person.

The Description view of Woman gives you:

Subclass of (Anonymous Ancestor)
hasName some Name

I need this statement output in a saved text file, but there is no
option in Protege for doing this. Here is the OWL file:

<owl:ObjectProperty rdf:about="Test#hasName"/>

<owl:Class rdf:about="Test#Name"/>

<owl:Class rdf:about="Test#Person">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="Test#hasName"/>
<owl:someValuesFrom rdf:resource="Test#Name"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>

<owl:Class rdf:about="Test#Woman">
<rdfs:subClassOf rdf:resource="Test#Person"/>
</owl:Class>

Specifically, I want to have the portion

<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="Test#hasName"/>
<owl:someValuesFrom rdf:resource="Test#Name"/>
</owl:Restriction>
</rdfs:subClassOf>

or something equivalent to it in contents, inserted in the entry of Woman.

Thanks in advance,

Hai
Matthew Horridge
2015-02-20 10:52:56 UTC
Permalink
Hi Hai,

Are you saying that you want to programmatically manipulate the ontology? If so, I suggest you take a look at the OWL API and itÂ’s documentation. Protege is based upon the OWL API, which it uses to do the kinds of things that you want to do.

There is some documentation here:

https://github.com/owlcs/owlapi/wiki/_pages <https://github.com/owlcs/owlapi/wiki/_pages>

Cheers,

Matthew
Post by Hai Doan-Nguyen
Dear list,
Class Person is a subclass of 'hasName some Name'.
Class Woman is a subclass of Person.
Subclass of (Anonymous Ancestor)
hasName some Name
<owl:ObjectProperty rdf:about="Test#hasName"/>
<owl:Class rdf:about="Test#Name"/>
<owl:Class rdf:about="Test#Person">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="Test#hasName"/>
<owl:someValuesFrom rdf:resource="Test#Name"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="Test#Woman">
<rdfs:subClassOf rdf:resource="Test#Person"/>
</owl:Class>
Specifically, I want to have the portion
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="Test#hasName"/>
<owl:someValuesFrom rdf:resource="Test#Name"/>
</owl:Restriction>
</rdfs:subClassOf>
or something equivalent to it in contents, inserted in the entry of Woman.
Thanks in advance,
Hai
_______________________________________________
protege-user mailing list
https://mailman.stanford.edu/mailman/listinfo/protege-user
Hai Doan-Nguyen
2015-02-20 15:56:51 UTC
Permalink
Post by Matthew Horridge
Hi Hai,
Are you saying that you want to programmatically manipulate the
ontology? If so, I suggest you take a look at the OWL API and it's
documentation. Protege is based upon the OWL API, which it uses to do
the kinds of things that you want to do.
https://github.com/owlcs/owlapi/wiki/_pages
Cheers,
Matthew
Thanks a lot Matthew. You are right, I'm using the ontology in a project
that I write in Java. At first, I liked to have the things exported by
Protege, so that I would not need to write code to get them. However, as
it seems there is no such export (Why don't you add it to Protege?), I
have written some code for it.

Happy Lunar Year!

Hai
Post by Matthew Horridge
Post by Hai Doan-Nguyen
Dear list,
I'm using Protege 5 for Windows. I need to save the 'Subclass of
(Anonymous Ancestor)' field of an ontology (don't ask me why :-)),
but don't know how, despite my intensive search in the documents and
Class Person is a subclass of 'hasName some Name'.
Class Woman is a subclass of Person.
Subclass of (Anonymous Ancestor)
hasName some Name
I need this statement output in a saved text file, but there is no
<owl:ObjectProperty rdf:about="Test#hasName"/>
<owl:Class rdf:about="Test#Name"/>
<owl:Class rdf:about="Test#Person">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="Test#hasName"/>
<owl:someValuesFrom rdf:resource="Test#Name"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="Test#Woman">
<rdfs:subClassOf rdf:resource="Test#Person"/>
</owl:Class>
Specifically, I want to have the portion
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="Test#hasName"/>
<owl:someValuesFrom rdf:resource="Test#Name"/>
</owl:Restriction>
</rdfs:subClassOf>
or something equivalent to it in contents, inserted in the entry of Woman.
Thanks in advance,
Hai
_______________________________________________
protege-user mailing list
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
https://mailman.stanford.edu/mailman/listinfo/protege-user
Loading...