This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promise.sequential = function(runnables) { | |
return new Promise(function(resolve, reject) { | |
var results = []; | |
runnables.reduce(function(sequence, aRunnable) { | |
return sequence.then(function() { | |
return aRunnable.run(); | |
}).then(function(data) { | |
results.push(data); | |
if (results.length === runnables.length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't forget to start Orion with the -corsOrigin option | |
// See also | |
var ORION_URL = 'http://130.206.83.68:1026/v1'; | |
var QUERY_CONTEXT = ORION_URL + '/' + 'contextEntities' | |
function queryContext(entityId) { | |
return new Promise(function(resolve, reject) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', QUERY_CONTEXT + '/' + entityId, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "LON-1234", | |
"name": "Ostler's Hug", | |
"type": "Room", | |
"temperature": { | |
"value": 25.2, | |
"metadata": { | |
"unitCode": "CEL" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div typeof="rdfs:Class" resource="http://data.gsma.org/Incident"> | |
<span class="h" property="rdfs:label">Incident</span> | |
<span property="rdfs:comment">A generic incident</span> | |
</div> | |
<div typeof="rdfs:Class" resource="http://data.gsma.org/TrafficIncident"> | |
<span class="h" property="rdfs:label">Traffic Incident</span> | |
<span>Subclass of: <a property="rdfs:subClassOf" href="http://data.gsma.org/Incident">Incident</a></span> | |
<span property="rdfs:comment">Traffic Incident</span> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"domain": { | |
"service": "service", | |
"subservice": "/subservice" | |
}, | |
"contextBroker": { | |
"protocol": "http", | |
"host": "1.2.3.4", | |
"port": 1026, | |
"ngsiVersion": "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"domain": { | |
"service": "service", | |
"subservice": "/subservice" | |
}, | |
"contextBroker": { | |
"protocol": "http", | |
"host": "1.2.3.4", | |
"port": 1026, | |
"ngsiVersion": "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "santander:daoiz_velarde_1_5", | |
"type": "OnStreetParking", | |
"category": ["blueZone", "shortTerm"], | |
"specialZone": ["forDisabled"], | |
"allowedVehicleType": "car", | |
"chargeType": ["temporaryFee"], | |
"requiredPermit": ["blueZonePermit", "disabledPermit"], | |
"permitActiveHours": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "daoiz-velarde-1-5-main", | |
"type": "ParkingGroup", | |
"category": ["onstreet", "blueZone", "shortTerm"], | |
"allowedVehicleType": "car", | |
"chargeType": ["temporaryFee"], | |
"refParkingSite": "daoiz-velarde-1-5", | |
"totalSpotNumber": 4, | |
"availableSpotNumber": 1, | |
"requiredPermit": "blueZonePermit" |