@lde/sparql-importer 0.4.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Distribution } from '@lde/dataset';
|
|
2
|
+
import { Downloader } from '@lde/distribution-downloader';
|
|
3
|
+
import { TaskRunner } from '@lde/task-runner';
|
|
4
|
+
/** Store-agnostic options shared by all {@link Importer} implementations. */
|
|
5
|
+
export interface ImporterOptions {
|
|
6
|
+
taskRunner: TaskRunner<unknown>;
|
|
7
|
+
downloader?: Downloader;
|
|
8
|
+
/** Cache indices and skip re-indexing when source data is unchanged. @default true */
|
|
9
|
+
cacheIndex?: boolean;
|
|
10
|
+
}
|
|
2
11
|
/**
|
|
3
|
-
* An Importer
|
|
12
|
+
* An Importer selects a suitable {@link Distribution} from the given candidates
|
|
4
13
|
* and imports it to a SPARQL server.
|
|
5
14
|
*
|
|
6
|
-
* This assumes that all Distributions of
|
|
15
|
+
* This assumes that all Distributions of a dataset are roughly equivalent:
|
|
7
16
|
* https://docs.nde.nl/requirements-datasets/#dataset-distributions.
|
|
8
17
|
*/
|
|
9
18
|
export interface Importer {
|
|
10
19
|
/**
|
|
11
|
-
* Import
|
|
20
|
+
* Import one of the given {@link Distribution}s to a SPARQL server.
|
|
21
|
+
*
|
|
22
|
+
* The importer picks the first distribution whose format it supports,
|
|
23
|
+
* downloads it, and indexes it. Returns {@link NotSupported} when none of
|
|
24
|
+
* the distributions use a supported format.
|
|
12
25
|
*/
|
|
13
|
-
import(
|
|
26
|
+
import(distributions: Distribution[]): Promise<NotSupported | ImportFailed | ImportSuccessful>;
|
|
14
27
|
}
|
|
15
28
|
export declare class ImportSuccessful {
|
|
16
29
|
readonly distribution: Distribution;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;OAMG;IACH,MAAM,CACJ,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,YAAY,GAAG,YAAY,GAAG,gBAAgB,CAAC,CAAC;CAC5D;AAED,qBAAa,gBAAgB;aAET,YAAY,EAAE,YAAY;aAC1B,UAAU,CAAC,EAAE,MAAM;aACnB,WAAW,CAAC,EAAE,MAAM;gBAFpB,YAAY,EAAE,YAAY,EAC1B,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,WAAW,CAAC,EAAE,MAAM,YAAA;CAEvC;AAED,qBAAa,YAAY;aAEL,YAAY,EAAE,YAAY;aAC1B,KAAK,EAAE,MAAM;gBADb,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM;CAEhC;AAED,qBAAa,YAAY;aACK,YAAY,CAAC,EAAE,YAAY;gBAA3B,YAAY,CAAC,EAAE,YAAY,YAAA;CACxD"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/sparql-importer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/ldelements/lde.git",
|
|
6
6
|
"directory": "packages/sparql-importer"
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@lde/dataset": "0.7.2",
|
|
27
|
+
"@lde/distribution-downloader": "0.5.3",
|
|
28
|
+
"@lde/task-runner": "0.2.10",
|
|
27
29
|
"tslib": "^2.3.0"
|
|
28
30
|
}
|
|
29
31
|
}
|