transmute-industries / traceability-vocab

A vocabulary for asserting Verifiable Credentials related to supply-chain traceability
https://transmute-industries.github.io/traceability-vocab/
Other
1 stars 0 forks source link

Composition might need to be modeled differently #2

Closed msporny closed 3 years ago

msporny commented 3 years ago

I'd model the percent composition differently... as a separate node:

  "chemicalComposition": [{
    "id": "Tc"
    "percentage": "84.61"
  }, {
    "id": "Mc"
    "percentage": "46.95"
  },{
    "id": "Og"
    "percentage": "83.5"
  }]

As a side note, it's confusing that those percentages don't add up to 100 in the example, but I'm assuming that's just the autogenerated stuff being wonky?

davidlehn commented 3 years ago

If id is mapped to @id, the above likely won't do what you want. It would define the percentage properties on the elements themselves. Perhaps the existing chemistry ontologies already model this sort of thing?

OR13 commented 3 years ago
{
  "@context": "https://w3id.org/traceability/v1",
  "observation": [
    {
      "property": {
        "name": "Cadmium",
        "formula": "Cd",
        "inchi": "InChI=1S/Cd",
        "inchikey": "BDOSMKKIYDKNTQ-UHFFFAOYSA-N"
      },
      "measurement": {
        "value": "17.240",
        "unitCode": "P1"
      }
    },
    {
      "property": {
        "name": "Rhodium",
        "formula": "Rh",
        "inchi": "InChI=1S/Rh",
        "inchikey": "MHOVAHRLVXNVSD-UHFFFAOYSA-N"
      },
      "measurement": {
        "value": "82.760",
        "unitCode": "P1"
      }
    }
  ]
}

Is this better?

OR13 commented 3 years ago

please move discussion to the W3C CCG.