edi3 / edi3-json-ld-ndr

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

Add proper Event subclasses #25

Open Fak3 opened 3 years ago

Fak3 commented 3 years ago

CEFACT BSP RDM has few special Event types - Communication_Event, SupplyChain_Event, Transport_Event, and Referenced_Transport_Event

Some of those have numerous associated properties, clumped together to describe possible attributes of multiple real-world events of completely different nature. Thus making it hard to tell how exactly a data producer should use these properties to encode some real-world event, such as "Vessel Arrival" or "Cargo Unload".

For example, Transport Event (UN01004791) has 41 properties:

Details -- A significant occurrence or happening during transport.
Identification.Identifier -- The unique identifier for this transport event.
Type.Code -- The code specifying the type of transport event.
Description.Text -- The textual description of this transport event.
Estimated_Occurrence.Date Time -- The estimated date, time, date time, or other date time value of the occurrence of this transport event.
Actual_Occurrence.Date Time -- The actual date, time, date time, or other date time value of the occurrence of this transport event.
Scheduled_Occurrence.Date Time -- The scheduled date, time, date time, or other date time value of the occurrence of this transport event.
Requested_Occurrence.Date Time -- The requested date, time, date time, or other date time value of the occurrence of this transport event.
Arrival_Related.Date Time -- An arrival date, time, date time, or other date time value related to this transport event.
Departure_Related.Date Time -- A departure date, time, date time, or other date time value related to this transport event.
Estimated Transport Means Arrival_Occurrence.Date Time -- The date, time, date time, or other date time value when the arrival of a means of transport at the location of this transport event is estimated to occur.
Unit.Quantity -- The number of units for this transport event.
Scheduled Arrival_Related.Date Time -- The date, time, date time or other date time value of the scheduled arrival related to this transport event.
Actual Arrival_Related.Date Time -- The date, time, date time or other date time value of the actual arrival related to this transport event.
Scheduled Departure_Related.Date Time -- The date, time, date time or other date time value of the scheduled departure related to this transport event.
Actual Departure_Related.Date Time -- The date, time, date time or other date time value of the actual departure related to this transport event.
Security Level.Code -- A security level code for this transport event.
Reported Condition_Type.Code -- The code specifying the type of reported condition for this transport event.
Value.Measure -- The measure of a value for this transport event.
Received.Date Time -- The date, time, date time, or other date time value when information related to this transport event was received, from the perspective of the receiver.
Expected.Indicator -- The indication of whether or not this transport event is or was expected.
Specified.Transport_Instructions -- An instruction or a set of instructions specified for this transport event.
Occurrence.Logistics_Location -- The logistics location where this transport event occurs.
Occurrence.Specified_Period -- A specified period of time during which this transport event occurs.
Transport Means Stay_Occurrence.Specified_Period -- The specified period during which the transport means is held at a location.
Delay_Occurrence.Specified_Period -- A specified period of time during which this transport event is delayed.
Laycan_Occurrence.Specified_Period -- The specified period of laycan time during which this transport event occurs.
Cargo Facility_Related.Logistics_Location -- The location of a cargo facility related to this transport event.
Conveyance Facility_Related.Logistics_Location -- A location of a conveyance facility related to this transport event.
Certifying.Trade_Party -- A certifying party for this transport event.
Related.Transport_Route -- The route related to this transport event.
Requested_Related.Referenced Transport_Service -- A requested service related to this transport event.
Delay_Specified.Referenced_Transport_Event -- A delay specified for this referenced transport event.
Stay_Specified.Referenced_Transport_Event -- A stay specified for this referenced transport event.
Applicable.Note -- A note providing information applicable to this transport event.
Related.Specified_Observation -- An observation related to this transport event.
Additional Security Measures_Applicable.Note -- A note providing additional security measures applicable to this transport event.
Reporting.Monitoring_IOT Device -- An IOT device for this transport reporting event.
Associated.Specified_Geographical Feature -- A geographical feature associated with this transport event.
Previous_Associated.Specified_Geographical Feature -- A geographical feature previously associated with this transport event.
Actual_Occurrence.Specified_Period -- The actual period of time during which this transport event occurred.
Scheduled_Occurrence.Specified_Period -- The scheduled period of time specified for the occurrence of this transport event.

I suggest we decompose this into appropriate subclasses like CargoUnloadEvent, TransportArrivalEvent, etc. in our vocabualry. And we should decide which of the properties listed above should be present in the domain of which Event subclass.

nissimsan commented 3 years ago

@Fak3, that sounds like modeling work. I know we're doing a bit of "business decisions" in the NDR (particularly https://github.com/edi3/edi3-json-ld-ndr/issues/9), but defining an event model is IMO beyond the edi3 scope and I'd prefer for us to avoid it if possible.