View Source SmartCity.Dataset (smart_city v6.0.0)
Struct defining a dataset definition and functions for retrieving key elements of the dataset for handling.
const Dataset = {
"id": "", // UUID
"business": { // Project Open Data Metadata Schema v1.1
"authorEmail": "",
"authorName": "",
"benefitRating": 0, // value between 0.0 and 1.0
"categories": [""],
"conformsToUri": "",
"contactEmail": "",
"contactName": "",
"dataTitle": "", // user friendly (dataTitle)
"describedByMimeType": "",
"describedByUrl": "",
"description": "",
"homepage": "",
"issuedDate": "",
"keywords": [""],
"language": "",
"license": "",
"modifiedDate": "",
"orgTitle": "", // user friendly (orgTitle)
"parentDataset": "",
"publishFrequency": "",
"referenceUrls": [""],
"rights": "",
"riskRating": 0, // value between 0.0 and 1.0
"spatial": "",
"temporal": ""
},
"technical": {
"allow_duplicates": true
"authHeaders": {"header1": "", "header2": ""}
"authBody": {"name": "", "clientID": ""}
"authBodyEncodeMethod": "",
"authUrl": "",
"cadence": "",
"dataName": "", // ~r/[a-zA-Z_]+$/
"orgId": "",
"orgName": "", // ~r/[a-zA-Z_]+$/
"protocol": "", // List of protocols to use. Defaults to nil. Can be [http1, http2]
"schema": [{
"name": "",
"type": "",
"description": ""
}],
"sourceHeaders": {
"header1": "",
"header2": ""
},
"sourceQueryParams": {
"key1": "",
"key2": ""
},
"sourceType": "", // remote|stream|ingest|host
"sourceUrl": "",
"systemName": "", // ${orgName}__${dataName}
"topLevelSelector": ""
}
}
Link to this section Summary
Functions
Returns true if SmartCity.Dataset.Technical sourceType field is host
Returns true if SmartCity.Dataset.Technical sourceType field is ingest
Returns true if SmartCity.Dataset.Technical sourceType field is remote
Returns true if SmartCity.Dataset.Technical sourceType field is stream
Returns a new SmartCity.Dataset
struct. SmartCity.Dataset.Business
and
SmartCity.Dataset.Technical
structs will be created along the way.
Link to this section Types
@type id() :: term()
@type t() :: %SmartCity.Dataset{ business: SmartCity.Dataset.Business.t(), id: String.t(), technical: SmartCity.Dataset.Technical.t(), version: String.t() }
Link to this section Functions
Returns true if SmartCity.Dataset.Technical sourceType field is host
Returns true if SmartCity.Dataset.Technical sourceType field is ingest
Returns true if SmartCity.Dataset.Technical sourceType field is remote
Returns true if SmartCity.Dataset.Technical sourceType field is stream
Returns a new SmartCity.Dataset
struct. SmartCity.Dataset.Business
and
SmartCity.Dataset.Technical
structs will be created along the way.
parameters
Parameters
- msg : map defining values of the struct to be created.
Can be initialized by
- map with string keys
- map with atom keys
- JSON