From 2ec850ce92c22803a0dc9fd2467a3984a41b669e Mon Sep 17 00:00:00 2001 From: Victor Felder Date: Thu, 5 Sep 2019 11:06:09 +0200 Subject: [PATCH] fix(dataset): graphIri is a string, not a namedNode --- src/dataset.ts | 6 +++--- src/query/datasetquery.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dataset.ts b/src/dataset.ts index c077fe0..a3c7f9f 100644 --- a/src/dataset.ts +++ b/src/dataset.ts @@ -10,7 +10,7 @@ class DataSet { public label: any; public iri: string; public endpoint: string; - public graphIri: NamedNode | undefined; + public graphIri?: string; private fetcher: SparqlFetcher; private metadataLoaded: boolean = false; private cachedMetadata: { attributes: Attribute[]; dimensions: Dimension[]; measures: Measure[]; }; @@ -30,7 +30,7 @@ class DataSet { this.fetcher = new SparqlFetcher(endpoint); this.iri = dataSetIri.value; this.label = (dataSetLabel && dataSetLabel.value) || ""; - this.graphIri = graphIri; + this.graphIri = graphIri.value; this.endpoint = endpoint; } @@ -77,7 +77,7 @@ class DataSet { SELECT ?label ?kind ?iri - ${this.graphIri ? `FROM <${this.graphIri.value}>` : ""} + ${this.graphIri ? `FROM <${this.graphIri}>` : ""} WHERE { <${this.iri}> a qb:DataSet ; qb:structure/qb:component ?componentSpec . diff --git a/src/query/datasetquery.ts b/src/query/datasetquery.ts index b5610fa..891f28a 100644 --- a/src/query/datasetquery.ts +++ b/src/query/datasetquery.ts @@ -264,7 +264,7 @@ class DataSetQuery { variables: [], from: { default: [ - this.dataSet.graphIri, + namedNode(this.dataSet.graphIri), ], named: [], },