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 290886f
Show file tree
Hide file tree
Showing 47 changed files with 89 additions and 63 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
9 changes: 7 additions & 2 deletions packages/network-of-terms-query/src/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ 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(
dataset => dataset.iri.toString() === iri.toString()
return (
this.datasets.find(
dataset => dataset.iri.toString() === iri.toString()
) ?? this.getDatasetByDistributionIri(iri)
);
}

Expand Down
Loading

0 comments on commit 290886f

Please sign in to comment.