Skip to content

Commit

Permalink
fix(dataset): graphIri is a string, not a namedNode
Browse files Browse the repository at this point in the history
  • Loading branch information
vhf committed Sep 5, 2019
1 parent a7a37f7 commit 2ec850c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]; };
Expand All @@ -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;
}

Expand Down Expand Up @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion src/query/datasetquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class DataSetQuery {
variables: [],
from: {
default: [
this.dataSet.graphIri,
namedNode(this.dataSet.graphIri),
],
named: [],
},
Expand Down

0 comments on commit 2ec850c

Please sign in to comment.