-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from oSoc18/develop
Merge develop into master
- Loading branch information
Showing
28 changed files
with
4,614 additions
and
2,024 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Go to master branch version | ||
cd ~/build/SmartFlanders | ||
git reset --hard | ||
rm package-lock.json | ||
git pull | ||
git checkout master | ||
|
||
# Install back end | ||
npm install | ||
forever stopall | ||
forever start index.js | ||
|
||
# Install front end | ||
cd /var/www/smartflanders.ilabt.imec.be | ||
rm *.html *.css *.js *.scss | ||
cp ~/build/SmartFlanders/frontend /var/www/smartflanders.ilabt.imec.be | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,6 @@ typings/ | |
|
||
# next.js build output | ||
.next | ||
|
||
# SASS compile file | ||
frontend/styles.css.map |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const validator = require('validator') | ||
const transformer = require('../helpers/transformer') | ||
|
||
let json = [] | ||
|
||
exports.getOpeningHours = (params) => { | ||
|
||
Object.keys(params.openinghours).forEach((element, index) => { | ||
json.push({ | ||
"@type": "OpeningHoursSpecification", | ||
"closes": Object.values(params.openinghours)[index][1], | ||
"dayOfWeek": "http://schema.org/" + capitalizeFirstLetter(element), | ||
"opens": Object.values(params.openinghours)[index][0] | ||
}, { | ||
"@type": "OpeningHoursSpecification", | ||
"closes": Object.values(params.openinghours)[index][3], | ||
"dayOfWeek": "http://schema.org/" + capitalizeFirstLetter(element), | ||
"opens": Object.values(params.openinghours)[index][2] | ||
}) | ||
}); | ||
return ` | ||
"openingHoursSpecification": ${JSON.stringify(json)} | ||
` | ||
} | ||
|
||
function capitalizeFirstLetter(chars) { | ||
return chars[0].toUpperCase() + chars.slice(1); | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"@context": { | ||
"dcat": "https://www.w3.org/ns/dcat#", | ||
"dcterms": "http://purl.org/dc/terms/", | ||
"foaf": "http://xmlns.com/foaf/0.1/" | ||
}, | ||
"@type": "dcat:Catalog", | ||
"dcterms:license": [{ | ||
"@id": "https://creativecommons.org/publicdomain/zero/1.0/" | ||
}], | ||
"dcat:dataset": [{ | ||
"@type": "dcat:Dataset", | ||
"dcat:keyword": "http://schema.org/Service", | ||
"dcat:distribution": [{ | ||
"@type": "dcat:Distribution", | ||
"dcat:accessUrl": "https://www.mechelen.be/huis-van-de-mechelaar", | ||
"dcat:mediaType": "text/html" | ||
}] | ||
}, | ||
{ | ||
"@type": "dcat:Dataset", | ||
"dcat:keyword": "http://purl.org/vocab/cpsv#PublicService", | ||
"dcat:distribution": [{ | ||
"@type": "dcat:Distribution", | ||
"dcat:accessUrl": "http://www.academiemechelen.be/", | ||
"dcat:mediaType": "text/html" | ||
}] | ||
}, | ||
{ | ||
"@type": "dcat:Dataset", | ||
"dcat:keyword": "http://data.vlaanderen.be/ns/gebouw#Gebouw", | ||
"dcat:distribution": [{ | ||
"@type": "dcat:Distribution", | ||
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/gebouw-example.json", | ||
"dcat:mediaType": "text/html" | ||
}] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"@context": { | ||
"gebouwenRegister": "http://data.vlaanderen.be/id/gebouw/", | ||
"adressenRegister": "https://data.vlaanderen.be/doc/adres", | ||
"gebouw": "http://data.vlaanderen.be/ns/gebouw#", | ||
"schema": "http://schema.org/", | ||
"dcterms": "http://purl.org/dc/terms/", | ||
"toevla": "http://semweb.mmlab.be/ns/wa#", | ||
"locn": "http://www.w3.org/ns/locn#", | ||
"geo": "http://www.opengis.net/ont/geosparql#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#" | ||
}, | ||
"@id": "http://data.vlaanderen.be/id/gebouw/123", | ||
"@type": "gebouw:Gebouw", | ||
"http://purl.org/dc/terms/description": "The entrance of the public library of Mechelen", | ||
"toevla:accessibilityMeasurement": { | ||
"toevla:accessibilityMeasurement_for": { | ||
"dcterms:description": "The entrance", | ||
"toevla:entranceDoorWidth": { | ||
"@value": "70", | ||
"@type": "xsd:Integer" | ||
}, | ||
"toevla:entranceDoorWidthScore": "+" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"@context": { | ||
"dcat": "https://www.w3.org/ns/dcat#", | ||
"dcterms": "http://purl.org/dc/terms/", | ||
"foaf": "http://xmlns.com/foaf/0.1/" | ||
}, | ||
"@type": "dcterms:Collection", | ||
"dcterms:hasPart": [{ | ||
"foaf:page": "http://smartflanders.ilabt.imec.be/catalog-example.json", | ||
"@type": "dcat:Catalog" | ||
}, | ||
{ | ||
"foaf:page": "http://www.oostende.be/", | ||
"@type": "dcat:Catalog" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
[{ | ||
"@context": "http://schema.org/", | ||
"@id": "https://stad.gent/id/products/123", | ||
"@type": "Service", | ||
"name": "Public toilet library", | ||
"description": "The public toilet of the public library of Mechelen", | ||
"http://purl.org/oslo/ns/localgov#productType": "http://productencatalogus.vlaanderen.be/fiche/158", | ||
"telephone": "+32", | ||
"email": "test@gmail.com", | ||
"https://schema.org/hoursAvailable": | ||
[ | ||
{ | ||
"@type": "OpeningHoursSpecification", | ||
"dayOfWeek": "schema:Monday", | ||
"opens": "09:00", | ||
"closes": "11:00" | ||
}, | ||
{ | ||
"@type": "OpeningHoursSpecification", | ||
"dayOfWeek": "schema:Tuesday", | ||
"opens": "09:00", | ||
"closes": "16:00" | ||
}, | ||
{ | ||
"@type": "OpeningHoursSpecification", | ||
"validFrom": "2013-12-24", | ||
"validThrough": "2014-01-02" | ||
} | ||
] | ||
},{ | ||
"@id": "https://stad.gent/id/products/123", | ||
"@type": "http://purl.org/vocab/cpsv#PublicService", | ||
"http://data.europa.eu/m8g/hasChannel": { | ||
"https://schema.org/hoursAvailable": | ||
[ | ||
{ | ||
"@type": "OpeningHoursSpecification", | ||
"validFrom": "2013-12-24", | ||
"validThrough": "2013-12-25", | ||
"opens": "09:00", | ||
"closes": "11:00" | ||
}, | ||
{ | ||
"@type": "OpeningHoursSpecification", | ||
"validFrom": "2013-05-24", | ||
"validThrough": "2013-10-25", | ||
"opens": "09:00", | ||
"closes": "16:00" | ||
}, | ||
{ | ||
"@type": "OpeningHoursSpecification", | ||
"validFrom": "2013-12-24", | ||
"validThrough": "2014-01-02" | ||
} | ||
] | ||
}, | ||
"http://purl.org/dc/terms/description": "The public toilet of the public library of Mechelen", | ||
"http://www.w3.org/ns/locn#location": "http://data.vlaanderen.be/id/gebouw/123", | ||
"toevla:accessibilityMeasurement": { | ||
"toevla:accessibilityMeasurement_for": { | ||
"dcterms:description": "The elevator", | ||
"toevla:elevatorDoorWidth": { | ||
"@value": "70", | ||
"@type": "xsd:Integer" | ||
}, | ||
"toevla:elevatorDoorScore": "+" | ||
} | ||
} | ||
}] |
Oops, something went wrong.