@comunica/actor-function-factory-expression-bnode 4.5.0 → 5.0.2

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/README.md CHANGED
@@ -24,7 +24,7 @@ After installing, this package can be added to your engine's configuration as fo
24
24
  {
25
25
  "@context": [
26
26
  ...
27
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-expression-bnode/^4.0.0/components/context.jsonld"
27
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-expression-bnode/^5.0.0/components/context.jsonld"
28
28
  ],
29
29
  "actors": [
30
30
  ...
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-expression-bnode/^4.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^4.0.0/components/context.jsonld",
5
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-expression-bnode/^5.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-function-factory/^5.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^5.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-function-factory-expression-bnode",
8
8
  "components": [
@@ -35,37 +35,37 @@
35
35
  "genericTypeInstances": [
36
36
  {
37
37
  "@type": "ParameterRangeGenericTypeReference",
38
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
38
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
39
39
  },
40
40
  {
41
41
  "@type": "ParameterRangeGenericTypeReference",
42
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
42
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
43
43
  },
44
44
  {
45
45
  "@type": "ParameterRangeGenericTypeReference",
46
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
46
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
47
47
  },
48
48
  {
49
49
  "@type": "ParameterRangeGenericTypeReference",
50
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
50
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
51
51
  }
52
52
  ]
53
53
  },
54
54
  {
55
55
  "@type": "ParameterRangeGenericTypeReference",
56
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
56
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
57
57
  },
58
58
  {
59
59
  "@type": "ParameterRangeGenericTypeReference",
60
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
60
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
61
61
  },
62
62
  {
63
63
  "@type": "ParameterRangeGenericTypeReference",
64
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
64
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
65
65
  },
66
66
  {
67
67
  "@type": "ParameterRangeGenericTypeReference",
68
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
68
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
69
69
  }
70
70
  ]
71
71
  },
@@ -102,19 +102,19 @@
102
102
  "genericTypeInstances": [
103
103
  {
104
104
  "@type": "ParameterRangeGenericTypeReference",
105
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
105
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
106
106
  },
107
107
  {
108
108
  "@type": "ParameterRangeGenericTypeReference",
109
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
109
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
110
110
  },
111
111
  {
112
112
  "@type": "ParameterRangeGenericTypeReference",
113
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
113
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
114
114
  },
115
115
  {
116
116
  "@type": "ParameterRangeGenericTypeReference",
117
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
117
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
118
118
  }
119
119
  ]
120
120
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-expression-bnode/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-expression-bnode/^5.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-function-factory-expression-bnode",
6
6
  "@type": "Module",
@@ -3,7 +3,7 @@
3
3
  "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "caffeb": "npmd:@comunica/actor-function-factory-expression-bnode/^4.0.0/",
6
+ "caffeb": "npmd:@comunica/actor-function-factory-expression-bnode/^5.0.0/",
7
7
  "ActorFunctionFactoryExpressionBnode": {
8
8
  "@id": "caffeb:components/ActorFunctionFactoryExpressionBnode.jsonld#ActorFunctionFactoryExpressionBnode",
9
9
  "@prefix": true,
File without changes
File without changes
File without changes
File without changes
@@ -10,6 +10,15 @@ const utils_expression_evaluator_1 = require("@comunica/utils-expression-evaluat
10
10
  * id has to be distinct over all id's in dataset
11
11
  */
12
12
  class ExpressionFunctionBnode extends bus_function_factory_1.ExpressionFunctionBase {
13
+ /**
14
+ * This OverloadTree with the constant function will handle both type promotion and subtype-substitution
15
+ */
16
+ static bnodeTree = (0, utils_expression_evaluator_1.declare)(utils_expression_evaluator_1.SparqlOperator.BNODE).onString1(() => arg => arg).collect();
17
+ /**
18
+ * A counter that keeps track blank node generated through BNODE() SPARQL
19
+ * expressions.
20
+ */
21
+ static bnodeCounter = 0;
13
22
  constructor() {
14
23
  super({
15
24
  arity: Number.POSITIVE_INFINITY,
@@ -37,13 +46,4 @@ class ExpressionFunctionBnode extends bus_function_factory_1.ExpressionFunctionB
37
46
  }
38
47
  }
39
48
  exports.ExpressionFunctionBnode = ExpressionFunctionBnode;
40
- /**
41
- * This OverloadTree with the constant function will handle both type promotion and subtype-substitution
42
- */
43
- ExpressionFunctionBnode.bnodeTree = (0, utils_expression_evaluator_1.declare)(utils_expression_evaluator_1.SparqlOperator.BNODE).onString1(() => arg => arg).collect();
44
- /**
45
- * A counter that keeps track blank node generated through BNODE() SPARQL
46
- * expressions.
47
- */
48
- ExpressionFunctionBnode.bnodeCounter = 0;
49
49
  //# sourceMappingURL=ExpressionFunctionBnode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpressionFunctionBnode.js","sourceRoot":"","sources":["ExpressionFunctionBnode.ts"],"names":[],"mappings":";;;AAAA,yEAAwE;AACxE,+DAAmF;AAEnF,qEAAuE;AACvE,qFAK8C;AAE9C;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,6CAAsB;IAYjE;QACE,KAAK,CAAC;YACJ,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,2CAAc,CAAC,KAAK;YAC9B,KAAK,EAAE,KAAK,EAAC,OAAqB,EAA2B,EAAE;gBAC7D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;gBAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAA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Base } from '@comunica/bus-function-factory';\nimport { KeysExpressionEvaluator, KeysInitQuery } from '@comunica/context-entries';\nimport type { Expression, IEvalContext, TermExpression } from '@comunica/types';\nimport { BlankNodeBindingsScoped } from '@comunica/utils-data-factory';\nimport {\n BlankNode,\n declare,\n InvalidArgumentTypes,\n SparqlOperator,\n} from '@comunica/utils-expression-evaluator';\n\n/**\n * https://www.w3.org/TR/sparql11-query/#func-bnode\n * id has to be distinct over all id's in dataset\n */\nexport class ExpressionFunctionBnode extends ExpressionFunctionBase {\n /**\n * This OverloadTree with the constant function will handle both type promotion and subtype-substitution\n */\n private static readonly bnodeTree = declare(SparqlOperator.BNODE).onString1(() => arg => arg).collect();\n\n /**\n * A counter that keeps track blank node generated through BNODE() SPARQL\n * expressions.\n */\n private static bnodeCounter = 0;\n\n public constructor() {\n super({\n arity: Number.POSITIVE_INFINITY,\n operator: SparqlOperator.BNODE,\n apply: async(context: IEvalContext): Promise<TermExpression> => {\n const { args, mapping, exprEval } = context;\n const input = args.length === 1 ?\n await exprEval.evaluatorExpressionEvaluation(args[0], mapping) :\n undefined;\n\n let strInput: string | undefined;\n if (input) {\n const operation = ExpressionFunctionBnode.bnodeTree.search(\n [ input ],\n exprEval.context.getSafe(KeysExpressionEvaluator.superTypeProvider),\n exprEval.context.getSafe(KeysInitQuery.functionArgumentsCache),\n );\n if (!operation) {\n throw new InvalidArgumentTypes(args, SparqlOperator.BNODE);\n }\n strInput = operation(exprEval)([ input ]).str();\n }\n\n const bnode = new BlankNodeBindingsScoped(strInput ?? `BNODE_${ExpressionFunctionBnode.bnodeCounter++}`);\n return new BlankNode(bnode);\n },\n });\n }\n\n public override checkArity(args: Expression[]): boolean {\n return args.length === 0 || args.length === 1;\n }\n}\n"]}
1
+ {"version":3,"file":"ExpressionFunctionBnode.js","sourceRoot":"","sources":["ExpressionFunctionBnode.ts"],"names":[],"mappings":";;;AAAA,yEAAwE;AACxE,+DAAmF;AAEnF,qEAAuE;AACvE,qFAK8C;AAE9C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AED,MAAM,KAAK,GAAG,IAAI,4CAAuB,CAAC,QAAQ,IAAI,SAAS,uBAAuB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;gBACzG,OAAO,IAAI,sCAAS,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAEe,UAAU,CAAC,IAAkB;QAC3C,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAChD,CAAC;;AA3CH,0DA4CC","sourcesContent":["import { ExpressionFunctionBase } from '@comunica/bus-function-factory';\nimport { KeysExpressionEvaluator, KeysInitQuery } from '@comunica/context-entries';\nimport type { Expression, IEvalContext, TermExpression } from '@comunica/types';\nimport { BlankNodeBindingsScoped } from '@comunica/utils-data-factory';\nimport {\n BlankNode,\n declare,\n InvalidArgumentTypes,\n SparqlOperator,\n} from '@comunica/utils-expression-evaluator';\n\n/**\n * https://www.w3.org/TR/sparql11-query/#func-bnode\n * id has to be distinct over all id's in dataset\n */\nexport class ExpressionFunctionBnode extends ExpressionFunctionBase {\n /**\n * This OverloadTree with the constant function will handle both type promotion and subtype-substitution\n */\n private static readonly bnodeTree = declare(SparqlOperator.BNODE).onString1(() => arg => arg).collect();\n\n /**\n * A counter that keeps track blank node generated through BNODE() SPARQL\n * expressions.\n */\n private static bnodeCounter = 0;\n\n public constructor() {\n super({\n arity: Number.POSITIVE_INFINITY,\n operator: SparqlOperator.BNODE,\n apply: async(context: IEvalContext): Promise<TermExpression> => {\n const { args, mapping, exprEval } = context;\n const input = args.length === 1 ?\n await exprEval.evaluatorExpressionEvaluation(args[0], mapping) :\n undefined;\n\n let strInput: string | undefined;\n if (input) {\n const operation = ExpressionFunctionBnode.bnodeTree.search(\n [ input ],\n exprEval.context.getSafe(KeysExpressionEvaluator.superTypeProvider),\n exprEval.context.getSafe(KeysInitQuery.functionArgumentsCache),\n );\n if (!operation) {\n throw new InvalidArgumentTypes(args, SparqlOperator.BNODE);\n }\n strInput = operation(exprEval)([ input ]).str();\n }\n\n const bnode = new BlankNodeBindingsScoped(strInput ?? `BNODE_${ExpressionFunctionBnode.bnodeCounter++}`);\n return new BlankNode(bnode);\n },\n });\n }\n\n public override checkArity(args: Expression[]): boolean {\n return args.length === 0 || args.length === 1;\n }\n}\n"]}
package/lib/index.d.ts CHANGED
File without changes
package/lib/index.js CHANGED
File without changes
package/lib/index.js.map CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comunica/actor-function-factory-expression-bnode",
3
- "version": "4.5.0",
3
+ "version": "5.0.2",
4
4
  "description": "A expression-bnode function-factory actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
@@ -37,11 +37,11 @@
37
37
  "build:components": "componentsjs-generator"
38
38
  },
39
39
  "dependencies": {
40
- "@comunica/bus-function-factory": "^4.5.0",
41
- "@comunica/context-entries": "^4.5.0",
42
- "@comunica/types": "^4.5.0",
43
- "@comunica/utils-data-factory": "^4.0.1",
44
- "@comunica/utils-expression-evaluator": "^4.5.0"
40
+ "@comunica/bus-function-factory": "^5.0.2",
41
+ "@comunica/context-entries": "^5.0.2",
42
+ "@comunica/types": "^5.0.0",
43
+ "@comunica/utils-data-factory": "^5.0.0",
44
+ "@comunica/utils-expression-evaluator": "^5.0.2"
45
45
  },
46
- "gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
46
+ "gitHead": "3b29f914010fd2fc56682a0ceff962ef6ff24f32"
47
47
  }