@comake/skl-js-engine 1.5.2 → 1.5.4
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/package.json +1 -1
- package/src/SklEngine.ts +8 -1
- package/src/util/TripleUtil.ts +22 -2
- package/dist/JsExecutor/PermissionBuilder.d.ts +0 -14
- package/dist/JsExecutor/PermissionBuilder.d.ts.map +0 -1
- package/dist/JsExecutor/PermissionBuilder.js +0 -58
- package/dist/JsExecutor/PermissionBuilder.js.map +0 -1
- package/dist/JsExecutor/constants.d.ts +0 -27
- package/dist/JsExecutor/constants.d.ts.map +0 -1
- package/dist/JsExecutor/constants.js +0 -30
- package/dist/JsExecutor/constants.js.map +0 -1
- package/dist/JsExecutor/denoUtils.d.ts +0 -10
- package/dist/JsExecutor/denoUtils.d.ts.map +0 -1
- package/dist/JsExecutor/denoUtils.js +0 -24
- package/dist/JsExecutor/denoUtils.js.map +0 -1
- package/dist/JsExecutor/errors.d.ts +0 -40
- package/dist/JsExecutor/errors.d.ts.map +0 -1
- package/dist/JsExecutor/errors.js +0 -67
- package/dist/JsExecutor/errors.js.map +0 -1
- package/dist/JsExecutor/examples/basic/index.d.ts +0 -1
- package/dist/JsExecutor/examples/basic/index.d.ts.map +0 -1
- package/dist/JsExecutor/examples/basic/index.js +0 -46
- package/dist/JsExecutor/examples/basic/index.js.map +0 -1
- package/dist/JsExecutor/examples/basic/process.d.ts +0 -1
- package/dist/JsExecutor/examples/basic/process.d.ts.map +0 -1
- package/dist/JsExecutor/examples/basic/process.js +0 -34
- package/dist/JsExecutor/examples/basic/process.js.map +0 -1
- package/dist/JsExecutor/examples/jsExecutor/index.d.ts +0 -2
- package/dist/JsExecutor/examples/jsExecutor/index.d.ts.map +0 -1
- package/dist/JsExecutor/examples/jsExecutor/index.js +0 -47
- package/dist/JsExecutor/examples/jsExecutor/index.js.map +0 -1
- package/dist/JsExecutor/examples/jsExecutor/process.d.ts +0 -2
- package/dist/JsExecutor/examples/jsExecutor/process.d.ts.map +0 -1
- package/dist/JsExecutor/examples/jsExecutor/process.js +0 -58
- package/dist/JsExecutor/examples/jsExecutor/process.js.map +0 -1
- package/dist/JsExecutor/index.d.ts +0 -7
- package/dist/JsExecutor/index.d.ts.map +0 -1
- package/dist/JsExecutor/index.js +0 -36
- package/dist/JsExecutor/index.js.map +0 -1
- package/dist/JsExecutor/jsExecutor.d.ts +0 -68
- package/dist/JsExecutor/jsExecutor.d.ts.map +0 -1
- package/dist/JsExecutor/jsExecutor.js +0 -171
- package/dist/JsExecutor/jsExecutor.js.map +0 -1
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.d.ts +0 -165
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.d.ts.map +0 -1
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.js +0 -335
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.js.map +0 -1
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.d.ts +0 -125
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.d.ts.map +0 -1
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.js +0 -391
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.js.map +0 -1
- package/dist/JsExecutor/jsonRpc/index.d.ts +0 -4
- package/dist/JsExecutor/jsonRpc/index.d.ts.map +0 -1
- package/dist/JsExecutor/jsonRpc/index.js +0 -23
- package/dist/JsExecutor/jsonRpc/index.js.map +0 -1
- package/dist/JsExecutor/jsonRpc/types.d.ts +0 -193
- package/dist/JsExecutor/jsonRpc/types.d.ts.map +0 -1
- package/dist/JsExecutor/jsonRpc/types.js +0 -37
- package/dist/JsExecutor/jsonRpc/types.js.map +0 -1
- package/dist/JsExecutor/transport/Transport.d.ts +0 -74
- package/dist/JsExecutor/transport/Transport.d.ts.map +0 -1
- package/dist/JsExecutor/transport/Transport.js +0 -14
- package/dist/JsExecutor/transport/Transport.js.map +0 -1
- package/dist/JsExecutor/transport/base/BaseTransport.d.ts +0 -51
- package/dist/JsExecutor/transport/base/BaseTransport.d.ts.map +0 -1
- package/dist/JsExecutor/transport/base/BaseTransport.js +0 -68
- package/dist/JsExecutor/transport/base/BaseTransport.js.map +0 -1
- package/dist/JsExecutor/transport/index.d.ts +0 -13
- package/dist/JsExecutor/transport/index.d.ts.map +0 -1
- package/dist/JsExecutor/transport/index.js +0 -36
- package/dist/JsExecutor/transport/index.js.map +0 -1
- package/dist/JsExecutor/transport/process/ProcessManager.d.ts +0 -96
- package/dist/JsExecutor/transport/process/ProcessManager.d.ts.map +0 -1
- package/dist/JsExecutor/transport/process/ProcessManager.js +0 -219
- package/dist/JsExecutor/transport/process/ProcessManager.js.map +0 -1
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.d.ts +0 -87
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.d.ts.map +0 -1
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.js +0 -219
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.js.map +0 -1
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.d.ts +0 -81
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.d.ts.map +0 -1
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.js +0 -259
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.js.map +0 -1
- package/dist/JsExecutor/transport/utils/MessageUtils.d.ts +0 -68
- package/dist/JsExecutor/transport/utils/MessageUtils.d.ts.map +0 -1
- package/dist/JsExecutor/transport/utils/MessageUtils.js +0 -135
- package/dist/JsExecutor/transport/utils/MessageUtils.js.map +0 -1
- package/dist/JsExecutor/transport/utils/PollingUtils.d.ts +0 -53
- package/dist/JsExecutor/transport/utils/PollingUtils.d.ts.map +0 -1
- package/dist/JsExecutor/transport/utils/PollingUtils.js +0 -92
- package/dist/JsExecutor/transport/utils/PollingUtils.js.map +0 -1
- package/dist/JsExecutor/types.d.ts +0 -113
- package/dist/JsExecutor/types.d.ts.map +0 -1
- package/dist/JsExecutor/types.js +0 -3
- package/dist/JsExecutor/types.js.map +0 -1
- package/dist/SklEngine.d.ts +0 -132
- package/dist/SklEngine.d.ts.map +0 -1
- package/dist/SklEngine.js +0 -1501
- package/dist/SklEngine.js.map +0 -1
- package/dist/SklEngineOptions.d.ts +0 -58
- package/dist/SklEngineOptions.d.ts.map +0 -1
- package/dist/SklEngineOptions.js +0 -3
- package/dist/SklEngineOptions.js.map +0 -1
- package/dist/constants.d.ts +0 -96
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -103
- package/dist/constants.js.map +0 -1
- package/dist/customCapabilities.d.ts +0 -22
- package/dist/customCapabilities.d.ts.map +0 -1
- package/dist/customCapabilities.js +0 -45
- package/dist/customCapabilities.js.map +0 -1
- package/dist/examples/customCapabilitiesExample.d.ts +0 -2
- package/dist/examples/customCapabilitiesExample.d.ts.map +0 -1
- package/dist/examples/customCapabilitiesExample.js +0 -59
- package/dist/examples/customCapabilitiesExample.js.map +0 -1
- package/dist/executor.js +0 -216
- package/dist/hooks/globalHooks.d.ts +0 -50
- package/dist/hooks/globalHooks.d.ts.map +0 -1
- package/dist/hooks/globalHooks.js +0 -164
- package/dist/hooks/globalHooks.js.map +0 -1
- package/dist/hooks/types.d.ts +0 -9
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/types.js +0 -3
- package/dist/hooks/types.js.map +0 -1
- package/dist/index.d.ts +0 -41
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -68
- package/dist/index.js.map +0 -1
- package/dist/logger.d.ts +0 -35
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -119
- package/dist/logger.js.map +0 -1
- package/dist/mapping/Mapper.d.ts +0 -13
- package/dist/mapping/Mapper.d.ts.map +0 -1
- package/dist/mapping/Mapper.js +0 -64
- package/dist/mapping/Mapper.js.map +0 -1
- package/dist/storage/FindOperator.d.ts +0 -19
- package/dist/storage/FindOperator.d.ts.map +0 -1
- package/dist/storage/FindOperator.js +0 -23
- package/dist/storage/FindOperator.js.map +0 -1
- package/dist/storage/FindOptionsTypes.d.ts +0 -79
- package/dist/storage/FindOptionsTypes.d.ts.map +0 -1
- package/dist/storage/FindOptionsTypes.js +0 -3
- package/dist/storage/FindOptionsTypes.js.map +0 -1
- package/dist/storage/GroupOptionTypes.d.ts +0 -29
- package/dist/storage/GroupOptionTypes.d.ts.map +0 -1
- package/dist/storage/GroupOptionTypes.js +0 -3
- package/dist/storage/GroupOptionTypes.js.map +0 -1
- package/dist/storage/operator/And.d.ts +0 -4
- package/dist/storage/operator/And.d.ts.map +0 -1
- package/dist/storage/operator/And.js +0 -13
- package/dist/storage/operator/And.js.map +0 -1
- package/dist/storage/operator/Contains.d.ts +0 -3
- package/dist/storage/operator/Contains.d.ts.map +0 -1
- package/dist/storage/operator/Contains.js +0 -13
- package/dist/storage/operator/Contains.js.map +0 -1
- package/dist/storage/operator/Equal.d.ts +0 -5
- package/dist/storage/operator/Equal.d.ts.map +0 -1
- package/dist/storage/operator/Equal.js +0 -13
- package/dist/storage/operator/Equal.js.map +0 -1
- package/dist/storage/operator/Exists.d.ts +0 -3
- package/dist/storage/operator/Exists.d.ts.map +0 -1
- package/dist/storage/operator/Exists.js +0 -10
- package/dist/storage/operator/Exists.js.map +0 -1
- package/dist/storage/operator/GreaterThan.d.ts +0 -4
- package/dist/storage/operator/GreaterThan.d.ts.map +0 -1
- package/dist/storage/operator/GreaterThan.js +0 -13
- package/dist/storage/operator/GreaterThan.js.map +0 -1
- package/dist/storage/operator/GreaterThanOrEqual.d.ts +0 -4
- package/dist/storage/operator/GreaterThanOrEqual.d.ts.map +0 -1
- package/dist/storage/operator/GreaterThanOrEqual.js +0 -13
- package/dist/storage/operator/GreaterThanOrEqual.js.map +0 -1
- package/dist/storage/operator/In.d.ts +0 -4
- package/dist/storage/operator/In.d.ts.map +0 -1
- package/dist/storage/operator/In.js +0 -13
- package/dist/storage/operator/In.js.map +0 -1
- package/dist/storage/operator/Inverse.d.ts +0 -3
- package/dist/storage/operator/Inverse.d.ts.map +0 -1
- package/dist/storage/operator/Inverse.js +0 -13
- package/dist/storage/operator/Inverse.js.map +0 -1
- package/dist/storage/operator/InversePath.d.ts +0 -7
- package/dist/storage/operator/InversePath.d.ts.map +0 -1
- package/dist/storage/operator/InversePath.js +0 -13
- package/dist/storage/operator/InversePath.js.map +0 -1
- package/dist/storage/operator/InverseRelation.d.ts +0 -9
- package/dist/storage/operator/InverseRelation.d.ts.map +0 -1
- package/dist/storage/operator/InverseRelation.js +0 -13
- package/dist/storage/operator/InverseRelation.js.map +0 -1
- package/dist/storage/operator/InverseRelationOrder.d.ts +0 -8
- package/dist/storage/operator/InverseRelationOrder.d.ts.map +0 -1
- package/dist/storage/operator/InverseRelationOrder.js +0 -13
- package/dist/storage/operator/InverseRelationOrder.js.map +0 -1
- package/dist/storage/operator/LessThan.d.ts +0 -4
- package/dist/storage/operator/LessThan.d.ts.map +0 -1
- package/dist/storage/operator/LessThan.js +0 -13
- package/dist/storage/operator/LessThan.js.map +0 -1
- package/dist/storage/operator/LessThanOrEqual.d.ts +0 -4
- package/dist/storage/operator/LessThanOrEqual.d.ts.map +0 -1
- package/dist/storage/operator/LessThanOrEqual.js +0 -13
- package/dist/storage/operator/LessThanOrEqual.js.map +0 -1
- package/dist/storage/operator/Not.d.ts +0 -3
- package/dist/storage/operator/Not.d.ts.map +0 -1
- package/dist/storage/operator/Not.js +0 -13
- package/dist/storage/operator/Not.js.map +0 -1
- package/dist/storage/operator/OneOrMorePath.d.ts +0 -7
- package/dist/storage/operator/OneOrMorePath.d.ts.map +0 -1
- package/dist/storage/operator/OneOrMorePath.js +0 -13
- package/dist/storage/operator/OneOrMorePath.js.map +0 -1
- package/dist/storage/operator/Or.d.ts +0 -4
- package/dist/storage/operator/Or.d.ts.map +0 -1
- package/dist/storage/operator/Or.js +0 -13
- package/dist/storage/operator/Or.js.map +0 -1
- package/dist/storage/operator/Sequence.d.ts +0 -3
- package/dist/storage/operator/Sequence.d.ts.map +0 -1
- package/dist/storage/operator/Sequence.js +0 -13
- package/dist/storage/operator/Sequence.js.map +0 -1
- package/dist/storage/operator/SequencePath.d.ts +0 -7
- package/dist/storage/operator/SequencePath.d.ts.map +0 -1
- package/dist/storage/operator/SequencePath.js +0 -13
- package/dist/storage/operator/SequencePath.js.map +0 -1
- package/dist/storage/operator/ZeroOrMorePath.d.ts +0 -7
- package/dist/storage/operator/ZeroOrMorePath.d.ts.map +0 -1
- package/dist/storage/operator/ZeroOrMorePath.js +0 -13
- package/dist/storage/operator/ZeroOrMorePath.js.map +0 -1
- package/dist/storage/query-adapter/QueryAdapter.d.ts +0 -99
- package/dist/storage/query-adapter/QueryAdapter.d.ts.map +0 -1
- package/dist/storage/query-adapter/QueryAdapter.js +0 -3
- package/dist/storage/query-adapter/QueryAdapter.js.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapter.d.ts +0 -40
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapter.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapter.js +0 -315
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapter.js.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapterOptions.d.ts +0 -34
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapterOptions.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapterOptions.js +0 -3
- package/dist/storage/query-adapter/sparql/SparqlQueryAdapterOptions.js.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlQueryBuilder.d.ts +0 -104
- package/dist/storage/query-adapter/sparql/SparqlQueryBuilder.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlQueryBuilder.js +0 -1210
- package/dist/storage/query-adapter/sparql/SparqlQueryBuilder.js.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlUpdateBuilder.d.ts +0 -41
- package/dist/storage/query-adapter/sparql/SparqlUpdateBuilder.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/SparqlUpdateBuilder.js +0 -305
- package/dist/storage/query-adapter/sparql/SparqlUpdateBuilder.js.map +0 -1
- package/dist/storage/query-adapter/sparql/VariableGenerator.d.ts +0 -5
- package/dist/storage/query-adapter/sparql/VariableGenerator.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/VariableGenerator.js +0 -14
- package/dist/storage/query-adapter/sparql/VariableGenerator.js.map +0 -1
- package/dist/storage/query-adapter/sparql/query-executor/InMemorySparqlQueryExecutor.d.ts +0 -19
- package/dist/storage/query-adapter/sparql/query-executor/InMemorySparqlQueryExecutor.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/query-executor/InMemorySparqlQueryExecutor.js +0 -90
- package/dist/storage/query-adapter/sparql/query-executor/InMemorySparqlQueryExecutor.js.map +0 -1
- package/dist/storage/query-adapter/sparql/query-executor/SparqlEndpointQueryExecutor.d.ts +0 -27
- package/dist/storage/query-adapter/sparql/query-executor/SparqlEndpointQueryExecutor.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/query-executor/SparqlEndpointQueryExecutor.js +0 -116
- package/dist/storage/query-adapter/sparql/query-executor/SparqlEndpointQueryExecutor.js.map +0 -1
- package/dist/storage/query-adapter/sparql/query-executor/SparqlQueryExecutor.d.ts +0 -34
- package/dist/storage/query-adapter/sparql/query-executor/SparqlQueryExecutor.d.ts.map +0 -1
- package/dist/storage/query-adapter/sparql/query-executor/SparqlQueryExecutor.js +0 -3
- package/dist/storage/query-adapter/sparql/query-executor/SparqlQueryExecutor.js.map +0 -1
- package/dist/tools/explain-findall-sparql.d.ts +0 -2
- package/dist/tools/explain-findall-sparql.d.ts.map +0 -1
- package/dist/tools/explain-findall-sparql.js +0 -303
- package/dist/tools/explain-findall-sparql.js.map +0 -1
- package/dist/util/PerformanceLogger.d.ts +0 -28
- package/dist/util/PerformanceLogger.d.ts.map +0 -1
- package/dist/util/PerformanceLogger.js +0 -223
- package/dist/util/PerformanceLogger.js.map +0 -1
- package/dist/util/ReadCacheHelper.d.ts +0 -14
- package/dist/util/ReadCacheHelper.d.ts.map +0 -1
- package/dist/util/ReadCacheHelper.js +0 -61
- package/dist/util/ReadCacheHelper.js.map +0 -1
- package/dist/util/SparqlUtil.d.ts +0 -72
- package/dist/util/SparqlUtil.d.ts.map +0 -1
- package/dist/util/SparqlUtil.js +0 -456
- package/dist/util/SparqlUtil.js.map +0 -1
- package/dist/util/TripleUtil.d.ts +0 -10
- package/dist/util/TripleUtil.d.ts.map +0 -1
- package/dist/util/TripleUtil.js +0 -402
- package/dist/util/TripleUtil.js.map +0 -1
- package/dist/util/Types.d.ts +0 -271
- package/dist/util/Types.d.ts.map +0 -1
- package/dist/util/Types.js +0 -3
- package/dist/util/Types.js.map +0 -1
- package/dist/util/Util.d.ts +0 -26
- package/dist/util/Util.d.ts.map +0 -1
- package/dist/util/Util.js +0 -138
- package/dist/util/Util.js.map +0 -1
- package/dist/util/Vocabularies/Shared.d.ts +0 -13
- package/dist/util/Vocabularies/Shared.d.ts.map +0 -1
- package/dist/util/Vocabularies/Shared.js +0 -96
- package/dist/util/Vocabularies/Shared.js.map +0 -1
- package/dist/util/Vocabularies/helper.d.ts +0 -5
- package/dist/util/Vocabularies/helper.d.ts.map +0 -1
- package/dist/util/Vocabularies/helper.js +0 -10
- package/dist/util/Vocabularies/helper.js.map +0 -1
- package/dist/util/Vocabularies/index.d.ts +0 -8
- package/dist/util/Vocabularies/index.d.ts.map +0 -1
- package/dist/util/Vocabularies/index.js +0 -114
- package/dist/util/Vocabularies/index.js.map +0 -1
- package/dist/util/safeJsonStringify.d.ts +0 -1
- package/dist/util/safeJsonStringify.d.ts.map +0 -1
- package/dist/util/safeJsonStringify.js +0 -19
- package/dist/util/safeJsonStringify.js.map +0 -1
package/dist/util/Types.d.ts
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import type { ReferenceNodeObject, TriplesMap } from '@comake/rmlmapper-js';
|
|
2
|
-
import type { GraphObject, IdMap, IncludedBlock, IndexMap, LanguageMap, ListObject, NodeObject, SetObject, TypeMap } from 'jsonld';
|
|
3
|
-
import type { Frame } from 'jsonld/jsonld-spec';
|
|
4
|
-
import type { EngineConstants } from '../constants';
|
|
5
|
-
import type { FindAllOptions, FindOneOptions, FindOptionsWhere } from '../storage/FindOptionsTypes';
|
|
6
|
-
import type { GroupByOptions, GroupByResponse } from '../storage/GroupOptionTypes';
|
|
7
|
-
import type { RawQueryResult } from '../storage/query-adapter/QueryAdapter';
|
|
8
|
-
import type { RDF, SHACL } from './Vocabularies';
|
|
9
|
-
export declare type JSONPrimitive = string | number | boolean | null;
|
|
10
|
-
export interface JSONObject {
|
|
11
|
-
[key: string]: JSONValue | undefined;
|
|
12
|
-
}
|
|
13
|
-
export interface JSONArray extends Array<JSONValue> {
|
|
14
|
-
}
|
|
15
|
-
export declare type JSONValue = JSONPrimitive | JSONObject | JSONValue[];
|
|
16
|
-
export interface RdfList<T> {
|
|
17
|
-
[RDF.first]: T;
|
|
18
|
-
[RDF.rest]?: RdfList<T> | typeof RDF.nil | ReferenceNodeObject;
|
|
19
|
-
}
|
|
20
|
-
export interface ValueObject<T extends string | boolean | number | JSONObject | JSONArray> {
|
|
21
|
-
['@type']: string;
|
|
22
|
-
['@value']: T;
|
|
23
|
-
['@language']?: string;
|
|
24
|
-
['@direction']?: string;
|
|
25
|
-
}
|
|
26
|
-
export declare type IRIObject<T extends string = string> = {
|
|
27
|
-
'@id': T;
|
|
28
|
-
};
|
|
29
|
-
export declare type ShaclIRI = string | IRIObject;
|
|
30
|
-
export declare type ShaclIRIOrLiteral = ShaclIRI | ValueObject<any>;
|
|
31
|
-
export declare type NodeKindValues = typeof SHACL.Literal | typeof SHACL.IRI | typeof SHACL.BlankNode | typeof SHACL.BlankNodeOrIRI | typeof SHACL.BlankNodeOrLiteral | typeof SHACL.IRIOrLiteral;
|
|
32
|
-
export declare type BaseShape = NodeObject & {
|
|
33
|
-
[SHACL.targetNode]?: ShaclIRIOrLiteral;
|
|
34
|
-
[SHACL.targetClass]?: ShaclIRI;
|
|
35
|
-
[SHACL.targetSubjectsOf]?: ShaclIRI;
|
|
36
|
-
[SHACL.targetObjectOf]?: ShaclIRI;
|
|
37
|
-
[SHACL.severity]?: ShaclIRI;
|
|
38
|
-
[SHACL.message]?: OrArray<ValueObject<string>>;
|
|
39
|
-
[SHACL.deactivated]?: ValueObject<boolean>;
|
|
40
|
-
[SHACL.and]?: ShapesListShape;
|
|
41
|
-
[SHACL.class]?: OrArray<ShaclIRI>;
|
|
42
|
-
[SHACL.closed]?: ValueObject<boolean>;
|
|
43
|
-
[SHACL.ignoredProperties]?: ShaclIRI[];
|
|
44
|
-
[SHACL.disjoint]?: OrArray<ShaclIRI>;
|
|
45
|
-
[SHACL.equals]?: OrArray<ShaclIRI>;
|
|
46
|
-
[SHACL.in]?: ListObject;
|
|
47
|
-
[SHACL.languageIn]?: string[];
|
|
48
|
-
[SHACL.maxExclusive]?: ValueObject<number>;
|
|
49
|
-
[SHACL.maxInclusive]?: ValueObject<number>;
|
|
50
|
-
[SHACL.maxLength]?: ValueObject<number>;
|
|
51
|
-
[SHACL.minExclusive]?: ValueObject<number>;
|
|
52
|
-
[SHACL.minInclusive]?: ValueObject<number>;
|
|
53
|
-
[SHACL.minLength]?: ValueObject<number>;
|
|
54
|
-
[SHACL.nodeKind]?: IRIObject<NodeKindValues>;
|
|
55
|
-
[SHACL.or]?: ShapesListShape;
|
|
56
|
-
[SHACL.pattern]?: ValueObject<string>;
|
|
57
|
-
[SHACL.flags]?: ValueObject<string>;
|
|
58
|
-
[SHACL.xone]?: ShapesListShape;
|
|
59
|
-
};
|
|
60
|
-
export declare type ShapesListShape = (PropertyShape | NodeShape)[];
|
|
61
|
-
export interface PropertyShape extends BaseShape {
|
|
62
|
-
[SHACL.path]: PathTypes;
|
|
63
|
-
[SHACL.datatype]?: ShaclIRI;
|
|
64
|
-
[SHACL.node]?: OrArray<NodeShape>;
|
|
65
|
-
[SHACL.name]?: ValueObject<string>;
|
|
66
|
-
[SHACL.description]?: ValueObject<string>;
|
|
67
|
-
[SHACL.minCount]?: ValueObject<number>;
|
|
68
|
-
[SHACL.maxCount]?: ValueObject<number>;
|
|
69
|
-
[SHACL.lessThanOrEquals]?: OrArray<ShaclIRI>;
|
|
70
|
-
[SHACL.lessThan]?: OrArray<ShaclIRI>;
|
|
71
|
-
[SHACL.qualifiedValueShape]?: OrArray<BaseShape>;
|
|
72
|
-
[SHACL.qualifiedMaxCount]?: ValueObject<number>;
|
|
73
|
-
[SHACL.qualifiedMinCount]?: ValueObject<number>;
|
|
74
|
-
[SHACL.qualifiedValueShapesDisjoint]?: ValueObject<boolean>;
|
|
75
|
-
[SHACL.uniqueLang]?: ValueObject<boolean>;
|
|
76
|
-
}
|
|
77
|
-
export interface NodeShape extends BaseShape {
|
|
78
|
-
'@type': typeof SHACL.NodeShape;
|
|
79
|
-
[EngineConstants.prop.label]?: ValueObject<string>;
|
|
80
|
-
[SHACL.property]: OrArray<PropertyShape>;
|
|
81
|
-
}
|
|
82
|
-
export interface InverseShaclPath extends NodeObject {
|
|
83
|
-
[SHACL.inversePath]: PathShape;
|
|
84
|
-
}
|
|
85
|
-
export interface ZeroOrMoreShaclPath extends NodeObject {
|
|
86
|
-
[SHACL.zeroOrMorePath]: PathShape;
|
|
87
|
-
}
|
|
88
|
-
export interface OneOrMoreShaclPath extends NodeObject {
|
|
89
|
-
[SHACL.oneOrMorePath]: PathShape;
|
|
90
|
-
}
|
|
91
|
-
export interface ZeroOrOneShaclPath extends NodeObject {
|
|
92
|
-
[SHACL.zeroOrOnePath]: PathShape;
|
|
93
|
-
}
|
|
94
|
-
export interface AlternativeShaclPath extends NodeObject {
|
|
95
|
-
[SHACL.alternativePath]: PathTypes[];
|
|
96
|
-
}
|
|
97
|
-
export declare type PathTypes = ShaclIRI | AlternativeShaclPath | ZeroOrMoreShaclPath | OneOrMoreShaclPath | ZeroOrOneShaclPath | InverseShaclPath;
|
|
98
|
-
export declare type PathShape = OrArray<PathTypes>;
|
|
99
|
-
export declare type Mapping = NodeObject & {
|
|
100
|
-
[EngineConstants.prop.preProcessingMapping]?: OrArray<TriplesMap>;
|
|
101
|
-
[EngineConstants.prop.preProcessingMappingFrame]?: ValueObject<JSONObject>;
|
|
102
|
-
[EngineConstants.prop.inputsMapping]?: OrArray<TriplesMap>;
|
|
103
|
-
[EngineConstants.prop.inputsMappingFrame]?: ValueObject<JSONObject>;
|
|
104
|
-
[EngineConstants.prop.inputsMappingRef]?: string | ValueObject<string>;
|
|
105
|
-
[EngineConstants.prop.operationId]?: ValueObject<string>;
|
|
106
|
-
[EngineConstants.prop.operationMapping]?: TriplesMap;
|
|
107
|
-
[EngineConstants.prop.capability]?: ReferenceNodeObject;
|
|
108
|
-
[EngineConstants.prop.outputsMapping]?: OrArray<TriplesMap>;
|
|
109
|
-
[EngineConstants.prop.outputsMappingFrame]?: ValueObject<JSONObject>;
|
|
110
|
-
[EngineConstants.prop.series]?: {
|
|
111
|
-
'@list': CapabilityMapping[];
|
|
112
|
-
} | (RdfList<CapabilityMapping> & NodeObject);
|
|
113
|
-
[EngineConstants.prop.parallel]?: OrArray<CapabilityMapping>;
|
|
114
|
-
};
|
|
115
|
-
export declare type Capability = NodeObject & {
|
|
116
|
-
'@id': string;
|
|
117
|
-
'@type': typeof EngineConstants.spec.capability;
|
|
118
|
-
[EngineConstants.prop.label]?: ValueObject<string>;
|
|
119
|
-
[EngineConstants.prop.inputsContext]?: ValueObject<JSONObject>;
|
|
120
|
-
[EngineConstants.prop.inputs]?: NodeShape | ReferenceNodeObject;
|
|
121
|
-
[EngineConstants.prop.outputsContext]?: ValueObject<JSONObject>;
|
|
122
|
-
[EngineConstants.prop.outputs]?: NodeShape | ReferenceNodeObject;
|
|
123
|
-
};
|
|
124
|
-
export declare type CapabilityMapping = Mapping & {
|
|
125
|
-
[EngineConstants.prop.capability]: ReferenceNodeObject;
|
|
126
|
-
[EngineConstants.prop.object]?: ReferenceNodeObject;
|
|
127
|
-
[EngineConstants.prop.integration]?: ReferenceNodeObject;
|
|
128
|
-
};
|
|
129
|
-
export declare type MappingWithInputs = CapabilityMapping & Required<Pick<CapabilityMapping, typeof EngineConstants.prop.inputs | typeof EngineConstants.prop.inputsMapping>>;
|
|
130
|
-
export declare type MappingWithInputsReference = CapabilityMapping & Required<Pick<CapabilityMapping, typeof EngineConstants.prop.inputsReference>>;
|
|
131
|
-
export declare type MappingWithOutputsMapping = CapabilityMapping & Required<Pick<CapabilityMapping, typeof EngineConstants.prop.outputsMapping | typeof EngineConstants.prop.outputsMappingFrame>>;
|
|
132
|
-
export declare type MappingWithSeries = CapabilityMapping & Required<Pick<CapabilityMapping, typeof EngineConstants.prop.series>>;
|
|
133
|
-
export declare type MappingWithParallel = CapabilityMapping & Required<Pick<CapabilityMapping, typeof EngineConstants.prop.parallel>>;
|
|
134
|
-
export interface SeriesCapabilityArgs extends JSONObject {
|
|
135
|
-
originalCapabilityParameters: JSONObject;
|
|
136
|
-
previousCapabilityReturnValue: JSONObject;
|
|
137
|
-
allStepsResults: JSONObject[];
|
|
138
|
-
}
|
|
139
|
-
export declare type TriggerMapping = Mapping & {
|
|
140
|
-
[EngineConstants.prop.integration]: ReferenceNodeObject;
|
|
141
|
-
};
|
|
142
|
-
export declare type PossibleArrayFieldValues = boolean | number | string | NodeObject | GraphObject | ValueObject<any> | ListObject | SetObject;
|
|
143
|
-
export declare type EntityFieldSingularValue = boolean | number | string | NodeObject | GraphObject | ValueObject<any> | ListObject | SetObject;
|
|
144
|
-
export declare type EntityFieldValue = OrArray<EntityFieldSingularValue> | LanguageMap | IndexMap | IncludedBlock | IdMap | TypeMap | NodeObject[keyof NodeObject];
|
|
145
|
-
export interface Entity {
|
|
146
|
-
'@id': string;
|
|
147
|
-
'@type': OrArray<string>;
|
|
148
|
-
[key: string]: EntityFieldValue;
|
|
149
|
-
}
|
|
150
|
-
export declare type OrArray<T> = T | T[];
|
|
151
|
-
export interface OperationResponse extends JSONObject {
|
|
152
|
-
data: JSONObject;
|
|
153
|
-
operationParameters: JSONObject;
|
|
154
|
-
}
|
|
155
|
-
export interface CapabilityConfig {
|
|
156
|
-
/**
|
|
157
|
-
* Callbacks to execute upon events.
|
|
158
|
-
* If global callbacks are provided, both are executed.
|
|
159
|
-
*/
|
|
160
|
-
callbacks?: Callbacks;
|
|
161
|
-
/**
|
|
162
|
-
* When true, disables validation of capability parameters and
|
|
163
|
-
* return values according to schemas. Overrides the global setting.
|
|
164
|
-
*/
|
|
165
|
-
readonly disableValidation?: boolean;
|
|
166
|
-
/**
|
|
167
|
-
* An object containing files keyed on their title that can be used in mappings.
|
|
168
|
-
* Merged with the global setting. The capability config taking prededence in the case of overlapping names.
|
|
169
|
-
*/
|
|
170
|
-
readonly inputFiles?: Record<string, string>;
|
|
171
|
-
/**
|
|
172
|
-
* Manually defined functions which can be used in mappings.
|
|
173
|
-
* Merged with the global setting. The capability config taking prededence in the case of overlapping names.
|
|
174
|
-
*/
|
|
175
|
-
readonly functions?: Record<string, (args: any | any[]) => any>;
|
|
176
|
-
/**
|
|
177
|
-
* When true, the operation will be streamed.
|
|
178
|
-
*/
|
|
179
|
-
readonly stream?: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* When true, the operation will be buffered.
|
|
182
|
-
*/
|
|
183
|
-
readonly buffer?: boolean;
|
|
184
|
-
}
|
|
185
|
-
export interface Callbacks {
|
|
186
|
-
/**
|
|
187
|
-
* Callback run when a Capability starts being executed
|
|
188
|
-
*/
|
|
189
|
-
onCapabilityStart?: (capability: string, args: Record<string, any>) => void;
|
|
190
|
-
/**
|
|
191
|
-
* Callback run when a Capability is finished being executed
|
|
192
|
-
*/
|
|
193
|
-
onCapabilityEnd?: (capability: string, returnValue: Record<string, any>) => void;
|
|
194
|
-
}
|
|
195
|
-
export interface SKLEngineInterface {
|
|
196
|
-
/**
|
|
197
|
-
* Finds the first entity by the given find options
|
|
198
|
-
*/
|
|
199
|
-
find: (options?: FindOneOptions) => Promise<Entity>;
|
|
200
|
-
/**
|
|
201
|
-
* Finds the first entity that matches the given where condition
|
|
202
|
-
*/
|
|
203
|
-
findBy: (where: FindOptionsWhere, notFoundErrorMessage?: string) => Promise<Entity>;
|
|
204
|
-
/**
|
|
205
|
-
* Finds the first entity that matches the given where condition, or undefined if not found
|
|
206
|
-
*/
|
|
207
|
-
findByIfExists: (options: FindOptionsWhere) => Promise<Entity | undefined>;
|
|
208
|
-
/**
|
|
209
|
-
* Finds entities that match the given find options
|
|
210
|
-
*/
|
|
211
|
-
findAll: (options?: FindAllOptions) => Promise<Entity[]>;
|
|
212
|
-
/**
|
|
213
|
-
* Groups entities by the given options
|
|
214
|
-
*/
|
|
215
|
-
groupBy: (options: GroupByOptions) => Promise<GroupByResponse>;
|
|
216
|
-
/**
|
|
217
|
-
* Finds entities that match the given where condition
|
|
218
|
-
*/
|
|
219
|
-
findAllBy: (where: FindOptionsWhere) => Promise<Entity[]>;
|
|
220
|
-
/**
|
|
221
|
-
* Determines if an entity matching the given options exists
|
|
222
|
-
*/
|
|
223
|
-
exists: (options?: FindAllOptions) => Promise<boolean>;
|
|
224
|
-
/**
|
|
225
|
-
* Returns a count of entities matching the given options
|
|
226
|
-
*/
|
|
227
|
-
count: (options?: FindAllOptions) => Promise<number>;
|
|
228
|
-
/**
|
|
229
|
-
* Saves a given entity or entities
|
|
230
|
-
*/
|
|
231
|
-
save: ((entity: Entity) => Promise<Entity>) & ((entities: Entity[]) => Promise<Entity[]>);
|
|
232
|
-
/**
|
|
233
|
-
* Updates an entity or entities partially
|
|
234
|
-
*/
|
|
235
|
-
update: ((id: string, attributes: Partial<Entity>) => Promise<void>) & ((ids: string[], attributes: Partial<Entity>) => Promise<void>);
|
|
236
|
-
/**
|
|
237
|
-
* Removes an entity or entities from the database by id
|
|
238
|
-
*/
|
|
239
|
-
delete: ((id: string) => Promise<void>) & ((ids: string[]) => Promise<void>);
|
|
240
|
-
/**
|
|
241
|
-
* Removes a given entity or entities from the database
|
|
242
|
-
*/
|
|
243
|
-
destroy: ((entity: Entity) => Promise<Entity>) & ((entities: Entity[]) => Promise<Entity[]>);
|
|
244
|
-
/**
|
|
245
|
-
* Performs a mapping operation
|
|
246
|
-
*/
|
|
247
|
-
performMapping: (args: JSONValue, mapping: OrArray<NodeObject>, frame?: Record<string, any>, capabilityConfig?: CapabilityConfig) => Promise<NodeObject>;
|
|
248
|
-
/**
|
|
249
|
-
* Executes a raw query
|
|
250
|
-
*/
|
|
251
|
-
executeRawQuery: <T extends RawQueryResult>(query: string) => Promise<T[]>;
|
|
252
|
-
/**
|
|
253
|
-
* Executes a raw update query
|
|
254
|
-
*/
|
|
255
|
-
executeRawUpdate: (query: string) => Promise<void>;
|
|
256
|
-
/**
|
|
257
|
-
* Executes a raw construct query
|
|
258
|
-
*/
|
|
259
|
-
executeRawConstructQuery: (query: string, frame?: Frame) => Promise<GraphObject>;
|
|
260
|
-
/**
|
|
261
|
-
* Record of capability handlers by name
|
|
262
|
-
*/
|
|
263
|
-
capability: Record<string, (params: JSONObject, capabilityConfig?: CapabilityConfig) => Promise<any>>;
|
|
264
|
-
/**
|
|
265
|
-
* Finds and executes a capability
|
|
266
|
-
*/
|
|
267
|
-
findAndExecuteCapability: (capabilityId: string, args: JSONObject, capabilityConfig?: CapabilityConfig) => Promise<OrArray<NodeObject>>;
|
|
268
|
-
executeCapability: (capability: Capability, capabilityArgs: JSONObject, capabilityConfig?: CapabilityConfig) => Promise<OrArray<NodeObject>>;
|
|
269
|
-
executeMapping: (mapping: Mapping, args: JSONObject, capabilityConfig?: CapabilityConfig, account?: Entity) => Promise<OrArray<NodeObject>>;
|
|
270
|
-
}
|
|
271
|
-
//# sourceMappingURL=Types.d.ts.map
|
package/dist/util/Types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../src/util/Types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX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AAO,CAAC,UAAU,CAAC,CAAC;IAEzB;;OAEG;IACH,eAAe,EAAE,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAE3E;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;OAEG;IACH,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAEjF;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAEtG;;OAEG;IACH,wBAAwB,EAAE,CACxB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,UAAU,EAChB,gBAAgB,CAAC,EAAE,gBAAgB,KAChC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAElC,iBAAiB,EAAE,CACjB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,UAAU,EAC1B,gBAAgB,CAAC,EAAE,gBAAgB,KAChC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAElC,cAAc,EAAE,CACd,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,UAAU,EAChB,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;CACnC"}
|
package/dist/util/Types.js
DELETED
package/dist/util/Types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../src/util/Types.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { ReferenceNodeObject, TriplesMap } from '@comake/rmlmapper-js';\nimport type {\n GraphObject,\n IdMap,\n IncludedBlock,\n IndexMap,\n LanguageMap,\n ListObject,\n NodeObject,\n SetObject,\n TypeMap\n} from 'jsonld';\nimport type { Frame } from 'jsonld/jsonld-spec';\nimport type { EngineConstants } from '../constants';\nimport type { FindAllOptions, FindOneOptions, FindOptionsWhere } from '../storage/FindOptionsTypes';\nimport type { GroupByOptions, GroupByResponse } from '../storage/GroupOptionTypes';\nimport type { RawQueryResult } from '../storage/query-adapter/QueryAdapter';\nimport type { RDF, SHACL } from './Vocabularies';\n\nexport type JSONPrimitive = string | number | boolean | null;\n// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style\nexport interface JSONObject {\n [key: string]: JSONValue | undefined;\n}\nexport interface JSONArray extends Array<JSONValue> {}\n\nexport type JSONValue = JSONPrimitive | JSONObject | JSONValue[];\n\nexport interface RdfList<T> {\n [RDF.first]: T;\n [RDF.rest]?: RdfList<T> | typeof RDF.nil | ReferenceNodeObject;\n}\n\nexport interface ValueObject<T extends string | boolean | number | JSONObject | JSONArray> {\n ['@type']: string;\n ['@value']: T;\n ['@language']?: string;\n ['@direction']?: string;\n}\n\nexport type IRIObject<T extends string = string> = { '@id': T };\n\nexport type ShaclIRI = string | IRIObject;\nexport type ShaclIRIOrLiteral = ShaclIRI | ValueObject<any>;\n\nexport type NodeKindValues =\n | typeof SHACL.Literal\n | typeof SHACL.IRI\n | typeof SHACL.BlankNode\n | typeof SHACL.BlankNodeOrIRI\n | typeof SHACL.BlankNodeOrLiteral\n | typeof SHACL.IRIOrLiteral;\n\nexport type BaseShape = NodeObject & {\n [SHACL.targetNode]?: ShaclIRIOrLiteral;\n [SHACL.targetClass]?: ShaclIRI;\n [SHACL.targetSubjectsOf]?: ShaclIRI;\n [SHACL.targetObjectOf]?: ShaclIRI;\n [SHACL.severity]?: ShaclIRI;\n [SHACL.message]?: OrArray<ValueObject<string>>;\n [SHACL.deactivated]?: ValueObject<boolean>;\n [SHACL.and]?: ShapesListShape;\n [SHACL.class]?: OrArray<ShaclIRI>;\n [SHACL.closed]?: ValueObject<boolean>;\n [SHACL.ignoredProperties]?: ShaclIRI[];\n [SHACL.disjoint]?: OrArray<ShaclIRI>;\n [SHACL.equals]?: OrArray<ShaclIRI>;\n [SHACL.in]?: ListObject;\n [SHACL.languageIn]?: string[];\n [SHACL.maxExclusive]?: ValueObject<number>;\n [SHACL.maxInclusive]?: ValueObject<number>;\n [SHACL.maxLength]?: ValueObject<number>;\n [SHACL.minExclusive]?: ValueObject<number>;\n [SHACL.minInclusive]?: ValueObject<number>;\n [SHACL.minLength]?: ValueObject<number>;\n [SHACL.nodeKind]?: IRIObject<NodeKindValues>;\n [SHACL.or]?: ShapesListShape;\n [SHACL.pattern]?: ValueObject<string>;\n [SHACL.flags]?: ValueObject<string>;\n [SHACL.xone]?: ShapesListShape;\n};\n\nexport type ShapesListShape = (PropertyShape | NodeShape)[];\n\nexport interface PropertyShape extends BaseShape {\n [SHACL.path]: PathTypes;\n [SHACL.datatype]?: ShaclIRI;\n [SHACL.node]?: OrArray<NodeShape>;\n [SHACL.name]?: ValueObject<string>;\n [SHACL.description]?: ValueObject<string>;\n [SHACL.minCount]?: ValueObject<number>;\n [SHACL.maxCount]?: ValueObject<number>;\n [SHACL.lessThanOrEquals]?: OrArray<ShaclIRI>;\n [SHACL.lessThan]?: OrArray<ShaclIRI>;\n [SHACL.qualifiedValueShape]?: OrArray<BaseShape>;\n [SHACL.qualifiedMaxCount]?: ValueObject<number>;\n [SHACL.qualifiedMinCount]?: ValueObject<number>;\n [SHACL.qualifiedValueShapesDisjoint]?: ValueObject<boolean>;\n [SHACL.uniqueLang]?: ValueObject<boolean>;\n}\n\nexport interface NodeShape extends BaseShape {\n '@type': typeof SHACL.NodeShape;\n [EngineConstants.prop.label]?: ValueObject<string>;\n [SHACL.property]: OrArray<PropertyShape>;\n}\n\nexport interface InverseShaclPath extends NodeObject {\n [SHACL.inversePath]: PathShape;\n}\n\nexport interface ZeroOrMoreShaclPath extends NodeObject {\n [SHACL.zeroOrMorePath]: PathShape;\n}\n\nexport interface OneOrMoreShaclPath extends NodeObject {\n [SHACL.oneOrMorePath]: PathShape;\n}\n\nexport interface ZeroOrOneShaclPath extends NodeObject {\n [SHACL.zeroOrOnePath]: PathShape;\n}\n\nexport interface AlternativeShaclPath extends NodeObject {\n [SHACL.alternativePath]: PathTypes[];\n}\n\nexport type PathTypes =\n | ShaclIRI\n | AlternativeShaclPath\n | ZeroOrMoreShaclPath\n | OneOrMoreShaclPath\n | ZeroOrOneShaclPath\n | InverseShaclPath;\n\nexport type PathShape = OrArray<PathTypes>;\n\nexport type Mapping = NodeObject & {\n [EngineConstants.prop.preProcessingMapping]?: OrArray<TriplesMap>;\n [EngineConstants.prop.preProcessingMappingFrame]?: ValueObject<JSONObject>;\n [EngineConstants.prop.inputsMapping]?: OrArray<TriplesMap>;\n [EngineConstants.prop.inputsMappingFrame]?: ValueObject<JSONObject>;\n [EngineConstants.prop.inputsMappingRef]?: string | ValueObject<string>;\n [EngineConstants.prop.operationId]?: ValueObject<string>;\n [EngineConstants.prop.operationMapping]?: TriplesMap;\n [EngineConstants.prop.capability]?: ReferenceNodeObject;\n [EngineConstants.prop.outputsMapping]?: OrArray<TriplesMap>;\n [EngineConstants.prop.outputsMappingFrame]?: ValueObject<JSONObject>;\n [EngineConstants.prop.series]?: { '@list': CapabilityMapping[] } | (RdfList<CapabilityMapping> & NodeObject);\n [EngineConstants.prop.parallel]?: OrArray<CapabilityMapping>;\n};\n\nexport type Capability = NodeObject & {\n '@id': string;\n '@type': typeof EngineConstants.spec.capability;\n [EngineConstants.prop.label]?: ValueObject<string>;\n [EngineConstants.prop.inputsContext]?: ValueObject<JSONObject>;\n [EngineConstants.prop.inputs]?: NodeShape | ReferenceNodeObject;\n [EngineConstants.prop.outputsContext]?: ValueObject<JSONObject>;\n [EngineConstants.prop.outputs]?: NodeShape | ReferenceNodeObject;\n};\n\nexport type CapabilityMapping = Mapping & {\n [EngineConstants.prop.capability]: ReferenceNodeObject;\n [EngineConstants.prop.object]?: ReferenceNodeObject;\n [EngineConstants.prop.integration]?: ReferenceNodeObject;\n};\n\nexport type MappingWithInputs = CapabilityMapping &\nRequired<Pick<CapabilityMapping, typeof EngineConstants.prop.inputs | typeof EngineConstants.prop.inputsMapping>>;\n\nexport type MappingWithInputsReference = CapabilityMapping &\nRequired<Pick<CapabilityMapping, typeof EngineConstants.prop.inputsReference>>;\n\nexport type MappingWithOutputsMapping = CapabilityMapping &\nRequired<\nPick<\nCapabilityMapping,\n typeof EngineConstants.prop.outputsMapping | typeof EngineConstants.prop.outputsMappingFrame\n>\n>;\n\nexport type MappingWithSeries = CapabilityMapping &\nRequired<Pick<CapabilityMapping, typeof EngineConstants.prop.series>>;\n\nexport type MappingWithParallel = CapabilityMapping &\nRequired<Pick<CapabilityMapping, typeof EngineConstants.prop.parallel>>;\n\nexport interface SeriesCapabilityArgs extends JSONObject {\n originalCapabilityParameters: JSONObject;\n previousCapabilityReturnValue: JSONObject;\n allStepsResults: JSONObject[];\n}\n\nexport type TriggerMapping = Mapping & {\n [EngineConstants.prop.integration]: ReferenceNodeObject;\n};\n\nexport type PossibleArrayFieldValues =\n | boolean\n | number\n | string\n | NodeObject\n | GraphObject\n | ValueObject<any>\n | ListObject\n | SetObject;\n\nexport type EntityFieldSingularValue =\n | boolean\n | number\n | string\n | NodeObject\n | GraphObject\n | ValueObject<any>\n | ListObject\n | SetObject;\n\nexport type EntityFieldValue =\n | OrArray<EntityFieldSingularValue>\n | LanguageMap\n | IndexMap\n | IncludedBlock\n | IdMap\n | TypeMap\n | NodeObject[keyof NodeObject];\n\nexport interface Entity {\n '@id': string;\n '@type': OrArray<string>;\n [key: string]: EntityFieldValue;\n}\n\nexport type OrArray<T> = T | T[];\n\nexport interface OperationResponse extends JSONObject {\n data: JSONObject;\n operationParameters: JSONObject;\n}\n\nexport interface CapabilityConfig {\n /**\n * Callbacks to execute upon events.\n * If global callbacks are provided, both are executed.\n */\n callbacks?: Callbacks;\n /**\n * When true, disables validation of capability parameters and\n * return values according to schemas. Overrides the global setting.\n */\n readonly disableValidation?: boolean;\n /**\n * An object containing files keyed on their title that can be used in mappings.\n * Merged with the global setting. The capability config taking prededence in the case of overlapping names.\n */\n readonly inputFiles?: Record<string, string>;\n /**\n * Manually defined functions which can be used in mappings.\n * Merged with the global setting. The capability config taking prededence in the case of overlapping names.\n */\n readonly functions?: Record<string, (args: any | any[]) => any>;\n\n /**\n * When true, the operation will be streamed.\n */\n readonly stream?: boolean;\n\n /**\n * When true, the operation will be buffered.\n */\n readonly buffer?: boolean;\n}\n\nexport interface Callbacks {\n /**\n * Callback run when a Capability starts being executed\n */\n onCapabilityStart?: (capability: string, args: Record<string, any>) => void;\n /**\n * Callback run when a Capability is finished being executed\n */\n onCapabilityEnd?: (capability: string, returnValue: Record<string, any>) => void;\n}\n\nexport interface SKLEngineInterface {\n /**\n * Finds the first entity by the given find options\n */\n find: (options?: FindOneOptions) => Promise<Entity>;\n\n /**\n * Finds the first entity that matches the given where condition\n */\n findBy: (where: FindOptionsWhere, notFoundErrorMessage?: string) => Promise<Entity>;\n\n /**\n * Finds the first entity that matches the given where condition, or undefined if not found\n */\n findByIfExists: (options: FindOptionsWhere) => Promise<Entity | undefined>;\n\n /**\n * Finds entities that match the given find options\n */\n findAll: (options?: FindAllOptions) => Promise<Entity[]>;\n\n /**\n * Groups entities by the given options\n */\n groupBy: (options: GroupByOptions) => Promise<GroupByResponse>;\n\n /**\n * Finds entities that match the given where condition\n */\n findAllBy: (where: FindOptionsWhere) => Promise<Entity[]>;\n\n /**\n * Determines if an entity matching the given options exists\n */\n exists: (options?: FindAllOptions) => Promise<boolean>;\n\n /**\n * Returns a count of entities matching the given options\n */\n count: (options?: FindAllOptions) => Promise<number>;\n\n /**\n * Saves a given entity or entities\n */\n save: ((entity: Entity) => Promise<Entity>) & ((entities: Entity[]) => Promise<Entity[]>);\n\n /**\n * Updates an entity or entities partially\n */\n update: ((id: string, attributes: Partial<Entity>) => Promise<void>) &\n ((ids: string[], attributes: Partial<Entity>) => Promise<void>);\n\n /**\n * Removes an entity or entities from the database by id\n */\n delete: ((id: string) => Promise<void>) & ((ids: string[]) => Promise<void>);\n\n /**\n * Removes a given entity or entities from the database\n */\n destroy: ((entity: Entity) => Promise<Entity>) & ((entities: Entity[]) => Promise<Entity[]>);\n\n /**\n * Performs a mapping operation\n */\n performMapping: (\n args: JSONValue,\n mapping: OrArray<NodeObject>,\n frame?: Record<string, any>,\n capabilityConfig?: CapabilityConfig,\n ) => Promise<NodeObject>;\n\n /**\n * Executes a raw query\n */\n executeRawQuery: <T extends RawQueryResult>(query: string) => Promise<T[]>;\n\n /**\n * Executes a raw update query\n */\n executeRawUpdate: (query: string) => Promise<void>;\n\n /**\n * Executes a raw construct query\n */\n executeRawConstructQuery: (query: string, frame?: Frame) => Promise<GraphObject>;\n\n /**\n * Record of capability handlers by name\n */\n capability: Record<string, (params: JSONObject, capabilityConfig?: CapabilityConfig) => Promise<any>>;\n\n /**\n * Finds and executes a capability\n */\n findAndExecuteCapability: (\n capabilityId: string,\n args: JSONObject,\n capabilityConfig?: CapabilityConfig,\n ) => Promise<OrArray<NodeObject>>;\n\n executeCapability: (\n capability: Capability,\n capabilityArgs: JSONObject,\n capabilityConfig?: CapabilityConfig,\n ) => Promise<OrArray<NodeObject>>;\n\n executeMapping: (\n mapping: Mapping,\n args: JSONObject,\n capabilityConfig?: CapabilityConfig,\n account?: Entity,\n ) => Promise<OrArray<NodeObject>>;\n}\n"]}
|
package/dist/util/Util.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { NodeObject } from 'jsonld';
|
|
2
|
-
import { Store } from 'n3';
|
|
3
|
-
import type { EntityFieldValue, JSONObject, RdfList } from './Types';
|
|
4
|
-
export declare function convertJsonLdToQuads(jsonldDoc: any): Promise<Store>;
|
|
5
|
-
export declare function toJSON(jsonLd: NodeObject, convertBeyondFirstLevel?: boolean): JSONObject;
|
|
6
|
-
export declare function ensureArray<T>(arrayable: T | T[]): T[];
|
|
7
|
-
export declare function getValueIfDefined<T>(fieldValue?: EntityFieldValue): T | undefined;
|
|
8
|
-
export declare function isUrl(value: any): boolean;
|
|
9
|
-
export declare function rdfListToArray<T extends NodeObject>(list: {
|
|
10
|
-
'@list': T[];
|
|
11
|
-
} | RdfList<T>): T[];
|
|
12
|
-
export declare function parseJSONOrDefault<T>(json: string, defaultValue: T): T;
|
|
13
|
-
export declare const dataTypeMapping: {
|
|
14
|
-
string: "http://www.w3.org/2001/XMLSchema#string";
|
|
15
|
-
boolean: "http://www.w3.org/2001/XMLSchema#boolean";
|
|
16
|
-
integer: "http://www.w3.org/2001/XMLSchema#integer";
|
|
17
|
-
float: "http://www.w3.org/2001/XMLSchema#float";
|
|
18
|
-
double: "http://www.w3.org/2001/XMLSchema#double";
|
|
19
|
-
dateTime: "http://www.w3.org/2001/XMLSchema#dateTime";
|
|
20
|
-
json: "http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON";
|
|
21
|
-
};
|
|
22
|
-
export declare function getEntityValue<T>(value: T, dataType?: keyof typeof dataTypeMapping): {
|
|
23
|
-
'@type': string;
|
|
24
|
-
'@value': T;
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=Util.d.ts.map
|
package/dist/util/Util.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../../src/util/Util.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAU,KAAK,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,KAAK,EAA4B,gBAAgB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAG/F,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAQzE;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,uBAAuB,UAAO,GAAG,UAAU,CAmBrF;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAKtD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,gBAAgB,GAAG,CAAC,GAAG,SAAS,CAYjF;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAWzC;AAGD,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE;IAAE,OAAO,EAAE,CAAC,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAU7F;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC,CAMtE;AAED,eAAO,MAAM,eAAe;;;;;;;;CAQ3B,CAAC;AAEF,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,CAAC,EACR,QAAQ,GAAE,MAAM,OAAO,eAA0B,GAEhD;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,CAAC,CAAA;CAAE,CAOlC"}
|
package/dist/util/Util.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getEntityValue = exports.dataTypeMapping = exports.parseJSONOrDefault = exports.rdfListToArray = exports.isUrl = exports.getValueIfDefined = exports.ensureArray = exports.toJSON = exports.convertJsonLdToQuads = void 0;
|
|
27
|
-
const rmlmapper_js_1 = require("@comake/rmlmapper-js");
|
|
28
|
-
const jsonld = __importStar(require("jsonld"));
|
|
29
|
-
const n3_1 = require("n3");
|
|
30
|
-
const Vocabularies_1 = require("./Vocabularies");
|
|
31
|
-
async function convertJsonLdToQuads(jsonldDoc) {
|
|
32
|
-
const nquads = (await jsonld.toRDF(jsonldDoc, { format: 'application/n-quads' }));
|
|
33
|
-
const turtleParser = new n3_1.Parser({ format: 'application/n-quads' });
|
|
34
|
-
const store = new n3_1.Store();
|
|
35
|
-
turtleParser.parse(nquads).forEach((quad) => {
|
|
36
|
-
store.addQuad(quad);
|
|
37
|
-
});
|
|
38
|
-
return store;
|
|
39
|
-
}
|
|
40
|
-
exports.convertJsonLdToQuads = convertJsonLdToQuads;
|
|
41
|
-
function toJSON(jsonLd, convertBeyondFirstLevel = true) {
|
|
42
|
-
['@context', '@id', '@type'].forEach((key) => {
|
|
43
|
-
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
44
|
-
delete jsonLd[key];
|
|
45
|
-
});
|
|
46
|
-
if (convertBeyondFirstLevel) {
|
|
47
|
-
Object.keys(jsonLd).forEach((key) => {
|
|
48
|
-
if (Array.isArray(jsonLd[key])) {
|
|
49
|
-
jsonLd[key].forEach((item, index) => {
|
|
50
|
-
if (typeof item === 'object') {
|
|
51
|
-
jsonLd[key][index] = toJSON(item);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
else if (typeof jsonLd[key] === 'object') {
|
|
56
|
-
jsonLd[key] = toJSON(jsonLd[key]);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return jsonLd;
|
|
61
|
-
}
|
|
62
|
-
exports.toJSON = toJSON;
|
|
63
|
-
function ensureArray(arrayable) {
|
|
64
|
-
if (arrayable !== null && arrayable !== undefined) {
|
|
65
|
-
return Array.isArray(arrayable) ? arrayable : [arrayable];
|
|
66
|
-
}
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
exports.ensureArray = ensureArray;
|
|
70
|
-
function getValueIfDefined(fieldValue) {
|
|
71
|
-
if (fieldValue && Array.isArray(fieldValue)) {
|
|
72
|
-
return fieldValue.map((valueItem) => getValueIfDefined(valueItem));
|
|
73
|
-
}
|
|
74
|
-
if (fieldValue && typeof fieldValue === 'object') {
|
|
75
|
-
return fieldValue['@value'];
|
|
76
|
-
}
|
|
77
|
-
if (fieldValue !== undefined && fieldValue !== null) {
|
|
78
|
-
return fieldValue;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.getValueIfDefined = getValueIfDefined;
|
|
82
|
-
function isUrl(value) {
|
|
83
|
-
if (typeof value !== 'string') {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
try {
|
|
87
|
-
// eslint-disable-next-line no-new
|
|
88
|
-
new URL(value);
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
catch {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.isUrl = isUrl;
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
97
|
-
function rdfListToArray(list) {
|
|
98
|
-
if (!('@list' in list)) {
|
|
99
|
-
return [
|
|
100
|
-
list[Vocabularies_1.RDF.first],
|
|
101
|
-
...(0, rmlmapper_js_1.getIdFromNodeObjectIfDefined)(list[Vocabularies_1.RDF.rest]) === Vocabularies_1.RDF.nil
|
|
102
|
-
? []
|
|
103
|
-
: rdfListToArray(list[Vocabularies_1.RDF.rest])
|
|
104
|
-
];
|
|
105
|
-
}
|
|
106
|
-
return list['@list'];
|
|
107
|
-
}
|
|
108
|
-
exports.rdfListToArray = rdfListToArray;
|
|
109
|
-
function parseJSONOrDefault(json, defaultValue) {
|
|
110
|
-
try {
|
|
111
|
-
return JSON.parse(json);
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
return defaultValue;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.parseJSONOrDefault = parseJSONOrDefault;
|
|
118
|
-
exports.dataTypeMapping = {
|
|
119
|
-
string: Vocabularies_1.XSD.string,
|
|
120
|
-
boolean: Vocabularies_1.XSD.boolean,
|
|
121
|
-
integer: Vocabularies_1.XSD.integer,
|
|
122
|
-
float: Vocabularies_1.XSD.float,
|
|
123
|
-
double: Vocabularies_1.XSD.double,
|
|
124
|
-
dateTime: Vocabularies_1.XSD.dateTime,
|
|
125
|
-
json: Vocabularies_1.RDF.JSON
|
|
126
|
-
};
|
|
127
|
-
function getEntityValue(value, dataType = 'string'
|
|
128
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
129
|
-
) {
|
|
130
|
-
return {
|
|
131
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
132
|
-
'@type': exports.dataTypeMapping[dataType],
|
|
133
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
134
|
-
'@value': value
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
exports.getEntityValue = getEntityValue;
|
|
138
|
-
//# sourceMappingURL=Util.js.map
|
package/dist/util/Util.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../src/util/Util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uDAAoE;AACpE,+CAAiC;AAEjC,2BAAmC;AAEnC,iDAA0C;AAEnC,KAAK,UAAU,oBAAoB,CAAC,SAAc;IACvD,MAAM,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAsB,CAAC;IACvG,MAAM,YAAY,GAAG,IAAI,WAAM,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,IAAI,UAAK,EAAE,CAAC;IAC1B,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAQ,EAAE;QAChD,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AARD,oDAQC;AAED,SAAgB,MAAM,CAAC,MAAkB,EAAE,uBAAuB,GAAG,IAAI;IACvE,CAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAE,CAAC,OAAO,CAAC,CAAC,GAAG,EAAQ,EAAE;QACnD,gEAAgE;QAChE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,IAAI,uBAAuB,EAAE;QAC3B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAQ,EAAE;YACxC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC7B,MAAM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O,EAAE,uBAAe,CAAC,QAAQ,CAAC;QAClC,gEAAgE;QAChE,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC;AAXD,wCAWC","sourcesContent":["import type { ReferenceNodeObject } from '@comake/rmlmapper-js';\nimport { getIdFromNodeObjectIfDefined } from '@comake/rmlmapper-js';\nimport * as jsonld from 'jsonld';\nimport type { NodeObject, ValueObject } from 'jsonld';\nimport { Parser, Store } from 'n3';\nimport type { EntityFieldSingularValue, EntityFieldValue, JSONObject, RdfList } from './Types';\nimport { RDF, XSD } from './Vocabularies';\n\nexport async function convertJsonLdToQuads(jsonldDoc: any): Promise<Store> {\n const nquads = (await jsonld.toRDF(jsonldDoc, { format: 'application/n-quads' })) as unknown as string;\n const turtleParser = new Parser({ format: 'application/n-quads' });\n const store = new Store();\n turtleParser.parse(nquads).forEach((quad): void => {\n store.addQuad(quad);\n });\n return store;\n}\n\nexport function toJSON(jsonLd: NodeObject, convertBeyondFirstLevel = true): JSONObject {\n [ '@context', '@id', '@type' ].forEach((key): void => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete jsonLd[key];\n });\n if (convertBeyondFirstLevel) {\n Object.keys(jsonLd).forEach((key): void => {\n if (Array.isArray(jsonLd[key])) {\n (jsonLd[key] as any[])!.forEach((item, index): void => {\n if (typeof item === 'object') {\n (jsonLd[key] as any[])[index] = toJSON(item);\n }\n });\n } else if (typeof jsonLd[key] === 'object') {\n jsonLd[key] = toJSON(jsonLd[key] as NodeObject);\n }\n });\n }\n return jsonLd as JSONObject;\n}\n\nexport function ensureArray<T>(arrayable: T | T[]): T[] {\n if (arrayable !== null && arrayable !== undefined) {\n return Array.isArray(arrayable) ? arrayable : [ arrayable ];\n }\n return [];\n}\n\nexport function getValueIfDefined<T>(fieldValue?: EntityFieldValue): T | undefined {\n if (fieldValue && Array.isArray(fieldValue)) {\n return fieldValue.map(\n (valueItem): EntityFieldSingularValue => getValueIfDefined<EntityFieldSingularValue>(valueItem)!\n ) as unknown as T;\n }\n if (fieldValue && typeof fieldValue === 'object') {\n return (fieldValue as ValueObject)['@value'] as unknown as T;\n }\n if (fieldValue !== undefined && fieldValue !== null) {\n return fieldValue as unknown as T;\n }\n}\n\nexport function isUrl(value: any): boolean {\n if (typeof value !== 'string') {\n return false;\n }\n try {\n // eslint-disable-next-line no-new\n new URL(value);\n return true;\n } catch {\n return false;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rdfListToArray<T extends NodeObject>(list: { '@list': T[] } | RdfList<T>): T[] {\n if (!('@list' in list)) {\n return [\n list[RDF.first],\n ...getIdFromNodeObjectIfDefined(list[RDF.rest] as ReferenceNodeObject) === RDF.nil\n ? []\n : rdfListToArray(list[RDF.rest] as RdfList<T>)\n ];\n }\n return list['@list'];\n}\n\nexport function parseJSONOrDefault<T>(json: string, defaultValue: T): T {\n try {\n return JSON.parse(json);\n } catch {\n return defaultValue;\n }\n}\n\nexport const dataTypeMapping = {\n string: XSD.string,\n boolean: XSD.boolean,\n integer: XSD.integer,\n float: XSD.float,\n double: XSD.double,\n dateTime: XSD.dateTime,\n json: RDF.JSON\n};\n\nexport function getEntityValue<T>(\n value: T,\n dataType: keyof typeof dataTypeMapping = 'string'\n // eslint-disable-next-line @typescript-eslint/naming-convention\n): { '@type': string; '@value': T } {\n return {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@type': dataTypeMapping[dataType],\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@value': value\n };\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const XSD_NAMESPACE = "http://www.w3.org/2001/XMLSchema#";
|
|
2
|
-
export declare const RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
|
3
|
-
export declare const RDFS_NAMESPACE = "http://www.w3.org/2000/01/rdf-schema#";
|
|
4
|
-
export declare const R2RML_NAMESPACE = "http://www.w3.org/ns/r2rml#";
|
|
5
|
-
export declare const OWL_NAMESPACE = "https://www.w3.org/2002/07/owl#";
|
|
6
|
-
export declare const SHACL_NAMESPACE = "http://www.w3.org/ns/shacl#";
|
|
7
|
-
export declare const RDF: import("./helper").Namespace<"Property" | "type" | "datatype" | "JSON" | "first" | "rest" | "nil", "http://www.w3.org/1999/02/22-rdf-syntax-ns#">;
|
|
8
|
-
export declare const RDFS: import("./helper").Namespace<"subClassOf" | "label" | "range" | "domain", "http://www.w3.org/2000/01/rdf-schema#">;
|
|
9
|
-
export declare const R2RML: import("./helper").Namespace<"TriplesMap", "http://www.w3.org/ns/r2rml#">;
|
|
10
|
-
export declare const XSD: import("./helper").Namespace<"string" | "boolean" | "label" | "integer" | "double" | "decimal" | "float" | "positiveInteger" | "negativeInteger" | "int" | "date" | "time" | "dateTime", "http://www.w3.org/2001/XMLSchema#">;
|
|
11
|
-
export declare const OWL: import("./helper").Namespace<"Restriction" | "onProperty" | "allValuesFrom" | "Class" | "intersectionOf" | "someValuesFrom" | "ObjectProperty", "https://www.w3.org/2002/07/owl#">;
|
|
12
|
-
export declare const SHACL: import("./helper").Namespace<"datatype" | "NodeShape" | "PropertyShape" | "Literal" | "IRI" | "BlankNode" | "BlankNodeOrIRI" | "BlankNodeOrLiteral" | "IRIOrLiteral" | "property" | "path" | "name" | "description" | "minCount" | "maxCount" | "targetNode" | "targetClass" | "targetSubjectsOf" | "targetObjectOf" | "severity" | "message" | "deactivated" | "and" | "or" | "class" | "closed" | "ignoredProperties" | "disjoint" | "equals" | "in" | "languageIn" | "lessThan" | "lessThanOrEquals" | "maxExclusive" | "maxInclusive" | "maxLength" | "minExclusive" | "minInclusive" | "minLength" | "nodeKind" | "pattern" | "flags" | "qualifiedMaxCount" | "qualifiedMinCount" | "qualifiedValueShape" | "qualifiedValueShapesDisjoint" | "uniqueLang" | "xone" | "inversePath" | "zeroOrMorePath" | "oneOrMorePath" | "zeroOrOnePath" | "alternativePath" | "node", "http://www.w3.org/ns/shacl#">;
|
|
13
|
-
//# sourceMappingURL=Shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Shared.d.ts","sourceRoot":"","sources":["../../../src/util/Vocabularies/Shared.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,sCAAsC,CAAC;AACjE,eAAO,MAAM,aAAa,gDAAgD,CAAC;AAC3E,eAAO,MAAM,cAAc,0CAA0C,CAAC;AACtE,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAC7D,eAAO,MAAM,aAAa,oCAAoC,CAAC;AAC/D,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,eAAO,MAAM,GAAG,mJAAqG,CAAC;AAEtH,eAAO,MAAM,IAAI,oHAAgF,CAAC;AAElG,eAAO,MAAM,KAAK,2EAAqD,CAAC;AAExE,eAAO,MAAM,GAAG,+NAcd,CAAC;AAEH,eAAO,MAAM,GAAG,oLAQd,CAAC;AAEH,eAAO,MAAM,KAAK,62BAyDhB,CAAC"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SHACL = exports.OWL = exports.XSD = exports.R2RML = exports.RDFS = exports.RDF = exports.SHACL_NAMESPACE = exports.OWL_NAMESPACE = exports.R2RML_NAMESPACE = exports.RDFS_NAMESPACE = exports.RDF_NAMESPACE = exports.XSD_NAMESPACE = void 0;
|
|
4
|
-
const helper_1 = require("./helper");
|
|
5
|
-
exports.XSD_NAMESPACE = 'http://www.w3.org/2001/XMLSchema#';
|
|
6
|
-
exports.RDF_NAMESPACE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
|
|
7
|
-
exports.RDFS_NAMESPACE = 'http://www.w3.org/2000/01/rdf-schema#';
|
|
8
|
-
exports.R2RML_NAMESPACE = 'http://www.w3.org/ns/r2rml#';
|
|
9
|
-
exports.OWL_NAMESPACE = 'https://www.w3.org/2002/07/owl#';
|
|
10
|
-
exports.SHACL_NAMESPACE = 'http://www.w3.org/ns/shacl#';
|
|
11
|
-
exports.RDF = (0, helper_1.createNamespace)(exports.RDF_NAMESPACE, ['Property', 'type', 'datatype', 'JSON', 'first', 'rest', 'nil']);
|
|
12
|
-
exports.RDFS = (0, helper_1.createNamespace)(exports.RDFS_NAMESPACE, ['subClassOf', 'label', 'range', 'domain']);
|
|
13
|
-
exports.R2RML = (0, helper_1.createNamespace)(exports.R2RML_NAMESPACE, ['TriplesMap']);
|
|
14
|
-
exports.XSD = (0, helper_1.createNamespace)(exports.XSD_NAMESPACE, [
|
|
15
|
-
'boolean',
|
|
16
|
-
'integer',
|
|
17
|
-
'double',
|
|
18
|
-
'decimal',
|
|
19
|
-
'string',
|
|
20
|
-
'float',
|
|
21
|
-
'positiveInteger',
|
|
22
|
-
'negativeInteger',
|
|
23
|
-
'int',
|
|
24
|
-
'date',
|
|
25
|
-
'time',
|
|
26
|
-
'dateTime',
|
|
27
|
-
'label'
|
|
28
|
-
]);
|
|
29
|
-
exports.OWL = (0, helper_1.createNamespace)(exports.OWL_NAMESPACE, [
|
|
30
|
-
'Restriction',
|
|
31
|
-
'onProperty',
|
|
32
|
-
'allValuesFrom',
|
|
33
|
-
'Class',
|
|
34
|
-
'intersectionOf',
|
|
35
|
-
'someValuesFrom',
|
|
36
|
-
'ObjectProperty'
|
|
37
|
-
]);
|
|
38
|
-
exports.SHACL = (0, helper_1.createNamespace)(exports.SHACL_NAMESPACE, [
|
|
39
|
-
'NodeShape',
|
|
40
|
-
'PropertyShape',
|
|
41
|
-
'Literal',
|
|
42
|
-
'IRI',
|
|
43
|
-
'BlankNode',
|
|
44
|
-
'BlankNodeOrIRI',
|
|
45
|
-
'BlankNodeOrLiteral',
|
|
46
|
-
'IRIOrLiteral',
|
|
47
|
-
'property',
|
|
48
|
-
'path',
|
|
49
|
-
'name',
|
|
50
|
-
'description',
|
|
51
|
-
'minCount',
|
|
52
|
-
'maxCount',
|
|
53
|
-
'targetNode',
|
|
54
|
-
'targetClass',
|
|
55
|
-
'targetSubjectsOf',
|
|
56
|
-
'targetObjectOf',
|
|
57
|
-
'severity',
|
|
58
|
-
'message',
|
|
59
|
-
'deactivated',
|
|
60
|
-
'and',
|
|
61
|
-
'or',
|
|
62
|
-
'class',
|
|
63
|
-
'closed',
|
|
64
|
-
'ignoredProperties',
|
|
65
|
-
'datatype',
|
|
66
|
-
'disjoint',
|
|
67
|
-
'equals',
|
|
68
|
-
'in',
|
|
69
|
-
'languageIn',
|
|
70
|
-
'lessThan',
|
|
71
|
-
'lessThanOrEquals',
|
|
72
|
-
'maxCount',
|
|
73
|
-
'maxExclusive',
|
|
74
|
-
'maxInclusive',
|
|
75
|
-
'maxLength',
|
|
76
|
-
'minCount',
|
|
77
|
-
'minExclusive',
|
|
78
|
-
'minInclusive',
|
|
79
|
-
'minLength',
|
|
80
|
-
'nodeKind',
|
|
81
|
-
'pattern',
|
|
82
|
-
'flags',
|
|
83
|
-
'qualifiedMaxCount',
|
|
84
|
-
'qualifiedMinCount',
|
|
85
|
-
'qualifiedValueShape',
|
|
86
|
-
'qualifiedValueShapesDisjoint',
|
|
87
|
-
'uniqueLang',
|
|
88
|
-
'xone',
|
|
89
|
-
'inversePath',
|
|
90
|
-
'zeroOrMorePath',
|
|
91
|
-
'oneOrMorePath',
|
|
92
|
-
'zeroOrOnePath',
|
|
93
|
-
'alternativePath',
|
|
94
|
-
'node'
|
|
95
|
-
]);
|
|
96
|
-
//# sourceMappingURL=Shared.js.map
|