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

Fix Representation of NamedIndividuals #45

Open
VladimirAlexiev opened this issue Sep 13, 2024 · 3 comments
Open

Fix Representation of NamedIndividuals #45

VladimirAlexiev opened this issue Sep 13, 2024 · 3 comments
Labels
ontology Pertains to ontology representation

Comments

@VladimirAlexiev
Copy link
Collaborator

This query finds 554 individuals (all CIM individuals have these 3 characteristics)

select * {
  ?s a owl:Thing, owl:NamedIndividual; rdfs:domain ?class
} order by ?s

They are represented like this:

cim:AsynchronousMachineKind.generator a owl:NamedIndividual, owl:Thing ;
  rdfs:label "generator "@en ;
  rdfs:domain cim:AsynchronousMachineKind ;
  skos:definition "The Asynchronous Machine is a generator."@en ;
  ssh:isenum "True" .

Problems:

  • owl:NamedIndividual, owl:Thing are useless since they are too generic, you'd never query by these classes
  • rdfs:domain cim:AsynchronousMachineKind is wrong, should be rdf:type

So we want to change this to:

cim:AsynchronousMachineKind.generator a cim:AsynchronousMachineKind ;
  rdfs:label "generator "@en ;
  skos:definition "The Asynchronous Machine is a generator."@en ;
  ssh:isenum "True" .
@VladimirAlexiev VladimirAlexiev added the ontology Pertains to ontology representation label Sep 13, 2024
@griddigit-ci
Copy link
Collaborator

There is also a question if AsynchronousMachineKind.generator is the right convention or we just need generator

when you look here cim:AsynchronousMachineKind.generator a cim:AsynchronousMachineKind do you understand that generator is enumerated value of the cim:AsynchronousMachineKind class?

@VladimirAlexiev
Copy link
Collaborator Author

VladimirAlexiev commented Sep 15, 2024

@griddigit-ci If you know these 2 naming conventions then you will understand :-)

  • <class>.<prop> means that prop is attached to class, i.e. <class>.<prop> rdfs:domain <class>
  • <enum>.<member> means that is a member of the enum, i.e. <enum>.<member> a <enum>

The question is whether "generator" means just one thing or multiple different things.
Looking at how it is used, I tend to think there are different things:

# grep -hF ".generator " */*/*|sort|uniq
cim:AsynchronousMachineKind.generator a owl:NamedIndividual, owl:Thing ;
cim:HydroEnergyConversionKind.generator a owl:NamedIndividual, owl:Thing ;
cim:SynchronousMachineKind.generator a owl:NamedIndividual, owl:Thing ;
cim:SynchronousMachineOperatingMode.generator a owl:NamedIndividual, owl:Thing ;

(I'm curious what would happen if you have a SynchronousMachine that's a generator, and you try to operate it as something else ;-)

BTW, two of those enum values are also defined in the way that this issue asks for:

cim:SynchronousMachineOperatingMode.generator a cim:SynchronousMachineOperatingMode ;
cim:AsynchronousMachineKind.generator a cim:AsynchronousMachineKind ;

Let's see where:

>grep -F ".generator a cim:" */*/*
CGMES-NC/ttl/SteadyStateHypothesisSchedule-AP-Voc-RDFS2020.ttl:cim:AsynchronousMachineKind.generator a cim:AsynchronousMachineKind ;
CGMES-NC/ttl/SteadyStateHypothesisSchedule-AP-Voc-RDFS2020.ttl:cim:SynchronousMachineOperatingMode.generator a cim:SynchronousMachineOperatingMode ;

So old-style files use the better representation:

cim:AsynchronousMachineKind.generator a cim:AsynchronousMachineKind ;
  rdfs:label "generator"@en ;
  rdfs:comment "The Asynchronous Machine is a generator." ;
  cims:stereotype "enum" .

I've added this as "regression" in #41

@griddigit-ci
Copy link
Collaborator

Do we still need to discuss something here? Most probably yes

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

No branches or pull requests

2 participants