document generated automatically
Global description: Smart Data Models. GTFS Calendar Rule
version: 0.0.1
[*] If there is not a type in an attribute is because it could have several types or different formats/patterns
alternateName[string]
: An alternative name for this itemdataProvider[string]
: A sequence of characters identifying the provider of the harmonised data entitydateCreated[date-time]
: Entity creation timestamp. This will usually be allocated by the storage platformdateModified[date-time]
: Timestamp of the last modification of the entity. This will usually be allocated by the storage platformdescription[string]
: A description of this itemendDate[date]
: End date of this rule inYYYY-MM-DD
format. It can be obtained from the fieldend_date
of calendar.txt . Model: https://schema.org/Booleanfriday[boolean]
: Same as GTFSfriday
. Model: https://schema.org/BooleanhasService[string]
: Service to which this rule applies to. Derived fromservice_id
. Model: https://schema.org/URLid[*]
: Unique identifier of the entitymonday[boolean]
: Same as GTFSmonday
. Model: https://schema.org/Booleanname[string]
: The name of this itemowner[array]
: A List containing a JSON encoded sequence of characters referencing the unique Ids of the owner(s)saturday[boolean]
: Same as GTFSsaturday
. Model: https://schema.org/BooleanseeAlso[*]
: list of uri pointing to additional resources about the itemsource[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 objectstartDate[date]
: Start date of this rule inYYYY-MM-DD
format. It can be obtained from the fieldstart_date
of calendar.txt . Model: https://schema.org/Datesunday[boolean]
: Same as GTFSsunday
. Model: https://schema.org/Booleanthursday[boolean]
: Same as GTFSthursday
. Model: https://schema.org/Booleantuesday[boolean]
: Same as GTFStuesday
. Model: https://schema.org/Booleantype[string]
: NGSI Entity Type: It has to be GtfsCalendarRulewednesday[boolean]
: Same as GTFSwednesday
. Model: https://schema.org/Boolean
Required properties
endDate
friday
hasService
id
monday
saturday
startDate
sunday
thursday
tuesday
type
wednesday
See https://developers.google.com/transit/gtfs/reference/#calendartxt
Sorted alphabetically (click for details)
full yaml details
GtfsCalendarRule:
description: Smart Data Models. GTFS Calendar Rule
properties:
alternateName:
description: An alternative name for this item
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
endDate:
description: "End date of this rule in `YYYY-MM-DD` format. It can be obtained from the field `end_date` of [calendar.txt](https://developers.google.com/transit/gtfs/reference/#calendartxt)"
format: date
type: string
x-ngsi:
model: https://schema.org/Boolean
type: Property
friday:
description: Same as GTFS `friday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
type: Property
hasService:
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: Service to which this rule applies to. Derived from `service_id`
type: string
x-ngsi:
model: https://schema.org/URL
type: Relationship
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
monday:
description: Same as GTFS `monday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
type: Property
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
saturday:
description: Same as GTFS `saturday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
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
startDate:
description: "Start date of this rule in `YYYY-MM-DD` format. It can be obtained from the field `start_date` of [calendar.txt](https://developers.google.com/transit/gtfs/reference/#calendartxt)"
format: date
type: string
x-ngsi:
model: https://schema.org/Date
type: Property
sunday:
description: Same as GTFS `sunday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
type: Property
thursday:
description: Same as GTFS `thursday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
type: Property
tuesday:
description: Same as GTFS `tuesday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
type: Property
type:
description: 'NGSI Entity Type: It has to be GtfsCalendarRule'
enum:
- GtfsCalendarRule
type: string
x-ngsi:
type: Property
wednesday:
description: Same as GTFS `wednesday`
type: boolean
x-ngsi:
model: https://schema.org/Boolean
type: Property
required:
- id
- type
- hasService
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- startDate
- endDate
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.UrbanMobility/blob/master/GtfsCalendarRule/LICENSE.md
x-model-schema: https://smart-data-models.github.io/dataModel.UrbanMobility/GtfsCalendarRule/schema.json
x-model-tags: ""
x-version: 0.0.1
Here is an example of a GtfsCalendarRule 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": "urn:ngsi-ld:CalendarRule:Madrid:Rule1267",
"type": "GtfsCalendarRule",
"name": "Rule Hospital Service 1",
"hasService": "urn:ngsi-ld:GtfsService:Madrid:Hospital_1",
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": false,
"sunday": false,
"startDate": "2018-01-01",
"endDate": "2019-01-01"
}
Here is an example of a GtfsCalendarRule 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": "urn:ngsi-ld:CalendarRule:Madrid:Rule1267",
"type": "GtfsCalendarRule",
"startDate": {
"type": "DateTime",
"value": "2018-01-01"
},
"endDate": {
"type": "DateTime",
"value": "2019-01-01"
},
"name": {
"type": "Text",
"value": "Rule Hospital Service 1"
},
"monday": {
"type": "Boolean",
"value": true
},
"tuesday": {
"type": "Boolean",
"value": true
},
"friday": {
"type": "Boolean",
"value": true
},
"wednesday": {
"type": "Boolean",
"value": true
},
"thursday": {
"type": "Boolean",
"value": true
},
"sunday": {
"type": "Boolean",
"value": false
},
"hasService": {
"type": "Text",
"value": "urn:ngsi-ld:GtfsService:Madrid:Hospital_1"
},
"saturday": {
"type": "Boolean",
"value": false
}
}
Here is an example of a GtfsCalendarRule 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": "urn:ngsi-ld:CalendarRule:Madrid:Rule1267",
"type": "GtfsCalendarRule",
"endDate": "2019-01-01",
"friday": true,
"hasService": "urn:ngsi-ld:GtfsService:Madrid:Hospital_1",
"monday": true,
"name": "Rule Hospital Service 1",
"saturday": false,
"startDate": "2018-01-01",
"sunday": false,
"thursday": true,
"tuesday": true,
"wednesday": true,
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"https://raw.githubusercontent.com/smart-data-models/dataModel.UrbanMobility/master/context.jsonld"
]
}
Here is an example of a GtfsCalendarRule 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:CalendarRule:Madrid:Rule1267",
"type": "GtfsCalendarRule",
"endDate": {
"type": "Property",
"value": {
"@type": "Date",
"@value": "2019-01-01"
}
},
"friday": {
"type": "Property",
"value": true
},
"hasService": {
"type": "Relationship",
"object": "urn:ngsi-ld:GtfsService:Madrid:Hospital_1"
},
"monday": {
"type": "Property",
"value": true
},
"name": {
"type": "Property",
"value": "Rule Hospital Service 1"
},
"saturday": {
"type": "Property",
"value": false
},
"startDate": {
"type": "Property",
"value": {
"@type": "Date",
"@value": "2018-01-01"
}
},
"sunday": {
"type": "Property",
"value": false
},
"thursday": {
"type": "Property",
"value": true
},
"tuesday": {
"type": "Property",
"value": true
},
"wednesday": {
"type": "Property",
"value": true
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"https://raw.githubusercontent.com/smart-data-models/dataModel.UrbanMobility/master/context.jsonld"
]
}
See FAQ 10 to get an answer on how to deal with magnitude units