Skip to content

Latest commit

 

History

History
627 lines (571 loc) · 21.6 KB

File metadata and controls

627 lines (571 loc) · 21.6 KB

Smart Data Models

Entity: Curve

Open License

document generated automatically

Global description: This entity contains a harmonised description of a generic curve made for the Water Network Management domain. This entity is primarily associated with the water management vertical and related IoT applications.

version: 0.0.1

List of properties

[*] If there is not a type in an attribute is because it could have several types or different formats/patterns

  • address[object]: The mailing address . Model: https://schema.org/address
  • alternateName[string]: An alternative name for this item
  • areaServed[string]: The geographic area where a service or offered item is provided . Model: https://schema.org/Text
  • curveType[string]: Entity's curve type. Enum:'FLOW-HEAD, FLOW-EFFICIENCY, FLOW-HEADLOSS, LEVEL-VOLUME'
  • dataProvider[string]: A sequence of characters identifying the provider of the harmonised data entity
  • dateCreated[date-time]: Entity creation timestamp. This will usually be allocated by the storage platform
  • dateModified[date-time]: Timestamp of the last modification of the entity. This will usually be allocated by the storage platform
  • description[string]: A description of this item
  • id[*]: Unique identifier of the entity
  • location[*]: Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon
  • name[string]: The name of this item
  • owner[array]: A List containing a JSON encoded sequence of characters referencing the unique Ids of the owner(s)
  • seeAlso[*]: list of uri pointing to additional resources about the item
  • source[string]: A sequence of characters giving the original source of the entity data as a URL. Recommended to be the fully qualified domain name of the source provider, or the URL to the source object
  • tag[string]: An optional text string used to assign the pipe to a category, perhaps one based on age or material . Model: https://schema.org/Text
  • type[string]: NGSI-LD Entity Type. It must be equal to Curve
  • xData[array]: X data points for the curve
  • yData[array]: Y data points for the curve

Required properties

  • curveType
  • id
  • type
  • xData
  • yData

Data Model description of properties

Sorted alphabetically (click for details)

full yaml details
Curve:      
  description: This entity contains a harmonised description of a generic curve made for the Water Network Management domain. This entity is primarily associated with the water management vertical and related IoT applications.      
  properties:      
    address:      
      description: The mailing address      
      properties:      
        addressCountry:      
          description: 'The country. For example, Spain'      
          type: string      
          x-ngsi:      
            model: https://schema.org/addressCountry      
            type: Property      
        addressLocality:      
          description: 'The locality in which the street address is, and which is in the region'      
          type: string      
          x-ngsi:      
            model: https://schema.org/addressLocality      
            type: Property      
        addressRegion:      
          description: 'The region in which the locality is, and which is in the country'      
          type: string      
          x-ngsi:      
            model: https://schema.org/addressRegion      
            type: Property      
        district:      
          description: 'A district is a type of administrative division that, in some countries, is managed by the local government'      
          type: string      
          x-ngsi:      
            type: Property      
        postOfficeBoxNumber:      
          description: 'The post office box number for PO box addresses. For example, 03578'      
          type: string      
          x-ngsi:      
            model: https://schema.org/postOfficeBoxNumber      
            type: Property      
        postalCode:      
          description: 'The postal code. For example, 24004'      
          type: string      
          x-ngsi:      
            model: https://schema.org/https://schema.org/postalCode      
            type: Property      
        streetAddress:      
          description: The street address      
          type: string      
          x-ngsi:      
            model: https://schema.org/streetAddress      
            type: Property      
        streetNr:      
          description: Number identifying a specific property on a public street      
          type: string      
          x-ngsi:      
            type: Property      
      type: object      
      x-ngsi:      
        model: https://schema.org/address      
        type: Property      
    alternateName:      
      description: An alternative name for this item      
      type: string      
      x-ngsi:      
        type: Property      
    areaServed:      
      description: The geographic area where a service or offered item is provided      
      type: string      
      x-ngsi:      
        model: https://schema.org/Text      
        type: Property      
    curveType:      
      description: 'Entity''s curve type. Enum:''FLOW-HEAD, FLOW-EFFICIENCY, FLOW-HEADLOSS, LEVEL-VOLUME'''      
      enum:      
        - FLOW-HEAD      
        - FLOW-EFFICIENCY      
        - FLOW-HEADLOSS      
        - LEVEL-VOLUME      
      type: string      
      x-ngsi:      
        type: Property      
    dataProvider:      
      description: A sequence of characters identifying the provider of the harmonised data entity      
      type: string      
      x-ngsi:      
        type: Property      
    dateCreated:      
      description: Entity creation timestamp. This will usually be allocated by the storage platform      
      format: date-time      
      type: string      
      x-ngsi:      
        type: Property      
    dateModified:      
      description: Timestamp of the last modification of the entity. This will usually be allocated by the storage platform      
      format: date-time      
      type: string      
      x-ngsi:      
        type: Property      
    description:      
      description: A description of this item      
      type: string      
      x-ngsi:      
        type: Property      
    id:      
      anyOf:      
        - description: Identifier format of any NGSI entity      
          maxLength: 256      
          minLength: 1      
          pattern: ^[\w\-\.\{\}\$\+\*\[\]`|~^@!,:\\]+$      
          type: string      
          x-ngsi:      
            type: Property      
        - description: Identifier format of any NGSI entity      
          format: uri      
          type: string      
          x-ngsi:      
            type: Property      
      description: Unique identifier of the entity      
      x-ngsi:      
        type: Property      
    location:      
      description: 'Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon'      
      oneOf:      
        - description: Geojson reference to the item. Point      
          properties:      
            bbox:      
              items:      
                type: number      
              minItems: 4      
              type: array      
            coordinates:      
              items:      
                type: number      
              minItems: 2      
              type: array      
            type:      
              enum:      
                - Point      
              type: string      
          required:      
            - type      
            - coordinates      
          title: GeoJSON Point      
          type: object      
          x-ngsi:      
            type: GeoProperty      
        - description: Geojson reference to the item. LineString      
          properties:      
            bbox:      
              items:      
                type: number      
              minItems: 4      
              type: array      
            coordinates:      
              items:      
                items:      
                  type: number      
                minItems: 2      
                type: array      
              minItems: 2      
              type: array      
            type:      
              enum:      
                - LineString      
              type: string      
          required:      
            - type      
            - coordinates      
          title: GeoJSON LineString      
          type: object      
          x-ngsi:      
            type: GeoProperty      
        - description: Geojson reference to the item. Polygon      
          properties:      
            bbox:      
              items:      
                type: number      
              minItems: 4      
              type: array      
            coordinates:      
              items:      
                items:      
                  items:      
                    type: number      
                  minItems: 2      
                  type: array      
                minItems: 4      
                type: array      
              type: array      
            type:      
              enum:      
                - Polygon      
              type: string      
          required:      
            - type      
            - coordinates      
          title: GeoJSON Polygon      
          type: object      
          x-ngsi:      
            type: GeoProperty      
        - description: Geojson reference to the item. MultiPoint      
          properties:      
            bbox:      
              items:      
                type: number      
              minItems: 4      
              type: array      
            coordinates:      
              items:      
                items:      
                  type: number      
                minItems: 2      
                type: array      
              type: array      
            type:      
              enum:      
                - MultiPoint      
              type: string      
          required:      
            - type      
            - coordinates      
          title: GeoJSON MultiPoint      
          type: object      
          x-ngsi:      
            type: GeoProperty      
        - description: Geojson reference to the item. MultiLineString      
          properties:      
            bbox:      
              items:      
                type: number      
              minItems: 4      
              type: array      
            coordinates:      
              items:      
                items:      
                  items:      
                    type: number      
                  minItems: 2      
                  type: array      
                minItems: 2      
                type: array      
              type: array      
            type:      
              enum:      
                - MultiLineString      
              type: string      
          required:      
            - type      
            - coordinates      
          title: GeoJSON MultiLineString      
          type: object      
          x-ngsi:      
            type: GeoProperty      
        - description: Geojson reference to the item. MultiLineString      
          properties:      
            bbox:      
              items:      
                type: number      
              minItems: 4      
              type: array      
            coordinates:      
              items:      
                items:      
                  items:      
                    items:      
                      type: number      
                    minItems: 2      
                    type: array      
                  minItems: 4      
                  type: array      
                type: array      
              type: array      
            type:      
              enum:      
                - MultiPolygon      
              type: string      
          required:      
            - type      
            - coordinates      
          title: GeoJSON MultiPolygon      
          type: object      
          x-ngsi:      
            type: GeoProperty      
      x-ngsi:      
        type: GeoProperty      
    name:      
      description: The name of this item      
      type: string      
      x-ngsi:      
        type: Property      
    owner:      
      description: A List containing a JSON encoded sequence of characters referencing the unique Ids of the owner(s)      
      items:      
        anyOf:      
          - description: Identifier format of any NGSI entity      
            maxLength: 256      
            minLength: 1      
            pattern: ^[\w\-\.\{\}\$\+\*\[\]`|~^@!,:\\]+$      
            type: string      
            x-ngsi:      
              type: Property      
          - description: Identifier format of any NGSI entity      
            format: uri      
            type: string      
            x-ngsi:      
              type: Property      
        description: Unique identifier of the entity      
        x-ngsi:      
          type: Property      
      type: array      
      x-ngsi:      
        type: Property      
    seeAlso:      
      description: list of uri pointing to additional resources about the item      
      oneOf:      
        - items:      
            format: uri      
            type: string      
          minItems: 1      
          type: array      
        - format: uri      
          type: string      
      x-ngsi:      
        type: Property      
    source:      
      description: 'A sequence of characters giving the original source of the entity data as a URL. Recommended to be the fully qualified domain name of the source provider, or the URL to the source object'      
      type: string      
      x-ngsi:      
        type: Property      
    tag:      
      description: 'An optional text string used to assign the pipe to a category, perhaps one based on age or material'      
      type: string      
      x-ngsi:      
        model: https://schema.org/Text      
        type: Property      
    type:      
      description: NGSI-LD Entity Type. It must be equal to Curve      
      enum:      
        - Curve      
      type: string      
      x-ngsi:      
        type: Property      
    xData:      
      description: X data points for the curve      
      items:      
        type: number      
      type: array      
      x-ngsi:      
        type: Property      
    yData:      
      description: Y data points for the curve      
      items:      
        type: number      
      type: array      
      x-ngsi:      
        type: Property      
  required:      
    - id      
    - type      
    - curveType      
    - xData      
    - yData      
  type: object      
  x-derived-from: ""      
  x-disclaimer: 'Redistribution and use in source and binary forms, with or without modification, are permitted  provided that the license conditions are met. Copyleft (c) 2022 Contributors to Smart Data Models Program'      
  x-license-url: https://github.com/smart-data-models/dataModel.WaterDistributionManagementEPANET/blob/master/Curve/LICENSE.md      
  x-model-schema: https://smart-data-models.github.io/dataModel.WaterDistributionManagementEPANET/Curve/schema.json      
  x-model-tags: FIWARE4WATER      
  x-version: 0.0.1      

Example payloads

Curve NGSI-v2 key-values Example

Here is an example of a Curve in JSON-LD format as key-values. This is compatible with NGSI-v2 when using options=keyValues and returns the context data of an individual entity.

show/hide example
{  
  "id": "fAM-8ca3-4533-a2eb-12015",  
  "type": "Curve",  
  "curveType": "FLOW-HEAD",  
  "xData": [  
    0.5692,  
    0.4647  
  ],  
  "yData": [  
    0.5692,  
    0.4647  
  ],  
  "description": "Free Text",  
  "tag": "DMA1"  
}  

Curve NGSI-v2 normalized Example

Here is an example of a Curve in JSON-LD format as normalized. This is compatible with NGSI-v2 when not using options and returns the context data of an individual entity.

show/hide example
{  
  "id": "fAM-8ca3-4533-a2eb-12015",  
  "type": "Curve",  
  "dateCreated": {  
    "type": "DateTime",  
    "value": "2020-02-16T17:43:00Z"  
  },  
  "dateModified": {  
    "type": "DateTime",  
    "value": "2020-02-16T17:43:00Z"  
  },  
  "curveType": {  
    "type": "Text",  
    "value": "FLOW-HEAD"  
  },  
  "xData": {  
    "type": "StructuredValue",  
    "value": [  
      0.5692,  
      0.4647  
    ]  
  },  
  "yData": {  
    "type": "StructuredValue",  
    "value": [  
      0.5692,  
      0.4647  
    ]  
  },  
  "description": {  
    "type": "Text",  
    "value": "Free Text"  
  },  
  "tag": {  
    "type": "Text",  
    "value": "DMA1"  
  }  
}  

Curve NGSI-LD key-values Example

Here is an example of a Curve in JSON-LD format as key-values. This is compatible with NGSI-LD when using options=keyValues and returns the context data of an individual entity.

show/hide example
{  
  "id": "fAM-8ca3-4533-a2eb-12015",  
  "type": "Curve",  
  "curveType": "FLOW-HEAD",  
  "description": "Free Text",  
  "tag": "DMA1",  
  "xData": [  
    0.5692,  
    0.4647  
  ],  
  "yData": [  
    0.5692,  
    0.4647  
  ],  
  "@context": [  
    "https://raw.githubusercontent.com/smart-data-models/dataModel.WaterDistributionManagementEPANET/master/context.jsonld"  
  ]  
}  

Curve NGSI-LD normalized Example

Here is an example of a Curve in JSON-LD format as normalized. This is compatible with NGSI-LD when not using options and returns the context data of an individual entity.

show/hide example
{  
    "id": "urn:ngsi-ld:Curve:fAM-8ca3-4533-a2eb-12015",  
    "type": "Curve",  
    "createdAt": "2020-02-16T17:43:00Z",  
    "curveType": {  
        "type": "Property",  
        "value": "FLOW-HEAD"  
    },  
    "description": {  
        "type": "Property",  
        "value": "Free Text"  
    },  
    "modifiedAt": "2020-02-16T17:43:00Z",  
    "tag": {  
        "type": "Property",  
        "value": "DMA1"  
    },  
    "xData": {  
        "type": "Property",  
        "value": [  
            0.5692,  
            0.4647  
        ],  
        "unitCode": "C62"  
    },  
    "yData": {  
        "type": "Property",  
        "value": [  
            0.5692,  
            0.4647  
        ],  
        "unitCode": "C62"  
    },  
    "@context": [  
        "https://raw.githubusercontent.com/smart-data-models/dataModel.WaterDistributionManagementEPANET/master/context.jsonld"  
    ]  
}  

See FAQ 10 to get an answer on how to deal with magnitude units


Smart Data Models +++ Contribution Manual +++ About