From 46f9a6faf6947988c402a04872bd5d17ef87a4e6 Mon Sep 17 00:00:00 2001 From: aabella Date: Tue, 12 Dec 2023 16:11:44 +0100 Subject: [PATCH] port data models review --- .../SMARTPORTS/NEW_PORT/Berth/comments.txt | 1 + .../SMARTPORTS/NEW_PORT/Berth/schema.json | 10 +- .../NEW_PORT/MarineTransport-schema.json | 488 ++++++++++++++++++ .../NEW_PORT/MasterVessel/comments.txt | 18 + .../MasterVessel/examples/example.json | 19 +- .../NEW_PORT/MasterVessel/notes.yaml | 11 +- .../NEW_PORT/MasterVessel/schema.json | 23 +- .../NEW_PORT/Operation/comments.txt | 1 + .../NEW_PORT/Operation/examples/example.json | 6 +- .../SMARTPORTS/NEW_PORT/Operation/schema.json | 25 +- .../SMARTPORTS/NEW_PORT/Port/comments.txt | 6 + .../SMARTPORTS/NEW_PORT/Port/schema.json | 212 ++++---- .../v4-respuestaPortcall2/comments.txt | 23 +- .../portcall-schema.json | 8 +- .../PortCallOptimizacion-Event_schema.json | 22 +- .../NEW_PORT/PortCallEvent/comments.txt | 19 + .../NEW_PORT/PortCallEvent/schema.json | 28 +- .../NEW_PORT/PortCallVessel/comments.txt | 19 + .../NEW_PORT/PortCallVessel/schema.json | 95 ++-- 19 files changed, 760 insertions(+), 274 deletions(-) create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/comments.txt create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/comments.txt create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/comments.txt create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/Port/comments.txt create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/comments.txt create mode 100644 SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/comments.txt diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/comments.txt new file mode 100644 index 000000000..935425302 --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/comments.txt @@ -0,0 +1 @@ +1.- createdAt y modifiedAt son atributos del sistema (no modificables manualmente y por eso no deben estar en el modelo de datos) aunque se pueden usar diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/schema.json index 617bfebdc..03d7cb662 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Berth/schema.json @@ -66,7 +66,7 @@ "description": "Property. Model:'https://schema.org/Text'. Last bollard identifier in port facility" }, "status": { - "type": "enum", + "type": "string", "description": "Property. Model:'https://schema.org/Text'. Current status of the Berthing in its lifetime, from request to authorization and completion. Enum: 'ACCEPTED, AUTHORIZED, CANCELLED, COMPLETED, DENIED, INITIATED, REQUESTED, REJECTED, INVOICING, INVOICED'", "enum": [ "ACCEPTED", @@ -288,14 +288,6 @@ "agentLegalCode": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Legal identifier code of the PortCall's ship Agent" - }, - "createdAt": { - "type": "datetime", - "description": "Property. Model:'https://schema.org/Text' represented by an ISO 8601 UTC format, Date and time of creation thi entity" - }, - "modifiedAt": { - "type": "datetime", - "description": "Property. Model:'https://schema.org/Text' represented by an ISO 8601 UTC format, Date and time of modification this entity" } } } diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json new file mode 100644 index 000000000..54e92e4a5 --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json @@ -0,0 +1,488 @@ +{ + "$schema": "http://json-schema.org/schema#", + "$id": "https://smart-data-models.github.io/data-models/common-schema.json", + "title": "Common definitions for Harmonized Data Models", + "definitions": { + "EventLocationType": { + "description": "Specifies the type of location", + "enum": [ + "anchorArea", + "approachArea", + "berth", + "fairway", + "pilotBoardingPlace", + "port", + "portBasin", + "terminal", + "tugArea" + ], + "type": "string" + }, + "EventType": { + "description": "Designates the type of events\nThe format is a string composed of 3 parts, separated by a dot: PortActivity.TimeType.EventParty\nNot all combinations are valid, they are restricted to the following specified event types", + "enum": [ + "120nm.ata.vessel", + "12nm.ata.vessel", + "240nm.ata.vessel", + "60nm.ata.vessel", + "anchorArea.ata.agent", + "anchorArea.ata.portAuthority", + "anchorArea.ata.vessel", + "anchorArea.atd.agent", + "anchorArea.atd.portAuthority", + "anchorArea.atd.vessel", + "anchorArea.eta.agent", + "anchorArea.eta.carrier", + "anchorArea.eta.portAuthority", + "anchorArea.etd.agent", + "anchorArea.etd.carrier", + "anchorArea.etd.portAuthority", + "berth.ata.agent", + "berth.ata.carrier", + "berth.ata.portAuthority", + "berth.ata.terminal", + "berth.ata.vessel", + "berth.atd.agent", + "berth.atd.carrier", + "berth.atd.portAuthority", + "berth.atd.terminal", + "berth.atd.vessel", + "berth.cancel.agent", + "berth.cancel.carrier", + "berth.cancel.portAuthority", + "berth.cancel.terminal", + "berth.eta.agent", + "berth.eta.captain", + "berth.eta.carrier", + "berth.eta.pilot", + "berth.eta.portAuthority", + "berth.eta.terminal", + "berth.eta.vessel", + "berth.etd.agent", + "berth.etd.carrier", + "berth.etd.pilot", + "berth.etd.portAuthority", + "berth.etd.terminal", + "berth.pta.terminal", + "berth.ptd.portAuthority", + "berth.ptd.terminal", + "bunkerPW.atc.vessel", + "bunkerPW.ats.vessel", + "bunkerService.atc.bunkerService", + "bunkerService.atc.portAuthority", + "bunkerService.atc.serviceProvider", + "bunkerService.atc.vessel", + "bunkerService.ats.bunkerService", + "bunkerService.ats.portAuthority", + "bunkerService.ats.serviceProvider", + "bunkerService.ats.vessel", + "bunkerService.cancel.agent", + "bunkerService.cancel.bunkerService", + "bunkerService.cancel.portAuthority", + "bunkerService.cancel.serviceProvider", + "bunkerService.etc.agent", + "bunkerService.etc.bunkerService", + "bunkerService.etc.serviceProvider", + "bunkerService.ets.agent", + "bunkerService.ets.bunkerService", + "bunkerService.ets.serviceProvider", + "cargoOperations.atc.terminal", + "cargoOperations.ats.terminal", + "cargoOperations.cancel.agent", + "cargoOperations.cancel.serviceProvider", + "cargoOperations.etc.agent", + "cargoOperations.etc.serviceProvider", + "cargoOperations.etc.terminal", + "cargoOperations.ets.agent", + "cargoOperations.ets.serviceProvider", + "cargoOperations.ets.terminal", + "customs.atc.vessel", + "customs.ats.vessel", + "fairway.ata.vessel", + "firstLineReleased.at.linesmen", + "firstLineReleased.at.vessel", + "firstLineSecured.at.linesmen", + "firstLineSecured.at.vessel", + "floatingCrane.atc.vessel", + "floatingCrane.ats.vessel", + "immigration.atc.vessel", + "immigration.ats.vessel", + "lastLineReleased.at.linesmen", + "lastLineReleased.at.vessel", + "lastLineSecured.at.linesmen", + "lastLineSecured.at.vessel", + "movement.cancel.agent", + "pilotBoardingPlace.ata.carrier", + "pilotBoardingPlace.ata.vessel", + "pilotBoardingPlace.atd.carrier", + "pilotBoardingPlace.atd.vessel", + "pilotBoardingPlace.eta.agent", + "pilotBoardingPlace.eta.carrier", + "pilotBoardingPlace.eta.pilot", + "pilotBoardingPlace.eta.vessel", + "pilotBoardingPlace.etd.agent", + "pilotBoardingPlace.etd.carrier", + "pilotBoardingPlace.pta.portAuthority", + "pilotDisembarked.at.pilot", + "pilotDisembarked.at.portAuthority", + "pilotDisembarked.at.vessel", + "pilotDisembarked.et.pilot", + "pilotOnBoard.at.pilot", + "pilotOnBoard.at.portAuthority", + "pilotOnBoard.at.vessel", + "pilotOnBoard.et.pilot", + "port.ata.agent", + "port.ata.carrier", + "port.ata.portAuthority", + "port.ata.vessel", + "port.atd.agent", + "port.atd.carrier", + "port.atd.portAuthority", + "port.atd.vessel", + "port.cancel.agent", + "port.cancel.carrier", + "port.cancel.portAuthority", + "port.clearance.portAuthority", + "port.eta.agent", + "port.eta.carrier", + "port.eta.portAuthority", + "port.etd.agent", + "port.etd.carrier", + "port.etd.portAuthority", + "portAuthority.atc.vessel", + "portAuthority.ats.vessel", + "portBasin.ata.vessel", + "provision.atc.serviceProvider", + "provision.atc.vessel", + "provision.ats.serviceProvider", + "provision.ats.vessel", + "provision.cancel.serviceProvider", + "provision.etc.serviceProvider", + "provision.ets.serviceProvider", + "repairService.atc.serviceProvider", + "repairService.ats.serviceProvider", + "repairService.cancel.agent", + "repairService.etc.agent", + "repairService.etc.serviceProvider", + "repairService.ets.agent", + "repairService.ets.serviceProvider", + "safeAccessToShoreOpen.et.pilot", + "slops.atc.vessel", + "slops.ats.vessel", + "slops.cancel.agent", + "slops.cancel.serviceProvider", + "slops.etc.agent", + "slops.etc.serviceProvider", + "slops.ets.agent", + "slops.ets.serviceProvider", + "stores.cancel.agent", + "stores.cancel.serviceProvider", + "stores.etc.agent", + "stores.etc.serviceProvider", + "stores.ets.agent", + "stores.ets.serviceProvider", + "surveyor.atc.terminal", + "surveyor.ats.terminal", + "surveyor.cancel.serviceProvider", + "surveyor.etc.serviceProvider", + "surveyor.ets.serviceProvider", + "tender.atc.vessel", + "tender.ats.vessel", + "tugArea.ata.vessel", + "tugArea.atd.vessel", + "tugArea.eta.pilot", + "tugsFromBerth.reportnumber.agent", + "tugsFromBerth.reportnumber.portAuthority", + "tugsNoMoreStandby.at.portAuthority", + "tugsNoMoreStandby.at.tugService", + "tugsNoMoreStandby.at.vessel", + "tugsNoMoreStandby.et.portAuthority", + "tugsNoMoreStandby.et.tugService", + "tugsStandby.at.portAuthority", + "tugsStandby.at.tugService", + "tugsStandby.at.vessel", + "tugsStandby.et.portAuthority", + "tugsStandby.et.tugService", + "tugsToBerth.reportnumber.agent", + "tugsToBerth.reportnumber.portAuthority", + "vtsArea.ata.vessel", + "vtsArea.atd.vessel", + "waste.atc.serviceProvider", + "waste.atc.vessel", + "waste.ats.serviceProvider", + "waste.ats.vessel", + "waste.cancel.agent", + "waste.cancel.serviceProvider", + "waste.etc.agent", + "waste.etc.serviceProvider", + "waste.ets.agent", + "waste.ets.serviceProvider", + "waterSupply.cancel.agent", + "waterSupply.cancel.serviceProvider", + "waterSupply.etc.agent", + "waterSupply.etc.serviceProvider", + "waterSupply.ets.agent", + "waterSupply.ets.serviceProvider" + ], + "type": "string" + }, + "IEventContext": { + "type": "object", + "description": "Property. EventContext is a key-value object in which users are allowed to put custom keys for any purposes. The following keys have pre-defined meanings within the spec. Keys in this object are always optional", + "properties": { + "berthVisitId": { + "description": "Property. Case-insensitive identifier for a berth visit, which is a ship being alongside a single berth", + "pattern": "^BID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", + "type": "string" + }, + "clearance": { + "description": "Property. Used in combination with port.xxx.portAuthority to convey whether the port authority has given clearance for the ship to enter the port", + "type": "boolean" + }, + "distanceToLocationNM": { + "description": "Property. Used in combination with eta vessel or distanceToPort.at.vessel events, to inform how far away the vessel currently is", + "type": "number" + }, + "draught": { + "description": "Property. Maximum actual or expected static vessel draught at the event time in centimeters (integer)", + "type": "number" + }, + "mooring": { + "description": "Property. Mooring information, associated with berth events", + "properties": { + "bollardAft": { + "description": "Property. Bollard at the aft of the ship", + "type": "number" + }, + "bollardFore": { + "description": "Property. Bollard at the fore of the ship. Bollards are preferably integers, but some ports use fractional bollard numbers", + "type": "number" + }, + "doubleBanked": { + "description": "Property. True if the ship is double banked, there is a ship in between it and the berth", + "type": "boolean" + }, + "orientation": { + "description": "Property. Mooring orientation", + "enum": [ + "port", + "starboard" + ], + "type": "string" + } + }, + "required": [ + "bollardAft", + "bollardFore" + ], + "type": "object" + }, + "movementId": { + "description": "Property. Case-insensitive identifier for a movement, which is a ship traveling from one location to another inside a PortCall", + "pattern": "^MID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", + "type": "string" + }, + "organisationPortCallId": { + "description": "Property. Case-insensitive identifier for a single service activity, like a bunker activity", + "pattern": "^PID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", + "type": "string" + }, + "serviceId": { + "description": "Property. Case-insensitive identifier for a single service activity, like a bunker activity", + "pattern": "^SID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", + "type": "string" + }, + "serviceShip": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IShip", + "description": "The ship associated with a service event, e.g. the bunkers that will provide the bunker fuel" + }, + "serviceShipNumber": { + "description": "Property. The number of service ships, for when the specific service ships are not known yet", + "minimum": 0, + "type": "integer" + }, + "stakeholders": { + "description": "Property. The stakeholder's ids that should have access to the data of this event", + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "IEventLocation": { + "description": "Property. Identifies a physical location at which the event will take place", + "properties": { + "geo": { + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IPoint" + }, + { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IPolygon" + } + ], + "description": "Property. The Geometry Object of the GeoJSON specification: https://tools.ietf.org/html/rfc7946#page-7. The World Geodetic System (WGS84) is used as its reference coordinate system." + }, + "gln": { + "description": "Property. Global Location Number identifying a physical location", + "pattern": "^[0-9]{13}$", + "type": "string" + }, + "glnExtension": { + "description": "Property. GLN Extension component, identifying a physical sublocation of a location", + "pattern": "^[0-9]{1,20}$", + "type": "string" + }, + "name": { + "description": "Property. In case GLN is present, name is informative only to provide a transition period to allow the introduction of GLNs in port, events are not required to have GLN in v3. In this case, name MUST be unique per source system and consumers are allowed to link the name to locations in their master data", + "type": "string" + }, + "type": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/EventLocationType" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "IPoint": { + "description": "Property. Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2", + "properties": { + "coordinates": { + "description": "Property. A Position is an array of (lon, lat) coordinates (The altitude element is not supported). https://tools.ietf.org/html/rfc7946#section-3.1.1 Coordinates are in WGS 84: https://tools.ietf.org/html/rfc7946#ref-WGS84", + "type": "array", + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2 + }, + "type": { + "enum": [ + "Point" + ], + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "IPolygon": { + "type": "object", + "description": "Property. Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6", + "properties": { + "coordinates": { + "items": { + "type": "array", + "description": "Property. XXXX", + "items": { + "type": "array", + "description": "Property. A Position is an array of (lon, lat) coordinates (The altitude element is not supported) https://tools.ietf.org/html/rfc7946#section-3.1.1 Coordinates are in WGS 84: https://tools.ietf.org/html/rfc7946#ref-WGS84", + "items": [ + { + "type": "number", + "description": "Property. XXXX" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + } + }, + "required": [ + "coordinates", + "type" + ] + }, + "IShip": { + "type": "object", + "description": "Property. Bundles identifiers of a ship, but not information about the ship. At least an IMO, ENI, USCG or MMSI must be provided, with IMO being preferred over ENI, and ENI being preferred over MMSI", + "minProperties": 1, + "properties": { + "eni": { + "description": "Property. European Number of Identification (ENI) ship reference number", + "pattern": "^[0-9]{8}$", + "type": "string" + }, + "imo": { + "description": "Property. International Maritime Organization (IMO) ship reference number", + "pattern": "^[0-9]{7}$", + "type": "string" + }, + "mmsi": { + "pattern": "^[0-9]{9}$", + "type": "string", + "description": "Property. XXXX" + }, + "name": { + "description": "Property. Name is informative only", + "type": "string" + }, + "uscg": { + "description": "Property. United States Coast Guard vessel identification number", + "pattern": "^(?:[0-9]{6,8}|[a-zA-Z][0-9]{6,7}|[a-zA-Z]{2}[0-9]{6})$", + "type": "string" + } + } + }, + "context": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IEventContext", + "description": "Property. EventContext is a key-value object in which users are allowed to put custom keys for any purposes. The following keys have pre-defined meanings within the spec. Keys in this object are always optional" + }, + "eventTime": { + "type": "string", + "format": "date-time", + "description": "Property. Time at which the event occurred/will occur. The meaning of this should be interpreted according to eventType" + + }, + "eventType": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/EventType" + }, + "eventLocation": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IEventLocation", + "description": "Property. Identifies a physical location at which the event will take place" + }, + "port": { + "description": "Property. A UN/LOCODE designating a port", + "pattern": "^[A-Z]{2}[A-Z2-9]{3}$", + "type": "string" + }, + "portcallId": { + "description": "Property. A local port call identifier issued by the port authority or an organisation authorized by the port authority. Must be prefixed by the UNLOCODE of the issuing port, and followed by an identifier of 1 to 32 characters. Allowed characters in the identifier: a-z and A-Z (basic latin block letters), 0-9 (basic latin block digits), - (U+002D) and _ (U+005F)", + "pattern": "^[A-Z]{2}[A-Z2-9]{3}[a-zA-Z0-9\\-_]{1,32}$", + "type": "string" + }, + "recordTime": { + "description": "Property. Time at which the event was created", + "format": "date-time", + "type": "string" + }, + "ship": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IShip" + }, + "uuid": { + "description": "Property. UUID identifying the event", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "type": "string" + }, + "version": { + "description": "Property. Follows semantic versioning, see https://semver.org", + "enum": [ + "3.2.1" + ], + "type": "string" + } + } +} \ No newline at end of file diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/comments.txt new file mode 100644 index 000000000..fb80a420c --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/comments.txt @@ -0,0 +1,18 @@ +1.- The mastervessel is it the same as vessel? https://github.com/smart-data-models/dataModel.MarineTransport/blob/master/Vessel/schema.json + +2.- The references (i.e. [EMSWe: DE-003-07] [EDIFACT:TDT-8212] [IMO:IMO0142]) need a link or an explanations in the notes.yaml and refering in the description that further explanations are included in the notes.yaml file + +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 + diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/examples/example.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/examples/example.json index 258963530..59567996e 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/examples/example.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/examples/example.json @@ -1,12 +1,10 @@ { "id": "urn:mrn:eshuv:portcalls:mastervessel:id:1234", "type": "MasterVessel", - "vesselName": "ELEANOR R.", "imo": 9863637, "mmsi": 210049000, "callSign": "5BPC3", - "flagCode": "CY", "vesselType": 1, "vesselSubType": 2, @@ -17,24 +15,23 @@ "sleeve": 25.51, "maxDraught": 5.61, "dwt": 8.10, - "buildDate": "2020-01-01", + "buildDate": "2023-06-01", "toBow": 3, "toStern": 20, "toPort": 17, "toStardboard": 4, - "photo": "https://acme.com/photos/9863637", - "owner": "Acme OWNER NAME", + "owner": [ + "urn:ngsi-ld:Acme-OWNER-NAME" + ], "manager": "Acme MANAGER NAME", "financialOwner": "Acme FINANCIAL ", "technicalManager": "Acme TECHNICAL MANAGER", "dataProvider": "AIS", - - "maxLoadVehicle" : 120, - "maxPassenger" : 0, - "maxVehicle" : 16, - "minNumOfCrew" : 12, - + "maxLoadVehicle": 120, + "maxPassenger": 0, + "maxVehicle": 16, + "minNumOfCrew": 12, "createdAt": "2023-06-01T07:00:00", "modifiedAt": "2023-06-01T07:00:00" } diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/notes.yaml b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/notes.yaml index 784db1084..c84f7b395 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/notes.yaml +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/notes.yaml @@ -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. + - 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:::portcalls:mastervessel:id:99999999 where OID:= Organisation UN/LOCODE, OONSS:=Organization Name of Service, 9999999 an sequential, unique identifier that the issuer of the PortCallVessel entity will identify on his sistems (i.e. a SQL row-id), @@ -8,11 +8,8 @@ notesHeader: ' notesMiddle: -notesFooter: - Version 1: - - First version pending to agree the standards identification of each field - - - For URN forming the following standards are taken into account: ' +notesFooter: Pending to agree the standards identification of each field + For URN forming the following standards are taken into account - SO 3166-1 – The International Standard for country codes and codes for their subdivisions. - RFC 2141 – URN Syntax (https://www.ietf.org/rfc/rfc2141.txt) - RFC 8141 – Uniform Resource Names (URN) (https://tools.ietf.org/html/rfc8141) @@ -25,5 +22,5 @@ notesFooter: ::= a unique identifier on that namespace (i.e. an entity name followed by a row-id in an SQL database) i.e. urn := "urn:mrn:eshuv:portcalls:portcall:id:343" - ' + notesReadme: diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/schema.json index a7c92cdf9..1ee15b054 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/MasterVessel/schema.json @@ -38,7 +38,7 @@ }, "callSign": { "type": "string", - "description": "Property. Model:'https://schema.org/Number'. Identification signal of a vessel when initially connecting by radio [EMSWe: DE-065-05] [EDI: BGM-RFF] [S211: Call Name / Call Sign] [IMO: IMO0136] " + "description": "Property. Model:'https://schema.org/Text'. Identification signal of a vessel when initially connecting by radio [EMSWe: DE-065-05] [EDI: BGM-RFF] [S211: Call Name / Call Sign] [IMO: IMO0136] " }, "flagCode": { "type": "string", @@ -199,7 +199,7 @@ "UC", "OC" ], - "description": "Property. Model:'https://schema.org/Text'. Code for vessel class. Enum: 'BD=Dry bulk; BO=Oil tanker / bulk carrier; BS=Bulk carrier unloading; BY=Other types of bulk carriers; FC=Fishing vessel; FO=Vessel. transfer and/or transp.; GA=Vessel. RO-RO with passengers; GC=Mrcia general without specialization; GD=Rest general cargo vessels; GE=Buq. transp. combined; GN=Container ship; GO=Ro-ro vessel; GP=Passenger ship; GR=Refrigerator vessel; OO=Buq. or artefact. float be; OS=Supply ships; TC=Transpr product. chemicals; TD=Other liquid bulk; TL=Transportation of liquefied gas; TO=Oil tanker; XD=Dredges; XR=Research and exploration; XT=Tugs / pushers; XX=Other ships and boats; UR=Fast Pass; G=General Cargo; T=Liquid Bulk Carriers (Tanks); S=Solid Bulk Carriers; OB=Other Merchant Vessels; UC=Cruise Ticket; OC=High Sea Fishing Vessels (Freezers);\n'" + "description": "Property. Model:'https://schema.org/Text'. Code for vessel class. Enum: 'BD=Dry bulk; BO=Oil tanker / bulk carrier; BS=Bulk carrier unloading; BY=Other types of bulk carriers; FC=Fishing vessel; FO=Vessel. transfer and/or transp.; GA=Vessel. RO-RO with passengers; GC=Mrcia general without specialization; GD=Rest general cargo vessels; GE=Buq. transp. combined; GN=Container ship; GO=Ro-ro vessel; GP=Passenger ship; GR=Refrigerator vessel; OO=Buq. or artefact. float be; OS=Supply ships; TC=Transport product. chemicals; TD=Other liquid bulk; TL=Transportation of liquefied gas; TO=Oil tanker; XD=Dredges; XR=Research and exploration; XT=Tugs / pushers; XX=Other ships and boats; UR=Fast Pass; G=General Cargo; T=Liquid Bulk Carriers (Tanks); S=Solid Bulk Carriers; OB=Other Merchant Vessels; UC=Cruise Ticket; OC=High Sea Fishing Vessels (Freezers);'" }, "gt": { "type": "number", @@ -233,7 +233,7 @@ }, "buildDate": { "type": "string", - "format": "date-time", + "format": "date", "description": "Property. Model:'https://schema.org/Text'. Date of building of the vessel represented by an ISO 8601 UTC format." }, "toBow": { @@ -254,11 +254,12 @@ }, "photo": { "type": "string", + "format": "uri", "description": "Property. Model:'https://schema.org/Text'. Vessel Photo URL" }, "ownerVessel": { "type": "string", - "description": "Property. Model:'https://sche.org/Text'. Owner of the Vessel" + "description": "Property. Model:'https://schema.org/Text'. Owner of the Vessel" }, "manager": { "type": "string", @@ -272,10 +273,6 @@ "type": "string", "description": "Property. Model:'https://schema.org/Text'. Technical Manager" }, - "dataProvider": { - "type": "string", - "description": "Property. Model:'https://schema.org/Text'. A sequence of characters identifying the provider of the harmonised data entity" - }, "maxLoadVehicle": { "type": "number", "description": "Property. Model:'https://schema.org/Number'. Max capacity of vessel to transport vehicles" @@ -291,16 +288,6 @@ "minNumOfCrew": { "type": "number", "description": "Property. Model:'https://schema.org/Number'. Minimum number of crew to operate the vessel" - }, - "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." } } } diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/comments.txt new file mode 100644 index 000000000..034bb6b7d --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/comments.txt @@ -0,0 +1 @@ +1.- createdAt and modifiedAt are internal attributes no need to be in the data model diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/examples/example.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/examples/example.json index 9849d219d..b9a6e30af 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/examples/example.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/examples/example.json @@ -16,11 +16,11 @@ "measureUnit": "TEU", "maxWeightPerUnit": 23.3, "terminal": "Muelle Sur", - "location": "Segunda línea granel", + "position": "Segunda línea granel", "remarks": "Delayed 1h", - "manipulationMeansCode": 3, + "manipulationMeansCode": "3", "manipulationMeansNumber": 2, - "stevedoreRef": 1234, + "stevedoreRef": "1234", "createdAt": "2023-01-01T07:30:00", "modifiedAt": "2023-01-01T07:30:00" } diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/schema.json index 69ef2a816..d5c5a4ad5 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Operation/schema.json @@ -39,12 +39,12 @@ "portCallRef": { "type": "string", "format": "uri", - "description": "Relationship.Reference to parent MarineTransport:PortCall entity" + "description": "Relationship. Reference to parent MarineTransport:PortCall entity" }, "berthRef": { "type": "string", "format": "uri", - "description": "Relationship.Reference to parent MarineTransport:Berth entity" + "description": "Relationship. Reference to parent MarineTransport:Berth entity" }, "stopRank": { "type": "number", @@ -62,19 +62,19 @@ "etc": { "type": "string", "format": "date-time", - "description": "Property. Model:'https://schema.org/Text'. Represented by an ISO 8601 UTC format, Date and time of Estimated Time of Arrival to Berth expected by Port Authority (ISO 8601 UTC format). If this is the first berthing, the ETA-berth should be the same than ETA-PBP" + "description": "Property. Model:'https://schema.org/DateTime'. Represented by an ISO 8601 UTC format, Date and time of Estimated Time of Arrival to Berth expected by Port Authority (ISO 8601 UTC format). If this is the first berthing, the ETA-berth should be the same than ETA-PBP" }, "operationTypeCode": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Code identifying the type of commercial operation. Enum: 'ZD=Disembarkation; ZE=Embarkation; ZT=Transshipment; ZR=Waste; AV=Victualling; DT=Disembarkation in transit; RE=Restow'", "enum": [ + "AV", + "DT", + "RE", "ZD", "ZE", - "ZT", "ZR", - "AV", - "DT", - "RE" + "ZT" ] }, "productCode": { @@ -181,18 +181,7 @@ }, "stevedoreRef": { "type": "string", - "format": "uri", "description": "Property. Model:'https://schema.org/Text'. Id of the stevedore. Format urn:mrn::portcalls:operation:stevedore:9999" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "Property. Model:'https://schema.org/Text'. Represented by an ISO 8601 UTC format, Date and time of creation thi entity" - }, - "modifiedAt": { - "type": "string", - "format": "date-time", - "description": "Property. Model:'https://schema.org/Text'. Represented by an ISO 8601 UTC format, Date and time of modification this entity" } } } diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/comments.txt new file mode 100644 index 000000000..9503e4396 --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/comments.txt @@ -0,0 +1,6 @@ +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 diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/schema.json index 552c9a6a2..e215c20f6 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/Port/schema.json @@ -1,114 +1,112 @@ { - "$schema": "http://json-schema.org/schema#", - "$schemaVersion": "0.0.1", - "modelTags": "", - "derivedFrom": "", - "license": "", - "$id": "https://smart-data-models.github.io/dataModel.Ports/Port/schema.json", - "title": "Smart Data models Port schema", - "description": "The data model is intended to provide information about ports", - "type": "object", - "allOf": [ - { - "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" + "$schema": "http://json-schema.org/schema#", + "$schemaVersion": "0.0.1", + "modelTags": "", + "derivedFrom": "", + "license": "", + "$id": "https://smart-data-models.github.io/dataModel.Ports/Port/schema.json", + "title": "Smart Data models Port schema", + "description": "The data model is intended to provide information about ports", + "type": "object", + "allOf": [ + { + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" + }, + { + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" + }, + { + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Contact-Commons" + }, + { + "properties": { + "id": { + "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:::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)" }, - { - "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" + "type": { + "type": "string", + "description": "Property. NGSI Entity type. It has to be Port", + "enum": [ + "Port" + ] }, - { - "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Contact-Commons" + "countryCode": { + "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)" }, - { - "properties": { - "id": { - "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 propossed format is id::=urn:mrn:::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)" - }, - "type": { - "type": "string", - "description": "Property. NGSI Entity type. It has to be Port", - "enum": [ - "Port" - ] - }, - "countryCode": { - "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)" - }, - "portCode": { - "type": "string", - "description": "Property. Model:'https://schema.org/Text'. Port where the container is discharged (UN/LOCODE: United Nations Code for Trade and Transport Locations). See [UNTDID - D.95B - Segment LOC - C517 (3225)](https://service.unece.org/trade/untdid/d95b/uncl/uncl3225.htm) and [UN/LOCODE](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory) [EMSWE2:DG-004-04][IALA-S211-portCode][UN-EDIFACT:LOC]" - }, - "portName": { - "type": "string", - "description": "Property. Model:'https://schema.org/Text'. Common name of the port" - }, - "portType": { - "type": "string", - "enum": [ - "Dry", - "Fishing", - "Inland", - "Sea", - "WarmWater" - ], - "description": "Property. Model:'http://schema.org/Text'. Enum: 'Sea, Inland, Fishing, WarmWater, Dry'. Classification by type of port" - }, - - "portArea": { - "oneOf": [ - { - "$ref": "https://geojson.org/schema/Polygon.json" - }, - { - "$ref": "https://geojson.org/schema/MultiPolygon.json" - } - ], - "description": "GeoProperty. Geojson reference to the item. It can be Polygon or MultiPolygon" - }, - "timeZone": { - "type": "string", - "description": "Property. Model:'https://schema.org/Text'. The value provided should be among those listed in the IANA Time Zone Database. See [Time Zone Database](https://timezonedb.com/time-zones)" - }, - "gln": { - "type": "number", - "description": "Property. Model:'https://schema.org/Number'. Global Location Number. See [GLN](https://gs1id.org/global-location-number-gln)" - }, - "refPortAuthority": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "maxLength": 256, - "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", - "description": "Property. Identifier format of any NGSI entity" - }, - { - "type": "string", - "format": "uri", - "description": "Property. Identifier format of any NGSI entity" - } - ], - "description": "Relationship. Model:'https://schema.org/URL'. Reference to the PortAuthority" - }, - - "portClosed": { - "type": "boolean", - "description": "Property. Model:'https://schema.org/Boolean'. Information about the operational status of the port: closed o open to operations" - }, - "lastOpenCloseTime": { - "type": "string", - "format": "date-time", - "description": "Property. Model:'https://schema.org/Text'. Date and time of the closure of the Port or the Date and time of last port opening after a closure retpresented by an ISO 8601 UTC format" - } + "portCode": { + "type": "string", + "description": "Property. Model:'https://schema.org/Text'. Port where the container is discharged (UN/LOCODE: United Nations Code for Trade and Transport Locations). See [UNTDID - D.95B - Segment LOC - C517 (3225)](https://service.unece.org/trade/untdid/d95b/uncl/uncl3225.htm) and [UN/LOCODE](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory) [EMSWE2:DG-004-04][IALA-S211-portCode][UN-EDIFACT:LOC]" + }, + "portName": { + "type": "string", + "description": "Property. Model:'https://schema.org/Text'. Common name of the port" + }, + "portType": { + "type": "string", + "enum": [ + "Dry", + "Fishing", + "Inland", + "Sea", + "WarmWater" + ], + "description": "Property. Model:'http://schema.org/Text'. Enum: 'Sea, Inland, Fishing, WarmWater, Dry'. Classification by type of port" + }, + "portArea": { + "oneOf": [ + { + "$ref": "https://geojson.org/schema/Polygon.json" + }, + { + "$ref": "https://geojson.org/schema/MultiPolygon.json" } + ], + "description": "GeoProperty. Geojson reference to the item. It can be Polygon or MultiPolygon" + }, + "timeZone": { + "type": "string", + "description": "Property. Model:'https://schema.org/Text'. The value provided should be among those listed in the IANA Time Zone Database. See [Time Zone Database](https://timezonedb.com/time-zones)" + }, + "gln": { + "type": "number", + "description": "Property. Model:'https://schema.org/Number'. Global Location Number. See [GLN](https://gs1id.org/global-location-number-gln)" + }, + "refPortAuthority": { + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", + "description": "Property. Identifier format of any NGSI entity" + }, + { + "type": "string", + "format": "uri", + "description": "Property. Identifier format of any NGSI entity" + } + ], + "description": "Relationship. Model:'https://schema.org/URL'. Reference to the PortAuthority" + }, + "portClosed": { + "type": "boolean", + "description": "Property. Model:'https://schema.org/Boolean'. Information about the operational status of the port: closed o open to operations" + }, + "lastOpenCloseTime": { + "type": "string", + "format": "date-time", + "description": "Property. Model:'https://schema.org/Text'. Date and time of the closure of the Port or the Date and time of last port opening after a closure represented by an ISO 8601 UTC format" } - ], - "required": [ - "id", - "type", - "location", - "portCode", - "countryCode" - ] + } + } + ], + "required": [ + "id", + "type", + "location", + "portCode", + "countryCode" + ] } \ No newline at end of file diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/comments.txt index d5ba625c8..d214f005e 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/comments.txt +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/comments.txt @@ -1,27 +1,10 @@ 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 -En el campo vessel (un objeto), se incluye un subatributo name cuando en el original es shipname. +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) -Los campos imo y mmsi son números y no cadenas en el ejemplo --> OK son numeros los dos - -IMO se suele escribir en mayúsculas? ---> NO necesariamente, mejor minúsculas - -En callsign dentro del atributo vessel ": esta es la descripción que se incluye en el schema " Mxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ?? ---> "Property. Model:'https://schema.org/Number'. Identification signal of a vessel when initially connecting by radio [EMSWe: DE-065-05] [EDI: BGM-RFF] [S211: Call Name / Call Sign] [IMO: IMO0136] - -manifestActivated si es definido como boolean tiene que ser true or false, no se puede incluir una cadena vacía --> OK - -Los campos boolean sus valores no pueden ir entre comillas, si no son cadenas y no boolean ==> OK -Entonces hay que cambiar "manifestActivated": { - "type": "boolean", - "description": "Property. Model:'https://schema.org/Text'.Indicator of the Activation of the Manifest of the Cargo. " - }, - -Lo mismo para los numéricos, no pueden ir entre comillas ==> OK - -es authorized y no autorized - -Vessel id como obligatorio debería estar dentro, no obstante no lo pondría como obligatorio ==> como obligatorio debe estar uno de los identificadores de buque: imo/mmsi/callSign/vesselRef. Por eso yo preferiría sacar las propiedades de vessel fuera, porque todas ellas son solo un identificador, que en unas ocasiones usan uno y en otras otro, pero siempre debe haber uno de ellos. 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? + diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/portcall-schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/portcall-schema.json index e25e91ced..bc193ff35 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/portcall-schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCall/v4-respuestaPortcall2/portcall-schema.json @@ -12,6 +12,9 @@ { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" }, + { + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" + }, { "properties": { "type": { @@ -90,7 +93,7 @@ "type": "string", "description": "Property. Name of the vessel" }, - "IMO": { + "imo": { "type": "number", "description": "Property. IMO ship identification number, following the [scheme](https://www.imo.org/en/OurWork/IIIS/Pages/IMO-Identification-Number-Schemes.aspx) defined by the International Maritime Organization." }, @@ -184,7 +187,8 @@ "description": "Property. Model:'https://schema.org/Text'. Legal identifier code of the PortCall's ship Agent. [EMSWe: -] [EDI: -] [S211: -] [IMO: -] " }, "agentChangeDate": { - "type": "datetime", + "type": "string", + "format": "date-time", "description": "Property. Model:'https://schema.org/Text' represented by an ISO 8601 UTC format, If a change of ship agent occurls during the PortCall, this must be not null, and contains the date and time contract of new agent (secondAgentRef). [EMSWe: -] [EDI: -] [S211: -] [IMO: -] " }, "secondAgentName": { diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/PortCallOptimizacion-Event_schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/PortCallOptimizacion-Event_schema.json index 2939a540c..5e441d914 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/PortCallOptimizacion-Event_schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/PortCallOptimizacion-Event_schema.json @@ -225,34 +225,34 @@ "type": "string" }, "IEventContext": { - "description": "EventContext is a key-value object in which users are allowed to put custom keys for any purposes\nThe following keys have pre-defined meanings within the spec\nKeys in this object are always optional", + "description": "Property. EventContext is a key-value object in which users are allowed to put custom keys for any purposes. The following keys have pre-defined meanings within the spec. Keys in this object are always optional", "properties": { "berthVisitId": { - "description": "Case-insensitive identifier for a berth visit, which is a ship being alongside a single berth", + "description": "Property. Case-insensitive identifier for a berth visit, which is a ship being alongside a single berth", "pattern": "^BID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", "type": "string" }, "clearance": { - "description": "Used in combination with port.xxx.portAuthority to convey whether the port authority has given clearance for the ship to enter the port", + "description": "Property. Used in combination with port.xxx.portAuthority to convey whether the port authority has given clearance for the ship to enter the port", "type": "boolean" }, "distanceToLocationNM": { - "description": "Used in combination with eta vessel or distanceToPort.at.vessel events, to inform how far away the vessel currently is", + "description": "Property. Used in combination with eta vessel or distanceToPort.at.vessel events, to inform how far away the vessel currently is", "type": "number" }, "draught": { - "description": "Maximum actual or expected static vessel draught at the event time in centimeters (integer)", + "description": "Property. Maximum actual or expected static vessel draught at the event time in centimeters (integer)", "type": "number" }, "mooring": { - "description": "Mooring information, associated with berth events", + "description": "Property. Mooring information, associated with berth events", "properties": { "bollardAft": { - "description": "Bollard at the aft of the ship", + "description": "Property. Bollard at the aft of the ship", "type": "number" }, "bollardFore": { - "description": "Bollard at the fore of the ship\nBollards are preferably integers, but some ports use fractional bollard numbers", + "description": "Property. Bollard at the fore of the ship. Bollards are preferably integers, but some ports use fractional bollard numbers", "type": "number" }, "doubleBanked": { @@ -275,17 +275,17 @@ "type": "object" }, "movementId": { - "description": "Case-insensitive identifier for a movement, which is a ship traveling from one location to another inside a portcall", + "description": "Property. Case-insensitive identifier for a movement, which is a ship traveling from one location to another inside a PortCall", "pattern": "^MID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", "type": "string" }, "organisationPortcallId": { - "description": "Case-insensitive identifier for a single service activity, like a bunker activity", + "description": "Property. Case-insensitive identifier for a single service activity, like a bunker activity", "pattern": "^PID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", "type": "string" }, "serviceId": { - "description": "Case-insensitive identifier for a single service activity, like a bunker activity", + "description": "Property. Case-insensitive identifier for a single service activity, like a bunker activity", "pattern": "^SID-[a-zA-Z0-9_]+-[a-zA-Z0-9_]+$", "type": "string" }, diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/comments.txt new file mode 100644 index 000000000..782f22c8a --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/comments.txt @@ -0,0 +1,19 @@ +1.- Si el fichero PortCallOptimizacion-Event_schema.json son definiciones generales debería ir en el raiz de la subject y llamarse MarineTransport-schema.json. Cambiado allí + +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 + +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. \ No newline at end of file diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/schema.json index 0b1a2b91c..2b85774d3 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallEvent/schema.json @@ -26,9 +26,8 @@ }, "eventContext": { - "type": "string", - "$ref": "#/definitions/IEventContext", - "description": "EventContext is a key-value object in which users are allowed to put custom keys for any purposes\nThe following keys have pre-defined meanings within the spec\nKeys in this object are always optional" + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IEventContext", + "description": "EventContext is a key-value object in which users are allowed to put custom keys for any purposes. The following keys have pre-defined meanings within the spec. Keys in this object are always optional" }, "eventTime": { "description": "Time at which the event occured/will occur. The meaning of this should be interperted according to eventType", @@ -259,39 +258,36 @@ ], "type": "string" }, - "location": { - "type": "location", - "description": "Identifies a physical location at which the event will take place" + "eventLocation": { + "$ref": "https://raw.githubusercontent.com/smart-data-models/incubated/master/SMARTCITIES/SMARTPORTS/NEW_PORT/MarineTransport-schema.json#/definitions/IEeventLocation", + "description": "Property. Identifies a physical location at which the event will take place" }, "port": { - "description": "A UN/LOCODE designating a port", + "description": "Property. A UN/LOCODE designating a port", "pattern": "^[A-Z]{2}[A-Z2-9]{3}$", "type": "string" }, "portcallId": { - "description": "A local port call identifier issued by the port authority or an organisation authorized by the port authority\nMust be prefixed by the UNLOCODE of the issuing port, and followed by an identifier of 1 to 32 characters\nAllowed characters in the identifier: a-z and A-Z (basic latin block letters), 0-9 (basic latin block digits), - (U+002D) and _ (U+005F)", + "description": "Property. A local port call identifier issued by the port authority or an organisation authorized by the port authority. Must be prefixed by the UNLOCODE of the issuing port, and followed by an identifier of 1 to 32 characters. Allowed characters in the identifier: a-z and A-Z (basic latin block letters), 0-9 (basic latin block digits), - (U+002D) and _ (U+005F)", "pattern": "^[A-Z]{2}[A-Z2-9]{3}[a-zA-Z0-9\\-_]{1,32}$", "type": "string" }, "recordTime": { - "description": "Time at which the event was created", + "description": "Property. Time at which the event was created", "format": "date-time", "type": "string" }, "shipRef": { - "type": "Relationship", - "description": "Relationship.Reference to PortCallVessel entity." - }, - "source": { "type": "string", - "description": "System creating the event, unique within participants" + "format": "uri", + "description": "Relationship. Reference to PortCallVessel entity." }, "uuid": { "type": "string", - "description": "UUID identifying the event. Format: '^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' " + "description": "Property. UUID identifying the event. Format: '^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' " }, "version": { - "description": "Follows semantic versioning, see https://semver.org", + "description": "Property. Follows semantic versioning, see https://semver.org", "enum": [ "3.2.1" ], diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/comments.txt b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/comments.txt new file mode 100644 index 000000000..5bb459bd9 --- /dev/null +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/comments.txt @@ -0,0 +1,19 @@ +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 + + + + + + diff --git a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/schema.json b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/schema.json index 7c36234f0..5715e768c 100644 --- a/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/schema.json +++ b/SMARTCITIES/SMARTPORTS/NEW_PORT/PortCallVessel/schema.json @@ -1,12 +1,12 @@ { "$schema": "http://json-schema.org/schema#", - "$schemaVersion": "0.0.2", + "$schemaVersion": "0.0.1", "modelTags": "I4Trust", "derivedFrom": "", "license": "", "$id": "https://raw.githubusercontent.com/smart-data-models/dataModel.MarineTransport/master/PortCallVessel/schema.json", - "title": "Smart Data models Vessel schema", - "description": "The data model is intended to provide information about vessels. It allows to represent the properties of each vessel: static and dynamic information", + "title": "Smart Data models Port Call Vessel schema", + "description": "The data model is intended to provide information about por call vessels. It allows to represent the properties of each vessel: static and dynamic information", "type": "object", "allOf": [ { @@ -17,7 +17,7 @@ }, { "properties": { - "id": { + "porCallVesselId": { "type": "string", "description": "Property. Unique identifier of the entity. Suggested format: urn:mrn::portcalls:portcallvessel:id:9999" }, @@ -28,8 +28,11 @@ "PortCallVessel" ] }, - "masterVesselRef": {"type": "Relationship", "description": "Relationship.Reference to parent MasterVessel entity. [NGSI-MarineTransport.MasterVessel.id]- urn:mrn::portcalls:portcallvessel:id:9999" }, - + "masterVesselRef": { + "type": "string", + "format": "uri", + "description": "Relationship. Reference to parent MasterVessel entity. [NGSI-MarineTransport.MasterVessel.id]- urn:mrn::portcalls:portcallvessel:id:9999" + }, "imo": { "type": "number", "description": "Property. Model:'https://schema.org/Number'. International Maritime Organization Number (a global forever UID)" @@ -46,18 +49,19 @@ "type": "string", "description": "Property. Model:'https://schema.org/Text'. Vessel Name" }, - "portCallNumber": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Port call identifier in MRN format. First element of the NSS should be the 5 character UN/Locode of the port, later the YEAR and finishing with a sequential number in this port [LLLLLYYYY99999] where LLLLL is the UN/LOCODE of the visited port, YYYY is the year, and 99999 is a unique sequential number assigned by port authority unique on each year (i.e. ESHUV202310323). An abreviation can be used for UN/LOCODE (i.e. H202310323). The portCallNumber is assigned during the initial steps of the visit, but could be null at the beggining. In international standards is also known as [Port Call ID], [Visit ID] or [Port Call Coded]. See [Unlocode](https://unece.org/trade/cefact/unlocode-code-list-country-and-territory) [EMSWe: DG-004/DG-004-01] [EDIFACT:BGM-1004] [IALA_S211:portCallId] [IMO:IMO108+IMO0153]" }, - "portCallRef": {"type": "Relationship", "description": "Relationship.Reference to parent PortCall entity. [NGSI-MarineTransport.PortCall.id]" }, - + "portCallRef": { + "type": "string", + "format": "uri", + "description": "Relationship. Reference to parent PortCall entity. [NGSI-MarineTransport.PortCall.id]" + }, "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] " }, - "lastPortCode": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Last port of call, coded.The code representing the port immediately previous to the port of arrival, if available. [EMSWe: DE-005-05] [EDIFACT:LOC-3227-92] [IMO:IMO0076] " @@ -66,7 +70,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]" }, - "etaAis": { "type": "string", "format": "date-time", @@ -77,12 +80,6 @@ "format": "date-time", "description": "Property. Model:'https://schema.org/Text'. Estimated time of arrival, computed by an algorithm based on vessel's positions, represented by an ISO 8601 UTC format." }, - - - - - - "loa": { "type": "number", "minimum": 0, @@ -95,7 +92,11 @@ }, "specialManeuverIndicator": { "type": "number", - "enum": [ 0, 1, 2 ], + "enum": [ + 0, + 1, + 2 + ], "description": "Property. Model:'https://schema.org/Number'. Enum: '0=Not available (default),1=Not engaged in special maneuver,2=Engaged in special maneuver'. Code for the special maneuver flag." }, "manager": { @@ -106,11 +107,11 @@ "type": "number", "description": "Property. Model:'http://schema.org/Number'. Actual Draught (vertical distance between the waterline and the bottom of the hull (keel)). Declared by ship Agent in PortCall request and reported/confirmed by Pilot. Units: 'meters'" }, - "arrivalDraught": { + "arrivalDraught": { "type": "number", "description": "Property. Model:'http://schema.org/Number'. Draught at arrival reported by ship Agent. Vertical distance between the waterline and the bottom of the hull (keel). . Units: 'meters'" }, - "departureDraught": { + "departureDraught": { "type": "number", "description": "Property. Model:'http://schema.org/Number'. Draught at departure reported by ship Agent. Vertical distance between the waterline and the bottom of the hull (keel). Units: 'meters'" }, @@ -118,34 +119,36 @@ "type": "number", "description": "Property. Model:'http://schema.org/Number'. Air Draught (distance from the top of a vessel''s highest point to its waterline). Units: 'meters'" }, - "navigationStatus": { "type": "number", - "enum": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ], "description": "Property. Model:'http://schema.org/Number'. Enum: '0=Under way using engine,1=At anchor,2=Not under command,3=Restricted manoeuverability,4=Constrained by her draught,5=Moored,6=Aground,7=Engaged in Fishing,8=Under way sailing,9=Reserved for future amendment of Navigational state for HSC,10=Reserved for future amendment of Navigational Status for WIG,11=Reserved for future use,12=Reserved for future use,13=Reserved for future use,14=AIS-SART is active,15=Not defined (default)'. Navigation Status. AIVDM/AIVDO data format." }, - - "location": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "coordinates": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "description": "GeoProperty. Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygoProperty." - }, "positionAccuracy": { "type": "number", - "enum": [ 0, 1 ], + "enum": [ + 0, + 1 + ], "description": "Property. Model:'https://schema.org/Number'.Enum: '0=Low (> 10 m; autonomous mode of e.g. global navigation satellite system (GNSS) receiver or of other electronic position fixing device; default),1=High (< 10 m; differential mode of e.g. DGNSS receiver)'. Code for the accuracy of the vessel position flag." }, - "speedOverGround": { "type": "number", "description": "Property. Model:'https://schema.org/Number'. Units: 'meters per second'. Speed Over Ground (SOG)." @@ -166,22 +169,10 @@ "maximum": 708, "description": "Property. Model:'https://schema.org/Number'. Units: 'degree'. Rate of Turn (ROT)." }, - "dataProvider": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. A sequence of characters identifying the provider of the harmonised data entity" }, - - "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." - }, "observedAt": { "type": "string", "format": "date-time",