Skip to content

Commit

Permalink
Additional entities and front page
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-doyle committed Apr 18, 2018
1 parent 72aec40 commit 3a3053d
Show file tree
Hide file tree
Showing 9 changed files with 299 additions and 2 deletions.
107 changes: 107 additions & 0 deletions definitions/Vehicle-Fault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Vehicle Fault
This entity contains a harmonised description of a Vehicle Fault. This entity is primarily associated with the Automotive vertical segment but might also be relevant to Industry, Smart City, Agriculture and related IoT applications.

| Attribute Name | Attribute Type | Description | Constraint |
|:--- |:--- |:--- |:---:|
| id | @id | Provides a unique identifier for an instance of the entity either in the form of a URI (i.e. either a publicly accessible URL or a URN). | Mandatory |
| type | @type | Defines the type of the entity. | Mandatory |
| createdAt | DateTime | Indicates the date/ time that the instance of the entity was created in ISO 8601 format. The value of this will be set by the server when the entity was created. | Mandatory |
| modifiedAt | DateTime | Indicates the date/ time when the entity was last modified in ISO 8601 format. The value of this will be set by the server when the entity was modified, if the entity has not been modified it may have a null value. | Optional |
| source | Property | Specifies the URL to the source of this data (either organisation or where relevant more specific source) | Recommended |
| dataProvider | Property | Specifies the URL to information about the provider of this information | Recommended |
| entityVersion | Property | The entity specification version as a number. A version number of 2.0 or later denotes the entity is represented using NGSI-LD | Recommended |
| vehicle | Relationship | Reference to the vehicle entity which this fault relates to. | Mandatory |
| observedAt | TemporalProperty | Indicates the date/time the fault was detected or identified. | Mandatory |
| eventType | Property | The event type descriptor, a choice from an enumerated list including: **collision, emergency, harshAccel, harshDecel, auxBatteryWarn, milWarn.** | Mandatory |
| location | GeoProperty | The geo location where the fault was detected or identified. | Recommended |
| processingType | Property | Indicates how the fault was dealt with, e.g. **systemHandled**, or not present if the issue has not been resolved. | Optional |
| resolvedAt | TemporalProperty | Indicates the date/time at which the issue was solved, or not present if the issue has not been resolved. | Optional |
| dtCode | Property | DTC or Diagnostic Trouble Codes are codes generated by the vehicle's computer diagnostic system. These may be manufacturer, equipment or vehicle specific. | Optional |
| faultLog | Property | Free text that records information about the initial fault incident, ongoing updates and fault resolution. | Optional |

## NGSI-LD Context Definition
The following NGSI-LD context definition applies to the **Vehicle Fault** entity

[Download context definition.](../examples/Vehicle-Fault-context.jsonld)

```JavaScript
{
"id": "@id",
"type": "@type",
"DateTime": "http://uri.etsi.org/ngsi-ld/DateTime",
"createdAt": {
"@id": "http://uri.etsi.org/ngsi-ld/createdAt",
"@type": "DateTime"
},
"modifiedAt": {
"@id": "http://uri.etsi.org/ngsi-ld/modifiedAt",
"@type": "DateTime"
},
"Property": "http://etsi.org/nsgi-ld/Property",
"Relationship": "http://uri.etsi.org/ngsi-ld/Relationship",
"observedAt": {
"@id": "http://uri.etsi.org/ngsi-ld/observedAt",
"@type": "DateTime"
},
"GeoProperty": "http://uri.etsi.org/ngsi-ld/GeoProperty",
"TemporalProperty": "http://uri.etsi.org/ngsi-ld/TemporalProperty"
}
```
## Example of Vehicle Fault Entity
The following is an example instance of the **Vehicle Fault** entity

[Download example entity definition.](../examples/Vehicle-Fault.jsonld)

```JavaScript
{
"@context": [
"https://example.com/contexts/coreContext.jsonld",
"https://example.com/contexts/vehicle-fault.jsonld"
],
"id": "urn:ngsi-ld:VehicleFault:4939200a-5ef5-4266-8c91-1f82ad3b543b",
"type": "VehicleFault",
"createdAt": "2017-01-01T01:20:00Z",
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"vehicle": {
"type": "Relationship",
"object": "urn:ngsi-ld:Vehicle:1fa179a6-b507-4857-ad72-eb5513ef05c6"
},
"observedAt": {
"type": "TemporalProperty",
"value": "2017-05-04T10:18:16Z"
},
"eventType": {
"type": "Property",
"value": "emergency"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
-104.99404,
39.75621
]
}
},
"processingType": {
"type": "Property",
"value": "systemHandled"
},
"resolvedAt": {
"type": "TemporalProperty",
"value": "2017-05-04T10:18:16Z"
},
"dtCode": {
"type": "Property",
"value": "EMERG-1234-a"
},
"faultLog": {
"type": "Property",
"value": "Emergency stop. Fault with engine"
}
}
```
69 changes: 69 additions & 0 deletions definitions/Vehicle-Type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Vehicle Type
This entity contains a harmonised description of a vehicleType it forms part of the description of a Vehicle. This entity is primarily associated with the Automotive vertical segment but might also be relevant to Industry, Smart City and Agriculture related IoT applications. Where practicable https://schema.org/Vehicle naming conventions have been adopted.

| Attribute Name | Attribute Type | Description | Constraint |
|:--- |:--- |:--- |:---:|
| id | @id | Provides a unique identifier for an instance of the entity either in the form of a URI (i.e. either a publicly accessible URL or a URN). | Mandatory |
| type | @type | Defines the type of the entity. | Mandatory |
| createdAt | DateTime | Indicates the date/ time that the instance of the entity was created in ISO 8601 format. The value of this will be set by the server when the entity was created. | Mandatory |
| modifiedAt | DateTime | Indicates the date/ time when the entity was last modified in ISO 8601 format. The value of this will be set by the server when the entity was modified, if the entity has not been modified it may have a null value. | Optional |
| source | Property | Specifies the URL to the source of this data (either organisation or where relevant more specific source) | Recommended |
| dataProvider | Property | Specifies the URL to information about the provider of this information | Recommended |
| entityVersion | Property | The entity specification version as a number. A version number of 2.0 or later denotes the entity is represented using NGSI-LD | Recommended |
| model | Property | The vehicle model identifier. | Mandatory |
| category | Property | The vehicle category identifier. | Mandatory |
| manufacturer | Property | The manufacturer’s identifier. | Mandatory |

## NGSI-LD Context Definition
The following NGSI-LD context definition applies to the **Vehicle Type** entity

[Download context definition.](../examples/Vehicle-Type-context.jsonld)

```JavaScript
{
"id": "@id",
"type": "@type",
"DateTime": "http://uri.etsi.org/ngsi-ld/DateTime",
"createdAt": {
"@id": "http://uri.etsi.org/ngsi-ld/createdAt",
"@type": "DateTime"
},
"modifiedAt": {
"@id": "http://uri.etsi.org/ngsi-ld/modifiedAt",
"@type": "DateTime"
},
"Property": "http://etsi.org/nsgi-ld/Property"
}
```
## Example of Vehicle Type Entity
The following is an example instance of the **Vehicle Type** entity

[Download example entity definition.](../examples/Vehicle-Type.jsonld)

```JavaScript
{
"@context": [
"https://example.com/contexts/coreContext.jsonld",
"https://example.com/contexts/vehicle-type.jsonld"
],
"id": "urn:ngsi-ld:VehicleType:33253089-9cea-4227-889e-61950965f6f9",
"type": "VehicleType",
"createdAt": "2017-01-01T01:20:00Z",
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"model": {
"type": "Property",
"value": "M Class"
},
"category": {
"type": "Property",
"value": "SUV"
},
"manufacturer": {
"type": "Property",
"value": "Mercedes Benz"
}
}
```
4 changes: 3 additions & 1 deletion definitions/Vehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This entity contains a harmonised description of a Vehicle. This entity is prima
| modifiedAt | DateTime | Indicates the date/ time when the entity was last modified in ISO 8601 format. The value of this will be set by the server when the entity was modified, if the entity has not been modified it may have a null value. | Optional |
| source | Property | Specifies the URL to the source of this data (either organisation or where relevant more specific source) | Recommended |
| dataProvider | Property | Specifies the URL to information about the provider of this information | Recommended |
| entityVersion | Property | The entity specification version as a number. A version number of 2.0 or later denotes the entity is represented using NGSI-LD | Recommended |
| vehicleType | Relationship | Reference to the type of the vehicle entity. | Mandatory |
| fuelType | Property | A choice from an enumerated list describing the power source. One of: **gasoline, petrol(unleaded), petrol(leaded), petrol, diesel, electric, hydrogen, lpg autogas, cng, biodiesel, ethanol, hybrid electric/petrol, hybrid electric/diesel, other** | Optional |
| displacement | Property | A number indicating the cylinder capacity of the engine nominally in litres. | Optional |
Expand Down Expand Up @@ -58,9 +59,10 @@ The following is an example instance of the **Vehicle** entity
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"vehicleType": {
"type": "Relationship",
"object": "urn:ngsi-ld:VehicleType:23821045-33d4-46ec-b777-98f461bf4856"
"object": "urn:ngsi-ld:VehicleType:33253089-9cea-4227-889e-61950965f6f9"
},
"fuelType": {
"type": "Property",
Expand Down
21 changes: 21 additions & 0 deletions examples/Vehicle-Fault-context.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "@id",
"type": "@type",
"DateTime": "http://uri.etsi.org/ngsi-ld/DateTime",
"createdAt": {
"@id": "http://uri.etsi.org/ngsi-ld/createdAt",
"@type": "DateTime"
},
"modifiedAt": {
"@id": "http://uri.etsi.org/ngsi-ld/modifiedAt",
"@type": "DateTime"
},
"Property": "http://etsi.org/nsgi-ld/Property",
"Relationship": "http://uri.etsi.org/ngsi-ld/Relationship",
"observedAt": {
"@id": "http://uri.etsi.org/ngsi-ld/observedAt",
"@type": "DateTime"
},
"GeoProperty": "http://uri.etsi.org/ngsi-ld/GeoProperty",
"TemporalProperty": "http://uri.etsi.org/ngsi-ld/TemporalProperty"
}
51 changes: 51 additions & 0 deletions examples/Vehicle-Fault.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"@context": [
"https://example.com/contexts/coreContext.jsonld",
"https://example.com/contexts/vehicle-fault.jsonld"
],
"id": "urn:ngsi-ld:VehicleFault:4939200a-5ef5-4266-8c91-1f82ad3b543b",
"type": "VehicleFault",
"createdAt": "2017-01-01T01:20:00Z",
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"vehicle": {
"type": "Relationship",
"object": "urn:ngsi-ld:Vehicle:1fa179a6-b507-4857-ad72-eb5513ef05c6"
},
"observedAt": {
"type": "TemporalProperty",
"value": "2017-05-04T10:18:16Z"
},
"eventType": {
"type": "Property",
"value": "emergency"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
-104.99404,
39.75621
]
}
},
"processingType": {
"type": "Property",
"value": "systemHandled"
},
"resolvedAt": {
"type": "TemporalProperty",
"value": "2017-05-04T10:18:16Z"
},
"dtCode": {
"type": "Property",
"value": "EMERG-1234-a"
},
"faultLog": {
"type": "Property",
"value": "Emergency stop. Fault with engine"
}
}
14 changes: 14 additions & 0 deletions examples/Vehicle-Type-context.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"id": "@id",
"type": "@type",
"DateTime": "http://uri.etsi.org/ngsi-ld/DateTime",
"createdAt": {
"@id": "http://uri.etsi.org/ngsi-ld/createdAt",
"@type": "DateTime"
},
"modifiedAt": {
"@id": "http://uri.etsi.org/ngsi-ld/modifiedAt",
"@type": "DateTime"
},
"Property": "http://etsi.org/nsgi-ld/Property"
}
25 changes: 25 additions & 0 deletions examples/Vehicle-Type.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"@context": [
"https://example.com/contexts/coreContext.jsonld",
"https://example.com/contexts/vehicle-type.jsonld"
],
"id": "urn:ngsi-ld:VehicleType:33253089-9cea-4227-889e-61950965f6f9",
"type": "VehicleType",
"createdAt": "2017-01-01T01:20:00Z",
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"model": {
"type": "Property",
"value": "M Class"
},
"category": {
"type": "Property",
"value": "SUV"
},
"manufacturer": {
"type": "Property",
"value": "Mercedes Benz"
}
}
3 changes: 2 additions & 1 deletion examples/Vehicle.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"vehicleType": {
"type": "Relationship",
"object": "urn:ngsi-ld:VehicleType:23821045-33d4-46ec-b777-98f461bf4856"
"object": "urn:ngsi-ld:VehicleType:33253089-9cea-4227-889e-61950965f6f9"
},
"fuelType": {
"type": "Property",
Expand Down
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Harmonised Entities
| Entity Name | Specification | Context Definition | Example Entity |
|:--- |:--- |:--- |:---:|
| **Vehicle** | [*Vehicle* entity specification.](definitions/Vehicle.md) | [*Vehicle* context example.](examples/Vehicle-context.jsonld) | [*Vehicle* entity example.](examples/Vehicle.jsonld) |
| **Vehicle Fault** | [*Vehicle Fault* entity specification.](definitions/Vehicle-Fault.md) | [*Vehicle Fault* context example.](examples/Vehicle-Fault-context.jsonld) | [*Vehicle Fault* entity example.](examples/Vehicle-Fault.jsonld) |
| **Vehicle Type** | [*Vehicle Type* entity specification.](definitions/Vehicle-Type.md) | [*Vehicle Type* context example.](examples/Vehicle-Type-context.jsonld) | [*Vehicle Type* entity example.](examples/Vehicle-Type.jsonld) |

0 comments on commit 3a3053d

Please sign in to comment.