This document includes the description of the data structures used for storing and exchanging information between software components and services.
The persistent storage of the ICT Platform consists mainly of a list of MongoDB databases, containing “unstructured”/dynamic data in JSON representation. On these schema-less databases, the linked relationships between them and external sources is designed with the W3C recommendation, JSON-LD. JSON-LD is a Linked Data format initiative, aiming towards the transformation of WWW to the Semantic Web. The major characteristic is the creation of links between information and the standardization of common properties using shared vocabularies/ontologies like Schema.org, openLCA and GS1 Vocabulary from GS1 SmartSearch.
The JSON-LD Schema defines all possible properties, types and values that is possible to use in a JSON-LD document.
The ICT Platform Core system contains the following databases in a MongoDB server instance:
The JSON representation of MongoDB records is suitable for applying the JSON-LD linked data design to the unstructured nature of MongoDB. The data can be linked into node graphs (friend of a friend), end to end relationships (individual product to materials) and use a common metadata model: a Resource Description Framework (RDF).
See the section Data Models below for a detailed description on the modeling of database records and exchanged data structures.
These databases are not part of the ICT Platform system, the data is imported from them:
In the following sections each data model used in the persistence layer or exchanged between system modules is described in detail. Each data model is accompanied with its JSON-LD and JSON Schema, where those apply.
Check here for a complete directory of all the files described below. The datamodels/json-ld folder contains the JSON-LD representation of a data model, while datamodels/json-schema contain the JSON schemas. The latter are generated from the former with extra manual editing.
"@id": "<See file Brand.json>" is used by ICCS in order to avoid duplication of a full JSON-LD document inside the value of a property. For instance a JSON-LD document with this property:
"brand": { "@type": "Brand", "@id": "<See file Brand.json>" }
is actually expanded to:
"brand": { "@context": "http://schema.org", "@type": [ "Brand", "Organization" ], "@id": "<IRI of owner of this product, ideally in JSON-LD same as http://schema.org/Brand or http://schema.org/Organization.>", "name": "<Brand name>", "logo": "<An associated logo, URL or https://schema.org/ImageObject>", "slogan": "<A slogan or motto associated with the item.>" }
"@id": "IRI reference to a node" is the method to refer to another node’s Linked Data JSON-LD document using an Internationalized Resource Identifier.
NOTE: All JSON-LD objects below are validated with Google’s Structured Data Testing Tool. The main vocabulary used is Schema.org so each time you read below "@type": "Typename", you should visit the URL https://schema.org/Typename for a detailed description of the class type and all of its properties.
All JSON Schemas referenced below are generated from their corresponding JSON-LD with the help of JSON Schema Tool. The initial tool output is modified is modified manually to create references between schemas. This avoids the source code generation of multiple incompatible versions of the same JSON Schema.
The JSON Schemas can be used to generate source code for various programming languages with the help of various tools: quicktype, jsonschema2pojo. Integrating these tools in your build system allows the automatic generation of source code changes after any Data model change. The generated source code encapsulates the properties of the documents and provides automatic validation of data passed to them.
The example documents referenced below contain example information wrapped with < and >. The property values that are not wrapped, are constants required by the JSON-LD schema, like "@type": "Person".
In JSON-LD format, a product data model encapsulates all information that uniquely identifies a single market product using the class type http://schema.org/Product and also custom classes for describing the life-cycle and Eco-accounting properties related to a product. The data model consists of the following main components:
In JSON-LD format, the Eco-account is actually a https://schema.org/Person linked together with his Eco-balance or any other properties we wish. You can easily extend it with any other properties from https://schema.org/. The data model is broken into 2 main parts:
EcoAccount uniquely identifies the person this account belongs to. This is the part of the structure that directly maps to https://schema.org/Person.
EcoBalance contains the account’s Environmental Footprint properties. According to Deliverable 1.3, the main properties of the EcoBalance are the EcoCredit and EcoDebit values, calculated from a single EcoPoint value of a specific product. The EcoPoint value is calculated with the ReCiPe LCIA method, by summing-up its three end-point values of damages to human health, ecosystem and resources diversity. Also contained within EcoBalance is the history of the user’s purchased and recycled products.
This data model defines the export data schema of the ENV Data Export Service service. It contains the following hierarchy: