Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Archiving
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Apr 12, 2021
1 parent a8fd2e8 commit 6702d0d
Show file tree
Hide file tree
Showing 104 changed files with 641 additions and 347 deletions.
7 changes: 7 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

mkdocs:
configuration: mkdocs.yml

python:
version: 3.6
80 changes: 0 additions & 80 deletions .travis.yml

This file was deleted.

136 changes: 12 additions & 124 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# FIWARE Data Models

[![FIWARE Core Context Management](https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/core.svg)](https://www.fiware.org/developers/catalogue/)
![](https://nexus.lab.fiware.org/static/badges/statuses/deprecated.svg)
[![License: MIT](https://img.shields.io/github/license/FIWARE/data-models.svg)](https://opensource.org/licenses/MIT)
[![Support badge](https://img.shields.io/badge/support-askbot-yellowgreen.svg)](http://ask.fiware.org)
<br/>
[![Documentation](https://img.shields.io/readthedocs/fiware-datamodels.svg)](https://fiware-datamodels.rtfd.io)
[![Build badge](https://img.shields.io/travis/FIWARE/data-models.svg "Travis build status")](https://travis-ci.org/FIWARE/data-models/)

This repository is going to be archived (Jan-2020) and subsequent works will be carried out in [Smart data models] (https://github.com/smart-data-models) repositories. Further questions on migration. [alberto.abella@fiware.org](mailto:alberto.abella@fiware.org)
> This repository is now archived and subsequent works will be carried out in
> [Smart data models](https://github.com/smart-data-models) repositories.
This repository contains:
This repository contained:

- [JSON Schemas and documentation](./specs/README.md) on harmonized datamodels
for different Smart Domains, particularly **Smart Cities** and **Smart
Expand All @@ -21,20 +19,19 @@ This repository contains:
[NGSI-LD](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.01.01_60/gs_CIM009v010101p.pdf)
APIs (query).

This work is aligned with the results of the
This work was aligned with the results of the
[GSMA IoT Big Data](https://www.gsma.com/iot/iot-big-data/) Project. Such
project is working on the harmonization of APIs and data models for fueling IoT
and Big Data Ecosystems. In fact the FIWARE data models are a superset of the
[GSMA Data Models](https://github.com/GSMADeveloper/NGSI-LD-Entities).

**Some of the Data Models in this Repository have been adopted by a joint
Some of the Data Models in this Repository have been adopted by a joint
initiative between TM Forum and FIWARE Foundation. For more info please check
[https://github.com/smart-data-models/dataModels](https://github.com/smart-data-models/dataModels)**
[https://github.com/smart-data-models/dataModels](https://github.com/smart-data-models/dataModels)

| :books: [Documentation](https://fiware-datamodels.rtfd.io) |
| ---------------------------------------------------------- |


## Data Models adoption

To support the adoption, we created a short [guideline](specs/howto.md) for the
Expand All @@ -44,21 +41,16 @@ usage of data models. If you are using **NGSI-LD**, you should also check the

## JSON Schemas

A [JSON Schema](http://json-schema.org/) is provided for every harmonized data
model. In the future all the documentation could be generated from a JSON
Schema, as it is part of our roadmap. The different JSON Schemas usually depend
on common JSON Schema definitions found at the root directory of this
repository.

There are different online JSON Schema Validators, for instance:
A [JSON Schema](http://json-schema.org/) was provided for every harmonized data
model. There are different online JSON Schema Validators, for instance:
[http://jsonschemalint.com/](http://jsonschemalint.com/). For the development of
these schemas the
[AJV JSON Schema Validator](https://github.com/epoberezkin/ajv) is being used.
For using it just install it through npm:

```console
npm install ajv
npm install ajv-cli
npm install ajv
npm install ajv-cli
```

A `validate.sh` script is provided for convenience.
Expand All @@ -69,110 +61,6 @@ For instance, this means that to test JSON schema examples with a
[NGSI-LD](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.01.01_60/gs_CIM009v010101p.pdf)
API implementation, you need to use the `keyValues` mode (`options=keyValues`).

## How to contribute

Contributions should come in the form of pull requests.

**Please note that some of the Data Models in this Repository have been adopted
by a joint initiative between TM Forum and FIWARE Foundation. Pull Requests for
those Data Models shall be done against the corresponding Repository at the
[https://github.com/smart-data-models/](https://github.com/smart-data-models/)
Organization**

New data models should be added under a folder structured as follows:

- `specs/`
- `NewModel/`
- `doc/`
- `spec.md`: A data model description based on the
[data model template](datamodel_template.md), e.g.
[spec.md of WeatherObserved](specs/Weather/WeatherObserved/doc/spec.md).
- `README.md`: A summary file (as an extract from the spec file), e.g.
[README.md of WeatherObserved](specs/Weather/WeatherObserved/README.md)
- `schema.json`: The JSON Schema definition, e.g.
[schema.json of WeatherObserved](specs/Weather/WeatherObserved/schema.json)
- `example.json`: One or more JSON example file, e.g.
[example.json of WeatherObserved](specs/Weather/WeatherObserved/example.json)
- `example-normalized.json`: One or more JSON example file in NGSI v2
normalized format, e.g.
[example-normalized.json of WeatherObserved](specs/Weather/WeatherObserved/example-normalized.json)
- `example-normalized-ld.jsonld`: One or more JSON example file in
**NGSI-LD** normalized format, e.g.
[example-normalized-ld.jsonld of WeatherObserved](specs/Weather/WeatherObserved/example-normalized-ld.jsonld)

The name of the folder should match the Entity Type used in the JSON Schema
(e.g. `NewModel`). For data models including more entities, a hierarchical
folder should be used. The parent folder can include common JSON schemas shared
among the entities. e.g.:

- `specs/`
- `NewModel/`
- `doc/`
- `spec.md`
- `README.md`
- `newmodel-schema.json`: the common schema for the different
entities.
- `NewModelEntityOne/`
- `doc/`
- `spec.md`
- `README.md`
- `schema.json`
- `example.json`
- `example-normalized.json`
- `example-normalized-ld.jsonld`
- `NewModelEntityTwo/`
- `doc/`
- `spec.md`
- `README.md`
- `schema.json`
- `example.json`
- `example-normalized.json`
- `example-normalized-ld.jsonld`

To facilitate contributions and their validation, we developed a tool that is
also used for the Continuous Integration of FIWARE Data Models. The FIWARE Data
Model validator checks the adherence of each data model to the
[FIWARE Data Models guidelines](specs/guidelines.md).

For using it just install it through npm:

```console
npm install -g fiware-model-validator
```

More details are available in the [validator documentation](validator).

### Formatting and Text Correction

When creating a Pull Request, please ensure the files are properly formatted,
the [Husky](https://github.com/typicode/husky) should do this automatically on
`git commit`, but the files can be manually formatted at any time using the
`prettier` and `prettier:text` commands:

```console
cd validator
npm i

# To format JavaScript files:
npm run prettier

# To format Markdown files:
npm run prettier:text

# To Auto-correct Markdown files:
npm run lint:text
```

To check for spelling mistakes and dead links in the text within the Data Model,
run the text linter as shown:

```console
npm test
```

[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: LICENSE

## Related Projects

See:
Expand All @@ -188,7 +76,7 @@ See:

### Code

[MIT](LICENSE) © 2019 FIWARE Foundation e.V.
[MIT](LICENSE) © 2019-2021 FIWARE Foundation e.V.

[![License: MIT](https://img.shields.io/github/license/FIWARE/data-models.svg)](https://opensource.org/licenses/MIT)

Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: Fiware-DataModels
site_name: DEPRECATED Old FIWARE DataModels
site_url: https://fiware-datamodels.readthedocs.org
repo_url: https://github.com/fiware/data-models
site_description: FIWARE Data Models Documentation
Expand All @@ -8,7 +8,7 @@ edit_uri: edit/master/specs/
markdown_extensions: [toc,fenced_code]
use_directory_urls: false
theme: readthedocs
extra_css: ["https://www.fiware.org/style/fiware_readthedocs.css", "https://www.fiware.org/style/fiware_readthedocs_core.css"]
extra_css: ["https://www.fiware.org/style/fiware_readthedocs.css", "https://www.fiware.org/style/fiware_readthedocs_security.css"]
pages:
- Home: index.md
- How to: howto.md
Expand Down
5 changes: 4 additions & 1 deletion specs/AgriFood/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Agrifood Data Models

This repository is going to be archived (Jan-2020) and subsequent works will be carried out in [Smart data models] (https://github.com/smart-data-models) repositories. Further questions on migration. alberto.abella@fiware.org
![](https://nexus.lab.fiware.org/static/badges/statuses/deprecated.svg)

> This repository is now archived and subsequent works will be carried out the
> in [Smart data models](https://github.com/smart-data-models) repositories.
This folder is intended to contain data models for Smart Agri-Food:

Expand Down
8 changes: 5 additions & 3 deletions specs/Alert/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Alert data model

**Note: The latest version of these Data Models can be found at
[https://github.com/smart-data-models/dataModel.Alert](https://github.com/smart-data-models/dataModel.Alert)**
![](https://nexus.lab.fiware.org/static/badges/statuses/deprecated.svg)

This repository is going to be archived (Jan-2020) and subsequent works will be carried out in [Smart data models] (https://github.com/smart-data-models) repositories. Further questions on migration. alberto.abella@fiware.org
> This repository is now archived and subsequent works will be carried out the
> in [Smart data models](https://github.com/smart-data-models) repositories. The
> latest version of these Data Models can be found at
> [https://github.com/smart-data-models/dataModel.Alert](https://github.com/smart-data-models/dataModel.Alert)\*\*
## Description

Expand Down
8 changes: 6 additions & 2 deletions specs/Alert/doc/spec.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Alert data model

**Note: The latest version of this Data Model can be found at
[https://github.com/smart-data-models/dataModel.Alert](https://github.com/smart-data-models/dataModel.Alert)**
![](https://nexus.lab.fiware.org/static/badges/statuses/deprecated.svg)

> This repository is now archived and subsequent works will be carried out the
> in [Smart data models](https://github.com/smart-data-models) repositories. The
> latest version of this Data Model can be found at
> [https://github.com/smart-data-models/dataModel.Alert](https://github.com/smart-data-models/dataModel.Alert)
## Description

Expand Down
11 changes: 8 additions & 3 deletions specs/Aquaculture/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Aquaculture Data Models

This repository is going to be archived (Jan-2020) and subsequent works will be carried out in [Smart data models] (https://github.com/smart-data-models) repositories. Further questions on migration. alberto.abella@fiware.org
![](https://nexus.lab.fiware.org/static/badges/statuses/deprecated.svg)

MODEL UNDER SPECIFICATION. It means that it is possible that some of the contents does not exist or they were in a draft version. It will be warned within the documents
> This repository is now archived and subsequent works will be carried out the
> in [Smart data models](https://github.com/smart-data-models) repositories.
This folder is intended to contain data models for Aquaculture:
MODEL UNDER SPECIFICATION. It means that it is possible that some of the
contents does not exist or they were in a draft version. It will be warned
within the documents

This folder is intended to contain data models for Aquaculture:

- [BreedingOperation]()
- [FishCointaiment]()
Expand Down
20 changes: 18 additions & 2 deletions specs/Building/Building/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,27 @@ API implementation, you need to use the `keyValues` mode (`options=keyValues`).
"category": ["office"],
"containedInPlace": {
"type": "Polygon",
"coordinates": [[[100, 0], [101, 0], [101, 1], [100, 1], [100, 0]]]
"coordinates": [
[
[100, 0],
[101, 0],
[101, 1],
[100, 1],
[100, 0]
]
]
},
"location": {
"type": "Polygon",
"coordinates": [[[100, 0], [101, 0], [101, 1], [100, 1], [100, 0]]]
"coordinates": [
[
[100, 0],
[101, 0],
[101, 1],
[100, 1],
[100, 0]
]
]
},
"address": {
"addressLocality": "London",
Expand Down

0 comments on commit 6702d0d

Please sign in to comment.