|
@@ -17,6 +17,7 @@ const _clusteringEuModifiedFilePath = 'data/clustering/input_modified.csv';
|
|
|
const _clusteringCzModifiedFilePath = 'data/cz/input_modified.csv';
|
|
const _clusteringCzModifiedFilePath = 'data/cz/input_modified.csv';
|
|
|
const _clustersEuFilePath = 'data/clustering/out_file.csv';
|
|
const _clustersEuFilePath = 'data/clustering/out_file.csv';
|
|
|
const _clustersCzFilePath = 'data/cz/out_file_cz.csv';
|
|
const _clustersCzFilePath = 'data/cz/out_file_cz.csv';
|
|
|
|
|
+const _ontologyFilePath = 'data/rural_attractiveness.owl.json';
|
|
|
var _datasetsEU = undefined;
|
|
var _datasetsEU = undefined;
|
|
|
var _datasetsCZ = undefined;
|
|
var _datasetsCZ = undefined;
|
|
|
var _ruralDataEU = undefined;
|
|
var _ruralDataEU = undefined;
|
|
@@ -155,6 +156,15 @@ app.post('/:aoi?/clusters/', async (req, res, next) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+/*
|
|
|
|
|
+ * Reads the ontology file and sends its content
|
|
|
|
|
+ * This ensures that both backend and frontend are using the same version of the ontology
|
|
|
|
|
+*/
|
|
|
|
|
+app.get('/ontology/', async (req, res, next) => {
|
|
|
|
|
+ const onto = await nutsData.loadOntology(_ontologyFilePath)
|
|
|
|
|
+ helpers.formatResponse(onto, req, res)
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
app.get('/georeport/:nuts', async (req, res, next) => {
|
|
app.get('/georeport/:nuts', async (req, res, next) => {
|
|
|
if (!_datasetsEU) { // datasets must be loaded prior to data loading
|
|
if (!_datasetsEU) { // datasets must be loaded prior to data loading
|
|
|
try {
|
|
try {
|