Comments (14)
Thanks to @nissimsan here's a working version which I'll put something in place for
{
"@context": [
"https://vocabulary.uncefact.org/unlocode-vocab-context.jsonld",
"https://schema.org"
],
"@type": ["Place"],
"name": "HHLA CONTAINER TERMINAL ALTENWERDER (CTA)",
"countryCode": "DE",
"UNLOCODE": "DEHAM",
"countryCode":"DE",
"address": {
"@type": "PostalAddress",
"streetAddress": "Am Ballinkai 1",
"addressCountry": "Germany",
"addressRegion": "Hamburg",
"postalCode": "2119"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 53.509241285961544,
"longitude": 9.927578892050956
},
"url": "https://www.bic-code.org/facility-codes/GBLIVJMDA"
}
from spec-jsonld.
@onthebreeze the UN traceability project could also be added
from spec-jsonld.
@cmsdroff , please action.
from spec-jsonld.
Welcome some comments or a steer on the below, I've looked at schema.org, IATA and the UNCEFACT vocab and made a start at defining a shipping container which could be used by BIC for their container database, but also for industry to define a shipping container in the context of BIC.
We would need to link this to the CEFACT vocab for TransportEquipment
see https://tinyurl.com/y8hu7emc and below as a start.
{
"@context":{
"@vocab":"http://vocab.bic-code.org#",
"schema":"http://schema.org/",
"uncefact":"https://service.unece.org/trade/uncefact/trade/uncefact/vocabulary/uncefact#"
},
"@graph":[
{
"@id":"bic:Container",
"@type":"rdfs:Class",
"rdfs:comment":"A Container is a reusable transport and storage unit for moving products and raw materials between locations or countries",
"rdfs:label":"Container"
}
],
"Container":{
"ContainerNumber":{
"description":"Unique identifier for the container to the BIC Code holder",
"type":"text"
},
"BicCode":{
"description":"Registered code used to identify the owner of the container",
"type":"text"
},
"CubicCapacity":{
"description":"The maximum capacity of a container in Cubic Meters",
"type":"float"
},
"ISOType":{
"description":"The type of container as defined by ISO under ISO XXXX",
"type":"string"
},
"MaxGrossMass":{
"description":"The maximum gross mass of a container in Kilograms when laden",
"type":"float"
},
"MaxPayload":{
"description":"The maximum payload a container can hold in Kilograms",
"type":"float"
},
"TareWeight":{
"description":"The weight of the container when empty",
"type":"float"
}
}
}
To be used like below ?
{
"@context": "http://vocab.bic-code.org#",
"@type": "Container",
"BicCode": "NNCU",
"ContainerNumber": "NNCU1000180",
"CubicCapacity": 33.0,
"ISOType": "20G1",
"MaxGrossMass": 30480,
"MaxPayload": 28130,
"TareWeight": 2280
}
from spec-jsonld.
@cmsdroff , please action.
@nissimsan made a start!
from spec-jsonld.
Awesome, @cmsdroff !
The one thing I would ask before PR'ing this example would be to also include an actual un/cefact definition. You define the context, but don't use it.
To be clear: it's perfectly cool to have bic definitions also. It serves a good purpose to have both contexts in the example. but without using cefact, it's not really a cefact example. :)
Here is the parsed graph:
<bic:Container> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <rdfs:Class> _:b0 .
<bic:Container> <rdfs:comment> "A Container is a reusable transport and storage unit for moving products and raw materials between locations or countries" _:b0 .
<bic:Container> <rdfs:label> "Container" _:b0 .
_:b0 <http://vocab.bic-code.org#container> _:b1 .
_:b1 <http://vocab.bic-code.org#BicCode> _:b2 .
_:b1 <http://vocab.bic-code.org#ContainerNumber> _:b3 .
_:b1 <http://vocab.bic-code.org#TareWeight> _:b4 .
_:b2 <http://vocab.bic-code.org#description> "Registered code used to identify the owner of the container" .
_:b2 <http://vocab.bic-code.org#type> "text" .
_:b3 <http://vocab.bic-code.org#description> "Unique identifier for the container to the BIC Code holder" .
_:b3 <http://vocab.bic-code.org#type> "text" .
_:b4 <http://vocab.bic-code.org#description> "The weight of the container when empty" .
from spec-jsonld.
I plan to relate it to the TransportEquipment
https://service.unece.org/trade/uncefact/vocabulary/uncefact/#TransportEquipment
the UN is of course multimodal and this is a specification of the transport equipment in relation to a 'Container'.
So maybe some equivalent or reference to, as opposed to a a transport document that references the json-ld.
from spec-jsonld.
@cmsdroff reaching out into BIC is an awesome idea, however the JSONLD is wrong. Always convert to turtle (or trig) to check your work.
Some brief observations (there may be more)
- superfluous graph (b0 in @nissimsan 's conversion)
- prop names should use lowerCamelCase
- lumping props under the class is no good. You need to define rdfs:domain or schema:domain includes
type, description, text
are not keywords you can use to define ontological props
I think you'd be better off defining the ontology in turtle then converting to JSONLD.
Eg see https://github.com/gs1/EPCIS/tree/master/Ontology: EPCIS.ttl is an example, and https://github.com/gs1/EPCIS/tree/master/Ontology#conversion-to-jsonld describes how it's converted to EPCIS.jsonld.
https://github.com/gs1/EPCIS/blob/master/Ontology/EPCIS-CBV-context.jsonld is used in the conversion to make the JSONLD as nice as possible
from spec-jsonld.
Great feedback @VladimirAlexiev is done the above by hand as I was learning but now looking at these suggestions and hope to have something revised inline for next meeting š
from spec-jsonld.
Now I have looked into the suggestions from @VladimirAlexiev on how to approach this and we are about to close #105 imminently I think I can create some examples for facilities and link the the unlocode outputs from #105, aim to do this for next meeting
from spec-jsonld.
DRAFT for discussion during tomorrows call @nissimsan tried to use the committed work on unlocodes #105 for a container facility and ocean terminal. I've based this on a Facility rather than container as in initial example.
Copy the below code into https://issemantic.net/rdf-visualizer
Not perfect by any means and im yet to convert to turtle for checking etc that's next š¤£
I linked to the UNLOCODE, Function, Subdivision and Country as below.
{
"@context": [
"https://schema.org",
{"unlcdc": "https://service.unece.org/trade/uncefact/vocabulary/unlocode-countries/"},
{"unlcds": "https://service.unece.org/trade/uncefact/vocabulary/unlocode-subdivisions/"},
{"unlcd": "https://service.unece.org/trade/uncefact/vocabulary/unlocode/"},
{"unlcdf": "https://service.unece.org/trade/uncefact/vocabulary/unlocode-functions/"}
],
"@type": "ContainerFacility",
"name": "HHLA CONTAINER TERMINAL ALTENWERDER (CTA)",
"unlcdc":"DE",
"unlcds":"HH",
"unlcd":"DEHAM",
"unlcdf": [1,2,3,4,5],
"address": {
"@type": "PostalAddress",
"streetAddress": "Am Ballinkai 1",
"addressLocality": "Hamburg",
"postalCode": "21129",
"addressCountry": "DE"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 53.509241285961544,
"longitude": 9.927578892050956
},
"url": "https://www.bic-code.org/facility-codes/GBLIVJMDA"
}
from spec-jsonld.
Iād probably omit the function and subdivision if publishing as the link to the unlocode would expose these but in think value in sharing county and maybe subdivision
from spec-jsonld.
Revised but still WIP storing here for coming back to ahead of next call.
{
"@context": [
{"unlcd": "https://dmvc7xzscpizo.cloudfront.net/unlocode"},
{"unlcdc": "https://dmvc7xzscpizo.cloudfront.net/unlocode-countries"},
{"unlcds": "https://dmvc7xzscpizo.cloudfront.net/unlocode-subdivisions"},
{"unlcdf": "https://dmvc7xzscpizo.cloudfront.net/unlocode-functions"},
"https://schema.org"
],
"@type": ["Place"],
"name": "HHLA CONTAINER TERMINAL ALTENWERDER (CTA)",
"unlcdc": "DE",
"unlcd": {
"@type": "unlcdv:UNLOCODE",
"unlocode": "DEHAM",
"countryCode":"DE"
},
"address": {
"@type": "PostalAddress",
"streetAddress": "Am Ballinkai 1",
"addressCountry": "DE",
"addressRegion": "Hamburg",
"postalCode": "2119"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 53.509241285961544,
"longitude": 9.927578892050956
},
"url": "https://www.bic-code.org/facility-codes/GBLIVJMDA"
}
Passes on schema validator where the old did not https://validator.schema.org
Points to resolve:
- The vocab url doesn't currently work and im looking for the property names in the unlcoode for example but calling via postman seems to time out for unlocode (
https://dmvc7xzscpizo.cloudfront.net/unlocode-vocab
) @kshychko is this me or is it a bug? - Not sure if referencing the unlocode or country in the right way, moved schema.org to the bottom to resolve last
from spec-jsonld.
@cmsdroff , if you need to use the context files, we've got the following contexts published:
https://dmvc7xzscpizo.cloudfront.net/unece-context.jsonld
https://dmvc7xzscpizo.cloudfront.net/unlocode-vocab-context.jsonld
from spec-jsonld.
Related Issues (20)
- Inconsistent Naming with Header Objects, and alignment with the UNCEFACT JSON Schema HOT 2
- Update LOCODE from 2021 to 2022
- Update from 22A to 22B HOT 2
- Missing LOCODE property
- unlocode.jsonld doesn't define prefix `unlcdf` HOT 1
- the two contexts are not used in the ontology; ensure stable URL, updatability, content type
- direct download of uncefact and unlocode jsonld
- use `uncefact` or `unece` consistently HOT 2
- `unlcdv:functions` should be spelled in singular
- update namespace of the uncefact ontology HOT 1
- add owl:Ontology to uncefact and unlocode ontologies
- codelist properties are missing from ontology and list of props
- add jsonld representation of codelists, move them to a sub-namespace HOT 1
- normalize `cefactBusinessProcess`
- overlapping CodeList vs non-codelist properties
- website and ontology are not in sync! HOT 2
- access to test.uncefact.org?
- data props wrongly declared as owl:ObjectProperty HOT 1
- Old codes not included in current release
- json ld validation errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spec-jsonld.