Cannot use the same rdfs:label for two or more entities
On the current master branch, it does not seem to be possible to assign the same label to multiple classes or individuals.
For example, if a class A exists on the ontology with the label X, when I try to create a new object with the same X label, instead of creating a new class the software adds a new rdfs:subClassOf relationship to the class A. The same happens while creating individuals.
It's also not possible to assign the label X to an entity on the class/individual editors if that label is already being used. Instead of setting the rdfs:label on the class a string, the software is linking the rdfs:label to the class A.
Sometimes the error message «An error has occurred. Please try again. pathToRoot must not be empty» is shown on the screen while creating a second class with the same name/label.
WebProtege uses the label for looking up entities and this is why you're seeing this behaviour. It's possible that we could change this behaviour though. From a modelling point of view, I think that the perceived wisdom is you should use unique labels where possible.
Thank you Matthew. Although, I think looking up entries by their label is great and perfectly fits my needs, I can't always use distinct labels for distinct objects, or even the same object (what about multilingual labels? Sometimes they just translate to the same word).
These are all good points @joansalasoler. We've got several issues open for multi lingual labels so I need to look at these.
I’ve imported owl:equivalentProperty (with difficulties) as annotationProperty.
The fact we cannot use same rdfs:label twice induced the following issue:
- Add
dcterm→http://purl.org/dc/terms/in prefix table. - Create a property with
titleasrdfs:label. - Define
titleasequivalentPropertyofhttp://purl.org/dc/terms/title. - Export the projet.
- Import the file as a new project.
- External properties and classes are created as internal properties, however the IRI are correct (i.e.
titleIRI is wellhttp://purl.org/dc/terms/title) - But since there is no prefix and Webprotégé doesn’t support two identical rdfs:label, only one instance of
titleis kept and the equivalentProperty annotation is removed.
Hi @pols12,
I’ve imported owl:equivalentProperty (with difficulties) as annotationProperty.
You can't directly state that two annotation properties are equivalent in OWL (for some reason it wasn't included in the spec). This is probably why you don't see the axiom preserved in Protege. You can however state that one annotation property is a sub property of another annotation property though, so you could state this in both directions e.g. p rdfs:subPropertyOf q and q rdfs:subPropertyOf p.
Thank you for your answer, @matthewhorridge,
In my example, title is a Data property, not an annotation property; is that the same?
EDIT:
My bad, if I use another label (e.g. myTitle), equivalentProperty annotation is still removed, so it’s not a rdfs:label reuse issue. Should I open a new issue?
My bad, if I use another label (e.g. myTitle), equivalentProperty annotation is still removed, so it’s not a rdfs:label reuse issue. Should I open a new issue?
@pols12, yes, please open another issue. Thanks a lot.
Faced the same need.
Sometimes a context-sensitivity between classes is needed. When elements of one class are elements of another class with the same name, but the difference between them is in the parent class: the first is general, the second is a special case. But the automatic assignment of rdfs:subClassOf can also be convenient. It would be nice if it would be possible to define the behavior in the ontology settings and when creating a list of classes.

On the screenshot there are two sets of amino acids, but the first has a context-sensitivity to pumpkin superclass.