Skip to content

NDR for interchange creation from RDM #2

@onthebreeze

Description

@onthebreeze

we need to formalise the rules by which the CEFACT published RDM is transformed to the interchange format. We use the MMT CSV for this task and we define mappings to the terms define in the domain model

Dictionary Entry Names (DEN) are represented in the MMT as

{qualifier}_ entity.{qualifier}_ property.{qualifier}_ coreType.

and are transformed to lower camel case with qualifier terms retaining the underscore postfix

MMT CSV Domain Model comment
ABIE DEN entity:name removing "details" qualifier For example Logistics_ Transport Equipment. Details -> Logistics_TransportEquipment
ABIE Definition entity:description remove any formatting
BBIE DEN property:name For example Logistics_ Transport Equipment. Tare Weight. Measure -> tareWeight
BBIE definition property:description remove any formatting
BBIE DEN type part - Core Data Type reference to the data type from Core Data Types package of the name DEN without entity qualifier and with prefix Type_Code(just _Code if property is Type) for example Logistics_ Transport Means. Type. Code -> reference to the data type with the name "TransportMeansType_Сode"
BBIE DEN type part - MMT Code reference to the data type from MMT Codes package of the name DEN without entity qualifier and with prefix Type_Code(just _Code if property is Type) for example Logistics_ Transport Means. Type. Code -> reference to the data type with the name "TransportMeansType_Сode"
BBIE DEN type part - ISO Code reference to the corresponding data type from ISO Codes package for example Header_ Trade Settlement. Invoice_ Currency. Code -> reference to the data type with the name "ISO4217_Code"
BBIE Occurrence min/max : property:cardinality for example Occurrence Min 0 and Max 1 -> 0..1
ASBIE DEN, property part contained (source) relationship:name for example Logistics_ Transport Equipment. Loading. Transport_ Event -> contained relationship with name "loading"
ASBIE DEN, type part referenced (target) ABIE name for example Logistics_ Transport Equipment. Loading. Transport_ Event -> reference to ABIE named "transport_event"
ASBIE Occurrence min/max relationship:cardinality

Other rules

  • whenever there are more than two relationships between the same two entities then replace them with a single relationship with 0..* cardinality that has a property with name role - and the property has a related dateType with name equal to {source ABIE name}_{taget ABIE name}. for example

  • Logistics_ Transport Equipment. Operating. Trade_ Party

  • Logistics_ Transport Equipment. Loading. Trade_ Party

  • Logistics_ Transport Equipment. Carrier. Trade_ Party

  • Logistics_ Transport Equipment. Notified. Trade_ Party

are replaced with a relationship called logistics_transportEquipment.trade_party that has a property with name role that has a data type logistics_transport_Equipment.trade_party that has enumerartion values operating, loading, carrier, notified

Lets give this a go. There remain two to-dos

  • talk to CEFACT about the enumeration values for all the code data types of BBIEs.
  • figure out some rules about removing other superfluous qualifiers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions