Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules creating class and individuals should not fail if ran twice #12

Open
csnyulas opened this issue Oct 6, 2016 · 1 comment
Open

Comments

@csnyulas
Copy link
Member

csnyulas commented Oct 6, 2016

If I run a rule like

Individual: @A*
  Annotations: rdfs:comment @B*

multiple times, I get the following error:

screenshot cellfieerror entityalreadyexists

In comparison, a rule like this can be run multiple times, without any error:

Class: @A*
    SubClassOf: @B*

In the case of a class declaration, if an entity that would be generated from a cell is already found in the ontology (and has the right type), the existing entity would be used in the rest of the rule. This is the desired behaviour, and should happen for individual declarations as well (and in the future also for object, data and annotation property declarations, too) .

@csnyulas
Copy link
Member Author

This problem comes up in this issue as well: protegeproject/cellfie-plugin/issues/131

Interestingly enough, although this rule cannot run twice (or multiple times):

Class: @A*(rdf:id)
    Annotations: rdfs:label @B* 
    SubClassOf: @C*
    SubClassOf: isMyFavorite value @D*(xsd:boolean)

this one can:

Class: @A*(rdf:id)
    SubClassOf: @C*
    SubClassOf: isMyFavorite value @D*(xsd:boolean)

However, again, this can not:

Class: @A*(rdfs:label=@B* rdf:id)
    SubClassOf: @C*
    SubClassOf: isMyFavorite value @D*(xsd:boolean)

All these seem to suggest that the problem occurs when there are some annotations (such as rdfs:label or rdfs:comment) added to the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant