Skip to content

Commit

Permalink
feat: Apply to reconciliation API
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Sep 23, 2024
1 parent 246889a commit e1e8dbf
Show file tree
Hide file tree
Showing 47 changed files with 86 additions and 61 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
global: {
lines: 91.4,
statements: 91.4,
branches: 95.45,
branches: 95.46,
functions: 92.62,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@id": "https://reconciliation-api.github.io/specs/latest/",
"@type": "SoftwareApplication"
},
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{distribution}"
"urlTemplate": "https://termennetwerk-api.netwerkdigitaalerfgoed.nl/reconcile/{dataset}"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/network-of-terms-graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ query Sources {
# Query Cultuurhistorische Thesaurus (CHT)
query {
terms(
sources: ["https://data.cultureelerfgoed.nl/PoolParty/sparql/term/id/cht"],
sources: ["https://data.cultureelerfgoed.nl/term/id/cht"],
query: "fiets"
) {
source {
Expand Down Expand Up @@ -146,7 +146,7 @@ query {
# Query RKDartists and NTA simultaneously
query {
terms(
sources: ["https://data.netwerkdigitaalerfgoed.nl/rkd/rkdartists/sparql", "http://data.bibliotheken.nl/thesp/sparql"],
sources: ["https://data.rkd.nl/rkdartists", "http://data.bibliotheken.nl/id/dataset/persons"],
query: "Gogh"
) {
source {
Expand Down
5 changes: 4 additions & 1 deletion packages/network-of-terms-query/src/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import {URL} from 'url';
export class Catalog {
constructor(readonly datasets: ReadonlyArray<Dataset>) {}

/**
* Get dataset by IRI, accepting distribution IRIs too for BC.
*/
public getDatasetByIri(iri: IRI): Dataset | undefined {
return this.datasets.find(

Check failure on line 10 in packages/network-of-terms-query/src/catalog.ts

View workflow job for this annotation

GitHub Actions / test

Insert `(⏎······`
dataset => dataset.iri.toString() === iri.toString()

Check failure on line 11 in packages/network-of-terms-query/src/catalog.ts

View workflow job for this annotation

GitHub Actions / test

Insert `··`
);
) ?? this.getDatasetByDistributionIri(iri)

Check failure on line 12 in packages/network-of-terms-query/src/catalog.ts

View workflow job for this annotation

GitHub Actions / test

Replace `)·??·this.getDatasetByDistributionIri(iri)` with `··)·??·this.getDatasetByDistributionIri(iri)⏎····);`
}

public getDatasetByDistributionIri(iri: IRI): Dataset | undefined {
Expand Down
Loading

0 comments on commit e1e8dbf

Please sign in to comment.