Skip to content
Snippets Groups Projects
Commit 9e214a33 authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

fix wip

parent 41c3465d
No related branches found
No related tags found
1 merge request!44Feature/semantic enrichment
...@@ -101,7 +101,7 @@ export class DatasetComponent implements OnInit { ...@@ -101,7 +101,7 @@ export class DatasetComponent implements OnInit {
const concepts = new DataConcept(); const concepts = new DataConcept();
concepts.url = this.dataset.url; concepts.url = this.dataset.url;
concepts.iris = []; concepts.iris = [];
this.dataset.keywords.forEach((value: ESModel, key: string) => { for (const [key, value] of this.dataset.keywords) {
if ((null !== value && value.results.filter(e => e.checked).length > 0)) { if ((null !== value && value.results.filter(e => e.checked).length > 0)) {
if (value) { if (value) {
value.results.forEach((result: Result) => { value.results.forEach((result: Result) => {
...@@ -111,7 +111,7 @@ export class DatasetComponent implements OnInit { ...@@ -111,7 +111,7 @@ export class DatasetComponent implements OnInit {
}); });
} }
} }
}); }
if (this.autocompleteResults && this.autocompleteResults.length > 0) { if (this.autocompleteResults && this.autocompleteResults.length > 0) {
this.autocompleteResults.forEach((result: Result) => concepts.iris.push({iri: result.source.document.iri, label: result.source.document.label, originalKeyword: null})); this.autocompleteResults.forEach((result: Result) => concepts.iris.push({iri: result.source.document.iri, label: result.source.document.label, originalKeyword: null}));
} }
......
...@@ -129,7 +129,8 @@ export class SemanticEnrichmentComponent implements OnInit { ...@@ -129,7 +129,8 @@ export class SemanticEnrichmentComponent implements OnInit {
const concepts = new DataConcept(); const concepts = new DataConcept();
concepts.id = data.id; concepts.id = data.id;
concepts.iris = []; concepts.iris = [];
data.keywords.forEach((value: ESModel, key: string) => {
for (const [key, value] of data.keywords) {
if (value && value.results) { if (value && value.results) {
value.results.forEach((result: Result) => { value.results.forEach((result: Result) => {
...@@ -146,7 +147,7 @@ export class SemanticEnrichmentComponent implements OnInit { ...@@ -146,7 +147,7 @@ export class SemanticEnrichmentComponent implements OnInit {
); );
} }
mappingData.dataConcepts.push(concepts); mappingData.dataConcepts.push(concepts);
}); }
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment