Closed nissimsan closed 1 month ago
... Hmm, it seems like it's intentional. I still don't understand what it means.
Thanks @nissimsan. It's an unintended consequence of the mapping from logical model to linked data. At a pure logical model level "entity" is an abstract type which is a superclass of product, facility and organisation. It has common things like name, identifier, scheme, etc. So in the logical model product is a type of entity. But, at a JSON-LD level it means the "type" of the product class is both "product" and "entity" which I agree looks confusing. On the other hand the same modelling technique leads to a DPP being a type of VC - and a livestock passport being a type of product passport. Which is an application of exactly the same rule but this time it's something we understand and like.
You see this same collision of semantic graphs and traditional data modelling in schema.org where country is a type of administrative region, which is itself a type of place. Which sounds reasonable when you say it like that. Except schema.org:place carries all the attributes of a Google pin like opening hours and drive through service Boolean. Which means country also has those properties. So schema.org un-intentionally thinks that countries have opening hours and drive through services
Anyhow, in UNTP I'm sure we can fix this product subtype of entity problem by changing the model. I suppose I'm just pointing out that it's going to be challenging to develop and maintain high quality specifications when we get contributions from data modellers that don't think about linked data impacts (this ticket) or linked data designers that don't think about structural data model impacts (schema.org example). The new world is going to need people with a foot in each camp that can consider impacts of design decisions ..
For me personally I can say that this whole JSON-LD experience has actually got me asking my self "yes but what will this mean for the graph?" when I make data models. That a good thing I think
But, yes, I missed this entity / product consequence and will find a way to fix it
Oh right, I see that now: Product:Entity
.
IMO this problem is the logical data model (not mapping to LD). Product is not a kind of Entity.
Two suggestions on solving this:
Thing
. From an end user's point of view, I would prefer the first option. I find super-abstractions like "Thing" distracting. And in this case I don't see that we gain a whole lot from absolutely having a common super class.
Whether product is an entity or not depends on your understanding of that term
But yes - agreed. Option 1 is the way to go. just drop the inheritance
Will do an update for review before releasing a new version
in 0.4.0 the entity class has been flattened and now the DPP credentialSubject is simply "Product". https://test.uncefact.org/vocabulary/untp/dpp/untp-dpp-instance-0.4.0.json
Impacted sections
https://uncefact.github.io/spec-untp/assets/files/untp-digital-product-passport-v0.3.10-f2c1855610552ab75605e66f752f0dfa.json
Issue Description
https://github.com/uncefact/spec-untp/blob/main/website/samples/untp-digital-product-passport-v0.3.10.json#L40
I think this is a mistake. I'd say the subject of a DPP is a
Product
.Being both an
Entity
and aProduct
, like, what does that even mean?