Generating blank nodes with genid in Protege desktop

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating blank nodes with genid in Protege desktop

MihalyF
Dear all,

Apparently I have a really bad memory, so that's the reason I'm troubling
you with my question now.

I made an ontology in the last autumn with a good amount of class
restrictions and I need to modify that ontology now. The structure of the
turtle file identifies the class restrictions with auto generated _:genid,
and I'm quite sure about that I created that in Protege v. 5.5 beta-5

What troubles me is that when I open the ontology now in Protege, it opens
correctly and after I edit the ontology and save back then the updated
turtle file content transformed into a structure without genids. It means
that Protege removes all the blank node ids, not just the id of the new
assertions.

When I try to reproduce a new ontology where the class restriction is
represented by a blank node id Protege never will generate a blank node Id
(genid), so I'm getting quite confused how did I manage to create genid's
earlier with Protege. :(
Perhaps there is a Protegge OWL API setting I'm missing, but I was not able
to find any.

- An example part of the earlier generated turtle with genid's :
# Generated by the OWL API (version 4.5.6.2018-09-06T00:27:41Z)
https://github.com/owlcs/owlapi

rdl:P101011775 rdfs:subClassOf _:genid1 .

_:genid1 a owl:Restriction ;
        owl:onProperty rdl:P101011634 ;
        owl:someValuesFrom _:genid2 .

_:genid2 a owl:Class ;
        owl:oneOf _:genid12 .

_:genid12 a rdf:List ;
        rdf:first rdl:P101011681 ;
        rdf:rest _:genid11 .

_:genid11 a rdf:List ;
        rdf:first rdl:P101011682 ;
        rdf:rest _:genid10 .

_:genid10 a rdf:List ;
        rdf:first rdl:P101011683 ;
        rdf:rest _:genid9 .

_:genid9 a rdf:List ;
        rdf:first rdl:P101011684 ;
        rdf:rest _:genid8 .

_:genid8 a rdf:List ;
        rdf:first rdl:P101011685 ;
        rdf:rest _:genid7 .

_:genid7 a rdf:List ;
        rdf:first rdl:P101011686 ;
        rdf:rest _:genid6 .

_:genid6 a rdf:List ;
        rdf:first rdl:P101011687 ;
        rdf:rest _:genid5 .

_:genid5 a rdf:List ;
        rdf:first rdl:P101011688 ;
        rdf:rest _:genid4 .

_:genid4 a rdf:List ;
        rdf:first rdl:P101011689 ;
        rdf:rest _:genid3 .

_:genid3 a rdf:List ;
        rdf:first rdl:P101011690 ;
        rdf:rest rdf:nil .

...


- An example the latest generated test turtle without blank node id:
###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z)
https://github.com/owlcs/owlapi

:OWLClass_31807eb6_2468_4da4_b354_d584eebcc60a rdf:type owl:Class ;
                                               rdfs:subClassOf
:OWLClass_c96aa825_f85b_4521_be34_36b6d8d44d51 ,
                                                               [ rdf:type
owl:Restriction ;
                                                               
owl:onProperty :OWLDataProperty_09d55862_1236_487e_a909_47a3df16c8e7 ;
                                                               
owl:maxQualifiedCardinality "2"^^xsd:nonNegativeInteger ;
                                                               
owl:onDataRange owl:rational
                                                               ] ,
                                                               [ rdf:type
owl:Restriction ;
                                                               
owl:onProperty :OWLDataProperty_b2551c41_5d7b_4ba4_8f05_09637a9146cd ;
                                                               
owl:maxQualifiedCardinality "3"^^xsd:nonNegativeInteger ;
                                                               
owl:onDataRange owl:rational
                                                               ] ,
                                                               [ rdf:type
owl:Restriction ;
                                                               
owl:onProperty :OWLDataProperty_ef0d741f_a2ab_4d40_b026_9b0020c87f1d ;
                                                               
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                                                               
owl:onDataRange owl:rational
                                                               ] ;
                                               rdfs:label "testSubClass"@en
.


###
http://www.semanticweb.org/321365/ontologies/2019/1/untitled-ontology-114#OWLClass_c96aa825_f85b_4521_be34_36b6d8d44d51
:OWLClass_c96aa825_f85b_4521_be34_36b6d8d44d51 rdf:type owl:Class ;
                                               rdfs:label
"testSuperClass"@en .


###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z)
https://github.com/owlcs/owlapi


I really appreciate any suggestion or advice.

Cheers,
Mihaly



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating blank nodes with genid in Protege desktop

Lorenz B.
I do not fully understand your question.

You showed two Turtle snippets generated with different Protege (resp. OWL API) versions. So far so good.


But, both do contain different OWL constructs:

* The first contains an enumeration of classes in a property restriction, which is serialized in Turtle syntax via an RDF list. That's why there are blank nodes.

* The second shows a class being subclass of multiple property restrictions, but there is no need for a named blank node.


So what is unclear now?



Dear all,

Apparently I have a really bad memory, so that's the reason I'm troubling
you with my question now.

I made an ontology in the last autumn with a good amount of class
restrictions and I need to modify that ontology now. The structure of the
turtle file identifies the class restrictions with auto generated _:genid,
and I'm quite sure about that I created that in Protege v. 5.5 beta-5

What troubles me is that when I open the ontology now in Protege, it opens
correctly and after I edit the ontology and save back then the updated
turtle file content transformed into a structure without genids. It means
that Protege removes all the blank node ids, not just the id of the new
assertions.

When I try to reproduce a new ontology where the class restriction is
represented by a blank node id Protege never will generate a blank node Id
(genid), so I'm getting quite confused how did I manage to create genid's
earlier with Protege. :(
Perhaps there is a Protegge OWL API setting I'm missing, but I was not able
to find any.

- An example part of the earlier generated turtle with genid's :
# Generated by the OWL API (version 4.5.6.2018-09-06T00:27:41Z)
https://github.com/owlcs/owlapi

rdl:P101011775 rdfs:subClassOf _:genid1 .

_:genid1 a owl:Restriction ;
	owl:onProperty rdl:P101011634 ;
	owl:someValuesFrom _:genid2 .

_:genid2 a owl:Class ;
	owl:oneOf _:genid12 .

_:genid12 a rdf:List ;
	rdf:first rdl:P101011681 ;
	rdf:rest _:genid11 .

_:genid11 a rdf:List ;
	rdf:first rdl:P101011682 ;
	rdf:rest _:genid10 .

_:genid10 a rdf:List ;
	rdf:first rdl:P101011683 ;
	rdf:rest _:genid9 .

_:genid9 a rdf:List ;
	rdf:first rdl:P101011684 ;
	rdf:rest _:genid8 .

_:genid8 a rdf:List ;
	rdf:first rdl:P101011685 ;
	rdf:rest _:genid7 .

_:genid7 a rdf:List ;
	rdf:first rdl:P101011686 ;
	rdf:rest _:genid6 .

_:genid6 a rdf:List ;
	rdf:first rdl:P101011687 ;
	rdf:rest _:genid5 .

_:genid5 a rdf:List ;
	rdf:first rdl:P101011688 ;
	rdf:rest _:genid4 .

_:genid4 a rdf:List ;
	rdf:first rdl:P101011689 ;
	rdf:rest _:genid3 .

_:genid3 a rdf:List ;
	rdf:first rdl:P101011690 ;
	rdf:rest rdf:nil .

...


- An example the latest generated test turtle without blank node id:
###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z)
https://github.com/owlcs/owlapi

:OWLClass_31807eb6_2468_4da4_b354_d584eebcc60a rdf:type owl:Class ;
                                               rdfs:subClassOf
:OWLClass_c96aa825_f85b_4521_be34_36b6d8d44d51 ,
                                                               [ rdf:type
owl:Restriction ;
                                                                
owl:onProperty :OWLDataProperty_09d55862_1236_487e_a909_47a3df16c8e7 ;
                                                                
owl:maxQualifiedCardinality "2"^^xsd:nonNegativeInteger ;
                                                                
owl:onDataRange owl:rational
                                                               ] ,
                                                               [ rdf:type
owl:Restriction ;
                                                                
owl:onProperty :OWLDataProperty_b2551c41_5d7b_4ba4_8f05_09637a9146cd ;
                                                                
owl:maxQualifiedCardinality "3"^^xsd:nonNegativeInteger ;
                                                                
owl:onDataRange owl:rational
                                                               ] ,
                                                               [ rdf:type
owl:Restriction ;
                                                                
owl:onProperty :OWLDataProperty_ef0d741f_a2ab_4d40_b026_9b0020c87f1d ;
                                                                
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                                                                
owl:onDataRange owl:rational
                                                               ] ;
                                               rdfs:label "testSubClass"@en
.


### 
http://www.semanticweb.org/321365/ontologies/2019/1/untitled-ontology-114#OWLClass_c96aa825_f85b_4521_be34_36b6d8d44d51
:OWLClass_c96aa825_f85b_4521_be34_36b6d8d44d51 rdf:type owl:Class ;
                                               rdfs:label
"testSuperClass"@en .


###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z)
https://github.com/owlcs/owlapi


I really appreciate any suggestion or advice.

Cheers,
Mihaly



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz B├╝hmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating blank nodes with genid in Protege desktop

MihalyF
This post was updated on .
Thanks Lorenz and sorry for my test example wasn't fully representativ for
the issue.
I just updated the test ontology with similar enumeration of classes in a
property restriction to compare the previous ontology with the newly
generated.

The new turtle model do not have a similar serialization as the previous
has.

Please find the new test ontology attached
restriction_test.owl
<http://protege-project.136.n4.nabble.com/file/t376949/restriction_test.owl

I'm uploading the original ttl as well with the serialized restrictions

requirement.ttl

What is the most troubling for me when I open the original ontology in
Protege end edit than save it, then it removes all the genid's from the
turtle .

Thanks again



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
protege-user@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-user