Skip to content

Commit

Permalink
port data models review 3
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoabellagarcia committed Dec 13, 2023
1 parent b84aaed commit 09176d8
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 83 deletions.
4 changes: 2 additions & 2 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"type": "string"
},
"organisationPortCallId": {
"description": "Property. Case-insensitive identifier for a single service activity, like a bunker activity",
"description": "Property. Case-insensitive identifier for a XXXX activity, like a bunker activity",
"pattern": "^PID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$",
"type": "string"
},
Expand Down Expand Up @@ -311,7 +311,7 @@
}
},
"IEventLocation": {
"description": "Property. Identifies a physical location at which the event will take place",
"description": "GeoProperty. Identifies a physical location at which the event will take place",
"properties": {
"geo": {
"anyOf": [
Expand Down
10 changes: 0 additions & 10 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/comments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,5 @@

3.- 'flagCode' heeds a url to the source of the flag codes

4.- why the 'bean' has a maximum of 1000

5.- why the 'loa' has a maximum of 8000

6.- why the 'sleeve' has a maximum of 8000

7.- 'ownerVessel' should not be 'vesselOwner' ?

8.- dataProvider is a general SDM attribute change name (temporary removed)

9.- createdAt and modifiedAt are internal attributes no need to be in the data model

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"owner": [
"urn:ngsi-ld:Acme-OWNER-NAME"
],
"vesselOwner": "Acme OWNER NAME",
"manager": "Acme MANAGER NAME",
"financialOwner": "Acme FINANCIAL ",
"technicalManager": "Acme TECHNICAL MANAGER",
Expand Down
8 changes: 2 additions & 6 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,16 @@
"beam": {
"type": "number",
"minimum": 0,
"maximum": 1000,
"description": "Property. Model:'https://schema.org/Number'. Units: 'meters'. Beam of Vessel."
},
"loa": {
"type": "number",
"minimum": 0,
"maximum": 8000,
"description": "Property. Model:'https://schema.org/Number'. Units: 'meters'. Length Over All of Vessel."
},
"sleeve": {
"type": "number",
"minimum": 0,
"maximum": 8000,
"description": "Property. Model:'https://schema.org/Number'. Units: 'meters'. Sleeve of Vessel."
},
"maxDraught": {
Expand Down Expand Up @@ -257,7 +254,7 @@
"format": "uri",
"description": "Property. Model:'https://schema.org/Text'. Vessel Photo URL"
},
"ownerVessel": {
"vesselOwner": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. Owner of the Vessel"
},
Expand Down Expand Up @@ -294,7 +291,6 @@
],
"required": [
"id",
"type",
"imo"
"type"
]
}
2 changes: 1 addition & 1 deletion SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/comments.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.- createdAt and modifiedAt are internal attributes no need to be in the data model

2 changes: 0 additions & 2 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/Port/comments.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
1.- 'id' There is a clear definition of the id, however the system (NGSI-LD would create a machine generated id). Would not be this id renamed, in example, to identifier
2.- 'countryCode' if there is a list could be included also an enum clause with the possible values?. should not be named unlocode?
3.- 'portCode'. What are these references [EMSWE2:DG-004-04][IALA-S211-portCode][UN-EDIFACT:LOC]
4.- 'portType' Are these categories coming from any regulation?
5.-'gln' why the link is pointing to gs1 indonesia?
6.- Port. The example is clearly not real. The problem are not the real values, but that it is not test in real use case scenarios
3 changes: 2 additions & 1 deletion SMARTCITIES/SMARTPORTS/NEW_PORT/Port/examples/example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "urn:mrn:amura:port:ESXXX",
"id": "uri:ngsi-ld:ABCD:00012",
"portId": "urn:mrn:amura:port:ESXXX",
"type": "Port",
"countryCode": "ES",
"portCode": "ESXXX",
Expand Down
5 changes: 3 additions & 2 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/Port/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
},
{
"properties": {
"id": {
"portId": {
"type": "string",
"description": "Property. Unique identifier of the entity assigned by the system who created on first the entity. This URN should Conforms MRN & IETF specifically RFC 2141, RFC 5234, and RFC 8141. The proposed format is id::=urn:mrn:<OID>:<ONSS>:port:id:99999999 where OID:= Organisation UN/LOCODE, OONSS:=Organization Name of Service, 9999999 an sequential, unique identifier that the issuer of the PortCall entity will identify on his sistems (i.e. a SQL row-id), i.e. 'urn:mrn:eshuv:portcalls:portcall:id:1422'. See [Unlocode](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory and https://service.unece.org/trade/locode/es.htm)"
"format": "uri",
"description": "Property. Unique identifier of the entity assigned by the system who created on first the entity. This URN should Conforms MRN & IETF specifically RFC 2141, RFC 5234, and RFC 8141. The proposed format is id::=urn:mrn:<OID>:<ONSS>:port:id:99999999 where OID:= Organisation UN/LOCODE, OONSS:=Organization Name of Service, 9999999 an sequential, unique identifier that the issuer of the PortCall entity will identify on his systems (i.e. a SQL row-id), i.e. 'urn:mrn:eshuv:portcalls:portcall:id:1422'. See [Unlocode](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory and https://service.unece.org/trade/locode/es.htm)"
},
"type": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
El id enviado podría ser reemplazado por el id automático en alguna operación, sería mejor que el id fuera un attributo específico, p.e. portcallId y no el id de NGSI-LD. --> ¿QUÉ ID AUTOMÁTICO? OK LO COMENTAMOS LOS ID

Las referencias entre corchetes deben llevar a alguna información que el usuario pueda consultar, convertirlos en referencias o quitarlos (p.e. se pdorían incluir en el notes.yaml)


Añadidos datos del ship's Agent (consignatario del buque) y del segundo agente si se produce un cambio en los contratos del buque
Cambiado "comments" por "remarks" (lo leo más en los estándares)

por que solo 2 ship's agents y no más?

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
notesHeader:
- id format: 'Unique identifier of the entity assigned by the system who created on first the entity. This URN should Conforms MRN & IETF specifically RFC 2141, RFC 5234, and RFC 8141. The propossed format is
- id format. 'Unique identifier of the entity assigned by the system who created on first the entity. This URN should Conforms MRN & IETF specifically RFC 2141, RFC 5234, and RFC 8141. The propossed format is
id::=urn:mrn:<OID>:<ONSS>:port:id:99999999
where OID:= Organisation UN/LOCODE, OONSS:=Organization Name of Service, 9999999 an sequential, unique identifier that the issuer of the PortCall entity will identify on his sistems (i.e. a SQL row-id),
i.e.: urn:mrn:eshuv:portcalls:portcall:id:1422
Expand All @@ -8,7 +8,7 @@ notesHeader:
- identification of current standards
On each attribute has been specified the standards on which the attribute comply
[EMSWe] European Maritime Single Window, https://www.emsa.europa.eu/emsw.html
[EDIFACT] UN/EDIFACT - United Nations rules for Elec­tronic Data Interchange for Administration, Commerce and Transport https://service.unece.org/trade/untdid/d20b/trsd/trsdrff.htm
[EDIFACT] UN/EDIFACT - United Nations rules for Electronic Data Interchange for Administration, Commerce and Transport https://service.unece.org/trade/untdid/d20b/trsd/trsdrff.htm
[PCO] Port Call Optimization Taskforce, https://portcalloptimization.org/
[IMO] IMO FAL Convention Standards, https://www.imo.org/en/OurWork/Facilitation/Pages/FormsCartificates-default.aspx
[IALA_S211] IALA S211-Port Call Message, https://www.iala-aism.org/technical/data-modelling/iala-s-200-development-status/s-211/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@
},
{
"properties": {
"portCallId": {
"type": "string",
"format": "uri",
"description": "Property. Property. Unique identifier of the entity assigned by the system who created on first the entity. This URN should Conforms MRN & IETF specifically RFC 2141, RFC 5234, and RFC 8141. The proposed format is id::=urn:mrn:<OID>:<ONSS>:port:id:99999999 where OID:= Organisation UN/LOCODE, OONSS:=Organization Name of Service, 9999999 an sequential, unique identifier that the issuer of the PortCall entity will identify on his systems (i.e. a SQL row-id), i.e. 'urn:mrn:eshuv:portcalls:portcall:id:1422'. See [Unlocode](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory and https://service.unece.org/trade/locode/es.htm)"
},
"type": {
"type": "string",
"description": "Property. NGSI Entity type. It has to be PortCall. In international standards is also known as [Ship's Visit]",
"enum": [
"PortCall"
]
},

"portCode": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. United Nations Code for Trade and Transport Locations. See [Unlocode](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory) [EMSWe: DE-004-04] [EDIFACT:LOC-3227-153] [IALA_S211:portCode] [IMO:IMO0108] "
Expand All @@ -41,7 +45,6 @@
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. Name of the terminal [EMSWe:-] [EDIFACT:-] [IMO:-]"
},

"status": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -72,7 +75,6 @@
"format": "date-time",
"description": "Property. Model:'https://schema.org/Text'. Date and time of authorization represented by an ISO 8601 UTC format"
},

"voyageNumber": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. Number of voyage. [EMSWe: DE-004-02] [EDIFACT:-] [IMO:-]"
Expand All @@ -85,7 +87,6 @@
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. Next port of call, coded.The code representing the port immediately previous to the port of arrival, if available.. Related to IALA_S211:nestPortCallCod / IMO. [EMSWe: DE-005-07] [EDIFACT:LOC-3227-61] [IMO:IMO0120]"
},

"vessel": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -199,7 +200,6 @@
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. Legal identifier code of the PortCall's ship Agent. [EMSWe: -] [EDI: -] [S211: -] [IMO: -] "
},

"manifestActivated": {
"type": "boolean",
"description": "Property. Model:'https://schema.org/Boolean'.Indicator of the Activation of the Manifest of the Cargo. "
Expand Down Expand Up @@ -271,17 +271,8 @@
"format": "date-time",
"description": "Property. Model:'https://schema.org/Text'. Date and time of Actual Time of Departure from Port. (ISO 8601 UTC format). [IALA_S211:timeType=2] [EMSWe: DE-005-03] [IALA_S211:locationState.timeType.ACTUAL] [IMO:IMO0065]"
}
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/Text'. Date and time of creation of the entity represented by an ISO 8601 UTC format."
},
"modifiedAt": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/Text'. Date and time of last modification of the entity represented by an ISO 8601 UTC format."
}

}
],
"required": [
Expand Down
16 changes: 2 additions & 14 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/comments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@

2.- En el fichero PortCallOptimizacion-Event_schema.json hay una sección de definiciones y otra de propiedades ¿por que?. Eliminado en MarineTransport-schema.json

3.- 'eventContext' la referencia no debe ser local sino absoluta. De hecho es incorrecta

4.- 'organisationPortcallId' y 'serviceId' tienen la misma definición . ¿es correcto?

5.- 'IEventLocation' por que solo puede ser un punto o un polígono y no cualquier otro tipo (linea, multipolígono, etc)

6.- 'IPoint' creo que está reinventando los punto de geojson. confirmar y en su caso reemplazar (y sería una geoproperty)

7.- 'IPolygon'. Lo mismo además faltan descriptions
6.- 'IPoint' creo que está reinventando los punto de geojson. confirmar y en su caso reemplazar (y sería una geoproperty). Cambiar a geojson.

8.- location is a SDM common attribute, changed name to eventLocation

9.- source is a SDM common attribute, used the common one

10.- 'uuid' tiene un pattern en el comentario pero podría tenerlo en la definción si fuera obligatorio.
7.- 'IPolygon'. Lo mismo además faltan descriptions. cambiar a a geojson poligono

11.- The value of eventContext does ot match the definition in the schema

12.- Too many required attributes. removed some of them
14 changes: 0 additions & 14 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/comments.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
1.- id has to be changed (otherwise could be overwritten by the system), better to call it portcallvesselId

2.- those references between brackets should be links to real sites or further explanations in notes.yaml

3.- Why in the attribute 'loa' there is a limit of 8000? (why not 7000 or 9000)?

4.- 'location' is included in the location-commons, there is no need to include it again

5.- Why is the 'heading' maximum 511?

6.- Why is the 'rateOfTurn' maximum 708?

7.- createdAt y modifiedAt son atributos del sistema (no modificalbes manualmente y por eso no deben estar en el modelo de datos) aunque se pueden usar






Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "urn:mrn:eshuv:portcalls:portcallvessel:id:1234",
"id": "urn:ngsi-ld:ABDC:00012",
"portCallVesselId": "urn:mrn:eshuv:portcalls:portcallvessel:id:1234",
"type": "PortCallVessel",
"masterVesselRef": "urn:mrn:eshuv:portcalls:mastervessel:imo:9863637",
"imo": 9863637,
Expand Down
11 changes: 4 additions & 7 deletions SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"properties": {
"porCallVesselId": {
"portCallVesselId": {
"type": "string",
"description": "Property. Unique identifier of the entity. Suggested format: urn:mrn:<oid>:portcalls:portcallvessel:id:9999"
},
Expand Down Expand Up @@ -82,8 +82,7 @@
},
"loa": {
"type": "number",
"minimum": 0,
"maximum": 8000,
"minimum": 0
"description": "Property. Model:'https://schema.org/Number'. Units: 'meters'. Length of Vessel."
},
"gt": {
Expand Down Expand Up @@ -159,14 +158,12 @@
},
"heading": {
"type": "number",
"minimum": 0,
"maximum": 511,
"minimum": 0
"description": "Property. Model:'https://schema.org/Number'. Units: 'degree'. Heading of the Vessel (HDG)."
},
"rateOfTurn": {
"type": "number",
"minimum": 0,
"maximum": 708,
"minimum": 0
"description": "Property. Model:'https://schema.org/Number'. Units: 'degree'. Rate of Turn (ROT)."
},
"dataProvider": {
Expand Down

0 comments on commit 09176d8

Please sign in to comment.