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

Difference between uses and implements? #113

Closed
corymosiman12 opened this issue Aug 31, 2020 · 5 comments
Closed

Difference between uses and implements? #113

corymosiman12 opened this issue Aug 31, 2020 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation info requested from creator Waiting on PR creator to respond to request for further info ontology model Extensions or edits to the ontology model

Comments

@corymosiman12
Copy link

In the generation of RDF from yaml, it appears that when uses are declared for a type, this translates into a rdfs:subClassOf relationship. uses, however, seem like they should be data properties on a type as opposed to a superclass, where I would expect implements to define the superclass(es) for a type. Can you explain a little bit more how this works / why it works this way?

@corymosiman12 corymosiman12 changed the title Difference between uses and implements Difference between uses and implements? Aug 31, 2020
@charbull charbull added documentation Improvements or additions to documentation ontology model Extensions or edits to the ontology model info requested from creator Waiting on PR creator to respond to request for further info labels Oct 2, 2020
@tasodorff
Copy link
Collaborator

Maybe I am misunderstanding, but I think the way we use those terms does operate the way you are expecting:

TYPE_A:
  uses:
  - data_field_a
  - data_field_b
  implements:
  - SUPERTYPE_A
  - SUPERTYPE_B

Here is an example from the ontology, where fields are defined on an abstract superclass (parent type in our parlance) and is then inherited by the child device upon inheritance.

CHWDPM:
  description: "Differential pressure monitoring for chilled water."
  is_abstract: true
  uses:
  - chilled_water_differential_pressure_sensor
CH_SS_SWTC_DX4SWC_CHWDPM:
  description: "Air cooled chiller with 4 stages cooling."
  is_canonical: true
  implements:
  - CH
  - SS
  - SWTC
  - DX4SWC
  - CHWDPM

This is our intention for how it should operate, so if you are seeing an instance somewhere that this is not being implement in that way please let me know. And again, if I am misunderstanding the question, please let me know and I'll try to clarify my answer.

@corymosiman12
Copy link
Author

I guess, when I see the uses keyword, this to me translates to: 'has a point of the following type(s)', which I would assume means that this 'thing' should have this 'type of property'. Instead, it becomes a subclass of that thing.

image

Perhaps the confusion comes from the lack of documentation on the uses object property. It seems like this is used to bypass RDFs typical method of defining relationships (defining the domain and range of a relationship), and instead defines that a class is expected to use a field (more typical of like OO practices). Is that a fair characterization?

@tasodorff
Copy link
Collaborator

@berkoben @charbull what are your thoughts here?

@charbull
Copy link
Collaborator

charbull commented Oct 2, 2020

@corymosiman12 you are correct about the lack of documentation on the RDF part it comes from the fact that we wrote an RDF generator which takes as an input the yaml files and generates an rdf file.

Despite the itching to add additional information in the rdf file to make it more inline with the best practices of rdf and owl modelling. We decided not to do that to keep both yaml and rdf at the same level.

We have in the pipe to update the yaml representation to add domains and range on the object property so it can be picked up during the generation from yaml to rdf

Hope that helps.

@berkoben
Copy link
Contributor

berkoben commented Oct 2, 2020

@corymosiman12 good observation about the yaml syntax feeling more OO than linked data. This was a deliberate design choice in the YAML format intended to make it more accessible to those who don't speak linked data natively. The intent was always to automate the translation between the YAML configuration and RDF, so authors could deal with something very human-readable, but still convert to linked data if necessary.

@charbull charbull closed this as completed Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation info requested from creator Waiting on PR creator to respond to request for further info ontology model Extensions or edits to the ontology model
Projects
None yet
Development

No branches or pull requests

4 participants