@enervance/insight-cim-model 0.0.54 → 0.0.57

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.
Files changed (32) hide show
  1. package/dist/config/westnetz-neplan/neplan-load.config.js +1 -0
  2. package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
  3. package/dist/constants/cim-class-definition.js +2 -0
  4. package/dist/constants/cim-class-definition.js.map +1 -1
  5. package/dist/constants/cim-class-names.d.ts +1 -0
  6. package/dist/constants/cim-class-names.js +1 -0
  7. package/dist/constants/cim-class-names.js.map +1 -1
  8. package/dist/converter/integral7/converter-i7.d.ts +5 -2
  9. package/dist/converter/integral7/converter-i7.js +377 -397
  10. package/dist/converter/integral7/converter-i7.js.map +1 -1
  11. package/dist/converter/integral7/model/dl-utils/util-functions.d.ts +4 -0
  12. package/dist/converter/integral7/model/dl-utils/util-functions.js +66 -0
  13. package/dist/converter/integral7/model/dl-utils/util-functions.js.map +1 -1
  14. package/dist/converter/integral7/model/interfaces.d.ts +5 -0
  15. package/dist/converter/integral7/model/interfaces.js.map +1 -1
  16. package/dist/converter/integral7/sql/integral.sql.d.ts +87 -1
  17. package/dist/converter/integral7/sql/integral.sql.js +185 -86
  18. package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
  19. package/dist/converter/integral7/utils.js +5 -2
  20. package/dist/converter/integral7/utils.js.map +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +2 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/model/core/IdentifiedObject.js +1 -1
  25. package/dist/model/core/IdentifiedObject.js.map +1 -1
  26. package/dist/model/model/Model.d.ts +6 -1
  27. package/dist/model/model/Model.js +12 -0
  28. package/dist/model/model/Model.js.map +1 -1
  29. package/dist/model/model-operations/ModelOperationDescription.d.ts +5 -1
  30. package/dist/model/model-operations/ModelOperationDescription.js +36 -1
  31. package/dist/model/model-operations/ModelOperationDescription.js.map +1 -1
  32. package/package.json +1 -1
@@ -6,8 +6,43 @@ class ModelOperationDescription extends IdentifiedObject_1.IdentifiedObject {
6
6
  constructor(uuid, name, shortName, description, baseIRI) {
7
7
  super(uuid, name, shortName, description, baseIRI);
8
8
  this.modelOperation = new Set();
9
- this.operationDatasetArgDescription = new Set();
9
+ }
10
+ static getQuerySPARQL(graphURI, filteredUUID) {
11
+ if (graphURI.length > 0) {
12
+ return ModelOperationDescription.sparqlQuery.replace('<http://default/>', graphURI);
13
+ }
14
+ return ModelOperationDescription.sparqlQuery;
15
+ }
16
+ static resolveClassFusekiJSON(data, cimModel) {
17
+ var _a, _b;
18
+ return (_b = (_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.bindings) === null || _b === void 0 ? void 0 : _b.map(value => {
19
+ const modelOperationDescription = new ModelOperationDescription();
20
+ modelOperationDescription.resolveAttributesFusekiJSON(value);
21
+ cimModel.addModelOperationDescription(modelOperationDescription);
22
+ return modelOperationDescription;
23
+ });
24
+ }
25
+ addModelOperation(modelOperation) {
26
+ this.modelOperation.add(modelOperation);
10
27
  }
11
28
  }
12
29
  exports.ModelOperationDescription = ModelOperationDescription;
30
+ ModelOperationDescription.sparqlQuery = `
31
+ PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
32
+ PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
33
+ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
34
+ PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
35
+ PREFIX afn: <http://jena.apache.org/ARQ/function#>
36
+
37
+ SELECT (strafter(strafter(str(?MRID), '#'), '_') AS ?uuid)
38
+ (CONCAT(STRBEFORE(STR(?MRID), '#_'), '#_') AS ?baseIRI)
39
+ ?name ?shortName ?description
40
+ WHERE {
41
+ GRAPH <http://default/>{
42
+ ?MRID rdf:type cim:ModelOperationDescription .
43
+ OPTIONAL {?MRID cim:IdentifiedObject.name ?name .}
44
+ OPTIONAL {?MRID entsoe:IdentifiedObject.shortName ?shortName .}
45
+ OPTIONAL {?MRID cim:IdentifiedObject.description ?description .}
46
+ }
47
+ }`;
13
48
  //# sourceMappingURL=ModelOperationDescription.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModelOperationDescription.js","sourceRoot":"","sources":["../../../src/model/model-operations/ModelOperationDescription.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAG5D,MAAa,yBAA0B,SAAQ,mCAAgB;IAM7D,YAAY,IAAa,EAAE,IAAa,EAAE,SAAkB,EAAE,WAAoB,EAAE,OAAgB;QAClG,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QALrD,mBAAc,GAAwB,IAAI,GAAG,EAAkB,CAAC;QAEhE,mCAA8B,GAAmC,IAAI,GAAG,EAA6B,CAAC;IAItG,CAAC;CACF;AATD,8DASC"}
1
+ {"version":3,"file":"ModelOperationDescription.js","sourceRoot":"","sources":["../../../src/model/model-operations/ModelOperationDescription.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAI5D,MAAa,yBAA0B,SAAQ,mCAAgB;IA4B7D,YAAY,IAAa,EAAE,IAAa,EAAE,SAAkB,EAAE,WAAoB,EAAE,OAAgB;QAClG,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QANrD,mBAAc,GAAwB,IAAI,GAAG,EAAkB,CAAC;IAOhE,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,QAAgB,EAAE,YAAsB;QACnE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,OAAO,yBAAyB,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;SACrF;QACD,OAAO,yBAAyB,CAAC,WAAW,CAAC;IAC/C,CAAC;IAGM,MAAM,CAAC,sBAAsB,CAAC,IAAS,EAAE,QAAiB;;QAC/D,mBAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,QAAQ,0CAAE,GAAG,CAAC,KAAK,CAAC,EAAE;YAC1C,MAAM,yBAAyB,GAAG,IAAI,yBAAyB,EAAE,CAAC;YAClE,yBAAyB,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;YAC7D,QAAQ,CAAC,4BAA4B,CAAC,yBAAyB,CAAC,CAAC;YACjE,OAAO,yBAAyB,CAAC;QACnC,CAAC,EAAE;IACL,CAAC;IAMM,iBAAiB,CAAC,cAA8B;QACrD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;;AAvDH,8DAwDC;AArDe,qCAAW,GAAW;;;;;;;;;;;;;;;;;kBAiBpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enervance/insight-cim-model",
3
- "version": "0.0.54",
3
+ "version": "0.0.57",
4
4
  "description": "CIM data model",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",