Closed VladimirAlexiev closed 1 year ago
backing up for a second, the original goal of this work was to map JSON Schema types to JSON-LD vocabularies, and generate documentation and context from the JSON Schema types.
There are cases where we "needed to invent something"... and I regret pretty much every instance.
I do think we are on the hook for correcting those cases and minimizing them.
You reuse terms from a lot of ontologies, but they not always point to a class from the same ontology
I think this is the most obvious flaw with the current approach... but I see it as something which we should fix, and not embrace / perpetuate with a "new ontology"... but I could be convinced.
@OR13 that's not a flaw!
Seems you'll need help with the ontological approach, and I'll lend a hand. Here are some issues that force you to consider classes, props, subclasses, and other ontological constructs. Please comment on them!
We already had an example of a subproperty:
uncl1153:Consignment_identifier_carrier_assigned rdfs:subPropertyOf schema:identifier
In that case @nissimsan said he'll add it in the UNECE ontology. But it's very rare to be able to modify an external ontology: It is ok to add such adjustments to your own glue ontology!
I think I may have misread your comment.
I was trying to say, we should be careful not to go crazy with glue, and we should prefer to fix issues upstream when we can... but I agree some amount of glue is always necessary.
@OR13 @nissimsan Let me give you a very simple example:
"Observation": {
"@id": "https://schema.org/Observation",
"@context": {
"property": {
"@id": "https://schema.org/measuredProperty"
"measurement": {
"@id": "https://w3id.org/traceability#MeasuredValue" // Why not schema:measuredValue?
"date": {
"@id": "https://schema.org/observationDate"
"MeasuredValue": {
"@id": "https://www.schema.org/QuantitativeValue",
"@context": {
"value": {
"@id": "https://www.schema.org/value"
"unitCode": {
"@id": "https://schema.org/unitCode"
So you want to use schema:Observation, but in measuredValue you want to have both value and unitCode (why didn't they think of that?).
But the above doesn't express that!
It mistakenly maps measurement
(prop) to tr:MeasuredValue
(class).
What you need is to map measurement
to schema:measuredValue
, and then add to traceability.ttl:
schema:measuredValue schema:rangeIncludes schema:QuantitativeValue.
This way YOUR ontology amends the definition of that prop to include one more possible range, the one you need.
Or, you can post to https://github.com/schemaorg/schemaorg/issues, and wait 2 years, and have your issue closed for inactivity. Happened to me many times. See https://github.com/schemaorg/schemaorg/issues/2573.
"@id": "https://w3id.org/traceability#MeasuredValue" // Why not schema:measuredValue?
another bug : )
As I said, we area erroneously defining terms all over the place, when a better existing reference is available.
@nissimsan @BenjaminMoe please propose concrete changes.
I think we might have more of an ontology than I was aware of... This should be described better.
Added Pending Close
by mistake.
I have not heard any talks of a "traceability ontology" here, and doubt it will be scoped any time soon.
I think we might have more of an ontology than I was aware of...
Ok, that's a positive evolution :-)
@nissimsan any updates?
Suggestion: have a section in the respec document for terms we accidentally need to define.
Building a complete ontology would be great. Unfortunately there does not seem to be bandwidth to implement this. Closing for now. Would be great to reopen if there is interest in implementation.
@nissimsan provoked me in https://github.com/w3c-ccg/traceability-vocab/issues/230#issuecomment-1023049089
(Ok that was a joke).
Seriously though, such an ontology is needed because:
Mistakes in #270 are closely related to this. When you say in a
schema.yml
:What you really mean is a
transparency.ttl
ontology with this:There are a lot of intricacies, eg
rdfs:(domain|range)
orschema:(domain|range)Includes
:That may well be (didn't know you can move mountains :-)) But since you reuse multiple ontologies in a customized way, there are a lot more ontological statements you'd need to make.
Some resources: