Refactoring Entities with Auto Generated IDs?

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

Refactoring Entities with Auto Generated IDs?

Michael DeBellis-2
Recently I've been using a couple of ontologies that have "Preferences>New Entities>Entity IRI" set to Auto-generated ID and then have "Preferences>Renderer>Entity rendering" set to "Render by annotation". 

If I try to use the "Refactor>Rename entity" command I see the auto generated ID come up and if I change the name of the Entity, the IRI changes but the label doesn't so in the UI it still has the old name.  Also, references in class expressions (and I'm guessing in rules, domain, range, etc.) still seem to have the old name. 

I just wanted to check: is this just an inevitable trade-off when you use auto-generated ID's and labels that you lose the ability to use the Refactor command or is there a way to automatically refactor names when these options are selected?

Cheers,
Michael

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

Re: Refactoring Entities with Auto Generated IDs?

samsontu
Hi Michael,

I am not sure what behavior you are reporting. See inline comments.

On May 6, 2020, at 8:21 AM, Michael DeBellis <[hidden email]> wrote:

Recently I've been using a couple of ontologies that have "Preferences>New Entities>Entity IRI" set to Auto-generated ID and then have "Preferences>Renderer>Entity rendering" set to "Render by annotation”. 

I assume “Render by annotation” means rendering by the rtfs:label annotation property.

If I try to use the "Refactor>Rename entity" command I see the auto generated ID come up and if I change the name of the Entity, the IRI changes but the label doesn't so in the UI it still has the old name.  Also, references in class expressions (and I'm guessing in rules, domain, range, etc.) still seem to have the old name. 

If, by “in the UI it still has the old name” you meant “the UI still displays the class using the rdfs:label”, yes, rtfs:label doesn’t change when you refactor the IRI.


I just wanted to check: is this just an inevitable trade-off when you use auto-generated ID's and labels that you lose the ability to use the Refactor command or is there a way to automatically refactor names when these options are selected?

What do you mean by “refactor the name”? As far as I know, Protege is behaving correctly: it allows you to change the IRI with the “Refactor/Rename entity…” command. You can change the rdfs:label property value by editing the annotation value. Protege UI renders by using rdfs:label when you choose such a setting (and can render by IRI if you change your rendering choice). So what is the tradeoff? The term “name” is highly ambiguous. You have to think in terms of IRIs and rdfs:label values.

With best regards,
Samson



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

Re: Refactoring Entities with Auto Generated IDs?

Michael DeBellis-2
Sorry, I expressed it poorly.  But after playing around with it some more, I see how it works. Rather than use the Refactor>Rename entity command when I use render by annotation I can just directly edit the label (or whatever annotation is used) and it is changed everywhere in the UI which is what I want. 

Cheers,
Michael



On Wed, May 6, 2020 at 10:26 AM Samson Tu <[hidden email]> wrote:
Hi Michael,

I am not sure what behavior you are reporting. See inline comments.

On May 6, 2020, at 8:21 AM, Michael DeBellis <[hidden email]> wrote:

Recently I've been using a couple of ontologies that have "Preferences>New Entities>Entity IRI" set to Auto-generated ID and then have "Preferences>Renderer>Entity rendering" set to "Render by annotation”. 

I assume “Render by annotation” means rendering by the rtfs:label annotation property.

If I try to use the "Refactor>Rename entity" command I see the auto generated ID come up and if I change the name of the Entity, the IRI changes but the label doesn't so in the UI it still has the old name.  Also, references in class expressions (and I'm guessing in rules, domain, range, etc.) still seem to have the old name. 

If, by “in the UI it still has the old name” you meant “the UI still displays the class using the rdfs:label”, yes, rtfs:label doesn’t change when you refactor the IRI.


I just wanted to check: is this just an inevitable trade-off when you use auto-generated ID's and labels that you lose the ability to use the Refactor command or is there a way to automatically refactor names when these options are selected?

What do you mean by “refactor the name”? As far as I know, Protege is behaving correctly: it allows you to change the IRI with the “Refactor/Rename entity…” command. You can change the rdfs:label property value by editing the annotation value. Protege UI renders by using rdfs:label when you choose such a setting (and can render by IRI if you change your rendering choice). So what is the tradeoff? The term “name” is highly ambiguous. You have to think in terms of IRIs and rdfs:label values.

With best regards,
Samson


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user