|
|
@@ -12,6 +12,8 @@ export class AdjusterPresetsService {
|
|
|
activeProblem: Problem;
|
|
|
activeRole: Role;
|
|
|
activeSchema: Schema;
|
|
|
+ applicationLoD = 'http://www.semanticweb.org/attractiveness/municipality';
|
|
|
+ applicationCoverage = 'http://www.semanticweb.org/attractiveness/CzechRepublic';
|
|
|
defaultSchemaId: string;
|
|
|
|
|
|
schemaChanges: Subject<Schema> = new Subject();
|
|
|
@@ -57,13 +59,19 @@ export class AdjusterPresetsService {
|
|
|
.find((subject) => subject['@id'] == groupID)["http://www.semanticweb.org/attractiveness/hasDataset"]
|
|
|
?.map((entity) => {
|
|
|
const datasetEntity = this.ontology.find((subject) => subject['@id'] == entity['@id']);
|
|
|
+ if (
|
|
|
+ datasetEntity['http://www.semanticweb.org/attractiveness/hasCoverage']?.every((coverageEntity) => coverageEntity['@id'] !== this.applicationCoverage) ||
|
|
|
+ datasetEntity['http://www.semanticweb.org/attractiveness/hasLoD']?.every((lodEntity) => lodEntity['@id'] !== this.applicationLoD)
|
|
|
+ ) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
return {
|
|
|
id: datasetEntity["@id"],
|
|
|
- labels: datasetEntity["http://www.w3.org/2000/01/rdf-schema#label"], //TODO: i18n this!
|
|
|
+ labels: datasetEntity["http://www.w3.org/2000/01/rdf-schema#label"],
|
|
|
desc: '',
|
|
|
included: true
|
|
|
}
|
|
|
- }) ?? [];
|
|
|
+ }).filter(ds => ds) ?? [];
|
|
|
}
|
|
|
|
|
|
getLabelInCurrentLang(labels: Label[]) {
|