edi3 / edi3-json-ld-ndr

GNU General Public License v3.0
0 stars 2 forks source link

References from CCL rather than ASBIEs (just like we do for ABIEs) #42

Open nissimsan opened 3 years ago

nissimsan commented 3 years ago

image

The trick we do for classes, containing the “layers” in the unece:cefactElementMetadata sections - could that be done for relationships too? Those two relationships are the same, aren’t they?

So, could

    {
      "@id": "unece:includedSupplyChainConsignmentItem",
      "@type": "rdfs:Property",
      "schema:rangeIncludes": "unece:ConsignmentItem",
      "schema:domainIncludes": "unece:Consignment",
      "rdfs:comment": "A consignment item included in this supply chain consignment.",
      "unece:cefactElementMetadata": [
        {
          "@id": "cefact:SupplyChain_Consignment.Included.SupplyChain_ConsignmentItem",
          "@type": "unece:AssociationBIE",
          "unece:cefactUNId": "cefact:UN01004258",
          "unece:cefactBieDomainClass": "cefact:SupplyChain_Consignment.Details",
          "unece:cefactBusinessProcess": "Buy-Ship-Pay",
          "rdfs:comment": "A consignment item included in this supply chain consignment."
        }
      ]
    },

and

    {
      "@id": "unece:includedReferencedSupplyChainConsignmentItem",
      "@type": "rdfs:Property",
      "schema:rangeIncludes": "unece:ConsignmentItem",
      "schema:domainIncludes": "unece:Consignment",
      "rdfs:comment": "A referenced consignment item included in this referenced supply chain consignment.",
      "unece:cefactElementMetadata": [
        {
          "@id": "cefact:Referenced_SupplyChain_Consignment.Included.Referenced_SupplyChain_ConsignmentItem",
          "@type": "unece:AssociationBIE",
          "unece:cefactUNId": "cefact:UN01004048",
          "unece:cefactBieDomainClass": "cefact:Referenced_SupplyChain_Consignment.Details",
          "unece:cefactBusinessProcess": "Buy-Ship-Pay",
          "rdfs:comment": "A referenced consignment item included in this referenced supply chain consignment."
        }
      ]
    },

be joined together into just unece:includedConsignmentItem? Which could then reference unece:includedSupplyChainConsignmentItem and unece:includedReferencedSupplyChainConsignmentItem within its unece:cefactElementMetadata?

In the Excel export, this would be the UN01004258 ASBIE Included Consignment Item A consignment item included in this supply chain consignment. 0 unbounded Supply Chain_ Consignment. Included. Supply Chain_ Consignment Item and UN01004048 ASBIE Included Consignment Item A referenced consignment item included in this referenced supply chain consignment. 0 unbounded Referenced_ Supply Chain_ Consignment. Included. Referenced_ Supply Chain_ Consignment Item

Combined, named from the common Business Name (Included Consignment Item)

kshychko commented 3 years ago

@nissimsan, I implemented the NDR from this ticket. Could you please check it out and confirm I did it correctly:

https://edi3.org/vocabulary/unece/#includedConsignmentItem