@enervance/insight-cim-model 0.0.1 → 0.0.3
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/config/westnetz-neplan/neplan-load.config.js +0 -1
- package/dist/config/westnetz-neplan/neplan-load.config.js.map +1 -1
- package/dist/constants/cim-class-definition.js +6 -0
- package/dist/constants/cim-class-definition.js.map +1 -1
- package/dist/constants/cim-class-names.d.ts +6 -0
- package/dist/constants/cim-class-names.js +6 -0
- package/dist/constants/cim-class-names.js.map +1 -1
- package/dist/converter/integral7/ConverterIntegral7.d.ts +17 -4
- package/dist/converter/integral7/ConverterIntegral7.js +530 -39
- package/dist/converter/integral7/ConverterIntegral7.js.map +1 -1
- package/dist/converter/integral7/config/db-config.d.ts +3 -1
- package/dist/converter/integral7/model/integral/Hgueleitung.d.ts +9 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.js +3 -0
- package/dist/converter/integral7/model/integral/Hgueleitung.js.map +1 -0
- package/dist/converter/integral7/model/integral/Kopfstation.d.ts +31 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js +3 -0
- package/dist/converter/integral7/model/integral/Kopfstation.js.map +1 -0
- package/dist/converter/integral7/model/interfaces.d.ts +8 -0
- package/dist/converter/integral7/sql/integral.sql.d.ts +8 -0
- package/dist/converter/integral7/sql/integral.sql.js +22 -1
- package/dist/converter/integral7/sql/integral.sql.js.map +1 -1
- package/dist/converter/integral7/utils.d.ts +4 -1
- package/dist/converter/integral7/utils.js +26 -8
- package/dist/converter/integral7/utils.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-contingency-analysis.js +22 -7
- package/dist/etl-neplan/etl-neplan-contingency-analysis.js.map +1 -1
- package/dist/etl-neplan/etl-neplan-feederline.d.ts +3 -1
- package/dist/etl-neplan/etl-neplan-feederline.js +73 -15
- package/dist/etl-neplan/etl-neplan-feederline.js.map +1 -1
- package/dist/etl-neplan/etl-neplan.js.map +1 -1
- package/dist/etl-neplan/neplan-contingency-analysis.d.ts +14 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js +337 -0
- package/dist/etl-neplan/neplan-contingency-analysis.js.map +1 -0
- package/dist/graph/Types.d.ts +5 -0
- package/dist/graph/Types.js +10 -0
- package/dist/graph/Types.js.map +1 -0
- package/dist/graph/connections/connection.d.ts +11 -0
- package/dist/graph/connections/connection.js +17 -0
- package/dist/graph/connections/connection.js.map +1 -0
- package/dist/graph/edges/edge.d.ts +8 -0
- package/dist/graph/edges/edge.js +16 -0
- package/dist/graph/edges/edge.js.map +1 -0
- package/dist/graph/graph-interfaces.d.ts +15 -0
- package/dist/graph/graph-interfaces.js +3 -0
- package/dist/graph/graph-interfaces.js.map +1 -0
- package/dist/graph/graph-util.d.ts +13 -0
- package/dist/graph/graph-util.js +114 -0
- package/dist/graph/graph-util.js.map +1 -0
- package/dist/graph/graph.d.ts +15 -0
- package/dist/graph/graph.js +75 -0
- package/dist/graph/graph.js.map +1 -0
- package/dist/graph/nodes/node.d.ts +14 -0
- package/dist/graph/nodes/node.js +28 -0
- package/dist/graph/nodes/node.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/model/core/ACDCTerminal.js +2 -2
- package/dist/model/core/ACDCTerminal.js.map +1 -1
- package/dist/model/core/ConnectivityNode.js +3 -2
- package/dist/model/core/ConnectivityNode.js.map +1 -1
- package/dist/model/core/PSRType.d.ts +0 -1
- package/dist/model/core/PSRType.js +3 -6
- package/dist/model/core/PSRType.js.map +1 -1
- package/dist/model/core/PowerSystemResource.js +3 -8
- package/dist/model/core/PowerSystemResource.js.map +1 -1
- package/dist/model/core/Substation.d.ts +3 -0
- package/dist/model/core/Substation.js +4 -0
- package/dist/model/core/Substation.js.map +1 -1
- package/dist/model/core/Terminal.d.ts +2 -0
- package/dist/model/core/Terminal.js +2 -2
- package/dist/model/core/Terminal.js.map +1 -1
- package/dist/model/core/VoltageLevel.js +0 -1
- package/dist/model/core/VoltageLevel.js.map +1 -1
- package/dist/model/dc/ACDCConverter.d.ts +23 -0
- package/dist/model/dc/ACDCConverter.js +33 -0
- package/dist/model/dc/ACDCConverter.js.map +1 -0
- package/dist/model/dc/ACDCConverterDCTerminal.d.ts +13 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js +54 -0
- package/dist/model/dc/ACDCConverterDCTerminal.js.map +1 -0
- package/dist/model/dc/CsConverter.d.ts +21 -0
- package/dist/model/dc/CsConverter.js +43 -0
- package/dist/model/dc/CsConverter.js.map +1 -0
- package/dist/model/dc/CsOperatingModeKind.d.ts +4 -0
- package/dist/model/dc/CsOperatingModeKind.js +9 -0
- package/dist/model/dc/CsOperatingModeKind.js.map +1 -0
- package/dist/model/dc/CsPpccControlKind.d.ts +5 -0
- package/dist/model/dc/CsPpccControlKind.js +10 -0
- package/dist/model/dc/CsPpccControlKind.js.map +1 -0
- package/dist/model/dc/DCBaseTerminal.d.ts +8 -0
- package/dist/model/dc/DCBaseTerminal.js +30 -0
- package/dist/model/dc/DCBaseTerminal.js.map +1 -0
- package/dist/model/dc/DCConductingEquipment.d.ts +5 -0
- package/dist/model/dc/DCConductingEquipment.js +12 -0
- package/dist/model/dc/DCConductingEquipment.js.map +1 -0
- package/dist/model/dc/DCConverterOperatingModeKind.d.ts +5 -0
- package/dist/model/dc/DCConverterOperatingModeKind.js +10 -0
- package/dist/model/dc/DCConverterOperatingModeKind.js.map +1 -0
- package/dist/model/dc/DCConverterUnit.d.ts +14 -0
- package/dist/model/dc/DCConverterUnit.js +54 -0
- package/dist/model/dc/DCConverterUnit.js.map +1 -0
- package/dist/model/dc/DCEquipmentContainer.d.ts +5 -0
- package/dist/model/dc/DCEquipmentContainer.js +12 -0
- package/dist/model/dc/DCEquipmentContainer.js.map +1 -0
- package/dist/model/dc/DCLine.d.ts +11 -0
- package/dist/model/dc/DCLine.js +48 -0
- package/dist/model/dc/DCLine.js.map +1 -0
- package/dist/model/dc/DCLineSegment.d.ts +13 -0
- package/dist/model/dc/DCLineSegment.js +69 -0
- package/dist/model/dc/DCLineSegment.js.map +1 -0
- package/dist/model/dc/DCNode.d.ts +12 -0
- package/dist/model/dc/DCNode.js +41 -0
- package/dist/model/dc/DCNode.js.map +1 -0
- package/dist/model/dc/DCPolarityKind.d.ts +5 -0
- package/dist/model/dc/DCPolarityKind.js +10 -0
- package/dist/model/dc/DCPolarityKind.js.map +1 -0
- package/dist/model/dc/DCTerminal.d.ts +10 -0
- package/dist/model/dc/DCTerminal.js +38 -0
- package/dist/model/dc/DCTerminal.js.map +1 -0
- package/dist/model/dc/VsConverter.d.ts +18 -0
- package/dist/model/dc/VsConverter.js +33 -0
- package/dist/model/dc/VsConverter.js.map +1 -0
- package/dist/model/dc/VsPpccControlKind.d.ts +7 -0
- package/dist/model/dc/VsPpccControlKind.js +12 -0
- package/dist/model/dc/VsPpccControlKind.js.map +1 -0
- package/dist/model/dc/VsQpccControlKind.d.ts +5 -0
- package/dist/model/dc/VsQpccControlKind.js +10 -0
- package/dist/model/dc/VsQpccControlKind.js.map +1 -0
- package/dist/model/domain/UnitMultiplier.js.map +1 -1
- package/dist/model/extensions/amprion/model/AmprionModell.d.ts +25 -0
- package/dist/model/extensions/amprion/model/AmprionModell.js +64 -0
- package/dist/model/extensions/amprion/model/AmprionModell.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.d.ts +34 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.js +134 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProject.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.d.ts +17 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.js +77 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.d.ts +14 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.js +57 -0
- package/dist/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.d.ts +7 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.js +17 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProject.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.d.ts +19 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.js +74 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectPhase.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.d.ts +15 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.js +26 -0
- package/dist/model/extensions/amprion/project/AMPRIONErpProjectStructure.js.map +1 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.d.ts +5 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.js +10 -0
- package/dist/model/extensions/amprion/project/AMPRIONProjectPriorityKind.js.map +1 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.d.ts +9 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js +46 -0
- package/dist/model/extensions/amprion/wires/AMPRIONSeriesCompensator.js.map +1 -0
- package/dist/model/extensions/enervance/operations/EVTerminalAction.js.map +1 -1
- package/dist/model/extensions/neplan-westnetz/assets/WNFacility.js.map +1 -1
- package/dist/model/generation/WindGeneratingUnit.d.ts +5 -0
- package/dist/model/generation/WindGeneratingUnit.js +66 -0
- package/dist/model/generation/WindGeneratingUnit.js.map +1 -1
- package/dist/model/model/Model.d.ts +39 -1
- package/dist/model/model/Model.js +91 -1
- package/dist/model/model/Model.js.map +1 -1
- package/dist/model/wires/ACLineSegment.d.ts +1 -0
- package/dist/model/wires/ACLineSegment.js +15 -2
- package/dist/model/wires/ACLineSegment.js.map +1 -1
- package/dist/model/wires/AsynchronousMachine.d.ts +1 -0
- package/dist/model/wires/AsynchronousMachine.js +37 -1
- package/dist/model/wires/AsynchronousMachine.js.map +1 -1
- package/dist/model/wires/Disconnector.js +1 -1
- package/dist/model/wires/EnergySource.d.ts +2 -0
- package/dist/model/wires/EnergySource.js +28 -2
- package/dist/model/wires/EnergySource.js.map +1 -1
- package/dist/model/wires/SeriesCompensator.d.ts +18 -2
- package/dist/model/wires/SeriesCompensator.js +108 -5
- package/dist/model/wires/SeriesCompensator.js.map +1 -1
- package/dist/util/util-create.js.map +1 -1
- package/dist/util/util-topology.d.ts +2 -2
- package/dist/util/util-topology.js +14 -6
- package/dist/util/util-topology.js.map +1 -1
- package/package.json +1 -1
- package/src/config/westnetz-neplan/neplan-load.config.ts +1 -1
- package/src/constants/cim-class-definition.ts +20 -1
- package/src/constants/cim-class-names.ts +9 -0
- package/src/converter/integral7/ConverterIntegral7.ts +753 -345
- package/src/converter/integral7/config/db-config.ts +3 -2
- package/src/converter/integral7/model/integral/Hgueleitung.ts +12 -0
- package/src/converter/integral7/model/integral/Kopfstation.ts +46 -0
- package/src/converter/integral7/model/interfaces.ts +23 -16
- package/src/converter/integral7/sql/integral.sql.ts +27 -1
- package/src/converter/integral7/utils.ts +43 -11
- package/src/etl-neplan/etl-neplan-contingency-analysis.ts +30 -12
- package/src/etl-neplan/etl-neplan-feederline.ts +100 -17
- package/src/etl-neplan/etl-neplan.ts +1 -0
- package/src/etl-neplan/neplan-contingency-analysis.ts +572 -0
- package/src/graph/Types.ts +7 -0
- package/src/graph/connections/connection.ts +29 -0
- package/src/graph/edges/edge.ts +27 -0
- package/src/graph/graph-interfaces.ts +21 -0
- package/src/graph/graph-util.ts +158 -0
- package/src/graph/graph.ts +84 -0
- package/src/graph/nodes/node.ts +43 -0
- package/src/index.ts +8 -0
- package/src/model/core/ACDCTerminal.ts +2 -2
- package/src/model/core/ConnectivityNode.ts +2 -2
- package/src/model/core/PSRType.ts +3 -6
- package/src/model/core/PowerSystemResource.ts +3 -7
- package/src/model/core/Substation.ts +6 -0
- package/src/model/core/Terminal.ts +15 -6
- package/src/model/core/VoltageLevel.ts +0 -1
- package/src/model/dc/ACDCConverter.ts +66 -0
- package/src/model/dc/ACDCConverterDCTerminal.ts +64 -0
- package/src/model/dc/CsConverter.ts +68 -0
- package/src/model/dc/CsOperatingModeKind.ts +4 -0
- package/src/model/dc/CsPpccControlKind.ts +5 -0
- package/src/model/dc/DCBaseTerminal.ts +30 -0
- package/src/model/dc/DCConductingEquipment.ts +8 -0
- package/src/model/dc/DCConverterOperatingModeKind.ts +6 -0
- package/src/model/dc/DCConverterUnit.ts +60 -0
- package/src/model/dc/DCEquipmentContainer.ts +8 -0
- package/src/model/dc/DCLine.ts +56 -0
- package/src/model/dc/DCLineSegment.ts +81 -0
- package/src/model/dc/DCNode.ts +49 -0
- package/src/model/dc/DCPolarityKind.ts +5 -0
- package/src/model/dc/DCTerminal.ts +45 -0
- package/src/model/dc/VsConverter.ts +48 -0
- package/src/model/dc/VsPpccControlKind.ts +7 -0
- package/src/model/dc/VsQpccControlKind.ts +5 -0
- package/src/model/domain/UnitMultiplier.ts +12 -12
- package/src/model/equivalents/EquivalentBranch.ts +10 -10
- package/src/model/extensions/amprion/model/AmprionModell.ts +92 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProject.ts +174 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectBundle.ts +89 -0
- package/src/model/extensions/amprion/project/AMPRIONConstructionProjectPlan.ts +64 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProject.ts +21 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProjectPhase.ts +89 -0
- package/src/model/extensions/amprion/project/AMPRIONErpProjectStructure.ts +36 -0
- package/src/model/extensions/amprion/project/AMPRIONProjectPriorityKind.ts +5 -0
- package/src/model/extensions/amprion/wires/AMPRIONSeriesCompensator.ts +53 -0
- package/src/model/extensions/enervance/core/EVTerminal.ts +1 -1
- package/src/model/extensions/enervance/operations/EVTerminalAction.ts +0 -1
- package/src/model/extensions/neplan-westnetz/assets/WNFacility.ts +0 -1
- package/src/model/generation/WindGeneratingUnit.ts +73 -0
- package/src/model/model/Model.ts +131 -7
- package/src/model/wires/ACLineSegment.ts +244 -228
- package/src/model/wires/AsynchronousMachine.ts +38 -1
- package/src/model/wires/Disconnector.ts +1 -1
- package/src/model/wires/EnergySource.ts +256 -222
- package/src/model/wires/SeriesCompensator.ts +145 -19
- package/src/util/util-create.ts +2 -0
- package/src/util/util-topology.ts +18 -7
- package/test/apache-jena-fuseki-interface/{apache-jena-fuseki-neplan.tests.spec.ts → apache-jena-fuseki-neplan-1.tests.sp-ec.ts} +0 -26
- package/test/apache-jena-fuseki-interface/apache-jena-fuseki-neplan-2.tests.spec.ts +255 -0
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_EQ_V1.xml +20867 -0
- package/test/apache-jena-fuseki-interface/data/xml/finnentrop/Finnentrop_Rootnet_Area 1_SSH_V1.xml +3784 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_EQ_V1.xml +42546 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SSH_V1.xml +10101 -0
- package/test/apache-jena-fuseki-interface/data/xml/ruhrau-katharina/Ruhrau_Katharina_Rootnet_Area 1_SV_V1.xml +6229 -0
- package/test/integral7-converter/integral7-converter.tests.spec.ts +12 -3
- package/test/power-system-data-model-converter/power-system-data-model-converter.tests.spec.ts +1 -1
- package/test/apache-jena-fuseki-interface/data/apache-jena-fuseki-3.12.0/run/system/tdb.lock +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { getValue, parseCsvLineIntoArray } from '../../../../util/utils';
|
|
2
|
+
import { IdentifiedObject } from '../../../core/IdentifiedObject';
|
|
3
|
+
import { AMPRIONErpProject } from './AMPRIONErpProject';
|
|
4
|
+
import { Model } from '../../../model/Model';
|
|
5
|
+
import { AmprionModel } from '../model/AmprionModell';
|
|
6
|
+
import { AMPRIONConstructionProjectBundle } from './AMPRIONConstructionProjectBundle';
|
|
7
|
+
import { AMPRIONConstructionProjectPlan } from './AMPRIONConstructionProjectPlan';
|
|
8
|
+
|
|
9
|
+
export class AMPRIONConstructionProject extends AMPRIONErpProject {
|
|
10
|
+
|
|
11
|
+
variationProject: string;
|
|
12
|
+
prospectiveDepartment: string;
|
|
13
|
+
prospectiveAccountableDepartment: string;
|
|
14
|
+
privateLawNegotiationContact: string;
|
|
15
|
+
NEPState: string;
|
|
16
|
+
NEPProject: string;
|
|
17
|
+
investmentApplicationState: string;
|
|
18
|
+
externalParticipants: string;
|
|
19
|
+
externalContact: string;
|
|
20
|
+
ENLAGProject: string;
|
|
21
|
+
billingContact: string;
|
|
22
|
+
BBPIGState: string;
|
|
23
|
+
BBPIGProject: string;
|
|
24
|
+
affectedAssetGroups: string;
|
|
25
|
+
|
|
26
|
+
planCostsWithoutBGK: number;
|
|
27
|
+
planCostsWithBGK: number;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
bundle: AMPRIONConstructionProjectBundle;
|
|
31
|
+
bundleUUID: string;
|
|
32
|
+
|
|
33
|
+
plan: AMPRIONConstructionProjectPlan;
|
|
34
|
+
planUUID: string;
|
|
35
|
+
|
|
36
|
+
regionUUID: string;
|
|
37
|
+
assetUUIDs: string[];
|
|
38
|
+
|
|
39
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
40
|
+
super(uuid, name, shortName, description);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public static resolveClassFusekiJSON(data: any, cimModel: AmprionModel) {
|
|
44
|
+
data.results.bindings.forEach((value: any) => {
|
|
45
|
+
const newClass = new AMPRIONConstructionProject();
|
|
46
|
+
newClass.resolveAttributesFusekiJSON(value);
|
|
47
|
+
cimModel.addConstructionProject(newClass);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public resolveAttributesFusekiJSON(value: any) {
|
|
52
|
+
super.resolveAttributesFusekiJSON(value);
|
|
53
|
+
|
|
54
|
+
this.variationProject = getValue(value, 'variationProject');
|
|
55
|
+
this.prospectiveDepartment = getValue(value, 'prospectiveDepartment');
|
|
56
|
+
this.prospectiveAccountableDepartment = getValue(value, 'prospectiveAccountableDepartment');
|
|
57
|
+
this.privateLawNegotiationContact = getValue(value, 'privateLawNegotiationContact');
|
|
58
|
+
this.NEPState = getValue(value, 'NEPState');
|
|
59
|
+
this.NEPProject = getValue(value, 'NEPProject');
|
|
60
|
+
this.investmentApplicationState = getValue(value, 'investmentApplicationState');
|
|
61
|
+
this.externalParticipants = getValue(value, 'externalParticipants');
|
|
62
|
+
this.externalContact = getValue(value, 'externalContact');
|
|
63
|
+
this.ENLAGProject = getValue(value, 'ENLAGProject');
|
|
64
|
+
this.billingContact = getValue(value, 'billingContact');
|
|
65
|
+
this.BBPIGState = getValue(value, 'BBPIGState');
|
|
66
|
+
this.BBPIGProject = getValue(value, 'BBPIGProject');
|
|
67
|
+
this.affectedAssetGroups = getValue(value, 'affectedAssetGroups');
|
|
68
|
+
|
|
69
|
+
this.planCostsWithoutBGK = +getValue(value, 'planCostsWithoutBGK');
|
|
70
|
+
this.planCostsWithBGK = +getValue(value, 'planCostsWithBGK');
|
|
71
|
+
|
|
72
|
+
this.bundleUUID = getValue(value, 'bundleUUID');
|
|
73
|
+
this.planUUID = getValue(value, 'planUUID');
|
|
74
|
+
this.regionUUID = getValue(value, 'regionUUID');
|
|
75
|
+
this.assetUUIDs = parseCsvLineIntoArray(getValue(value, 'assetUUIDs'), ',');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
resolveParsedAssociations(cimModel: AmprionModel) {
|
|
79
|
+
super.resolveParsedAssociations(cimModel);
|
|
80
|
+
this.bundle = cimModel.getErpProjectStructure(this.bundleUUID) as AMPRIONConstructionProjectBundle;
|
|
81
|
+
this.bundle?.addConstructionProject(this);
|
|
82
|
+
|
|
83
|
+
//baseVoltageUUID
|
|
84
|
+
this.plan = cimModel.getErpProjectStructure(this.planUUID) as AMPRIONConstructionProjectPlan;
|
|
85
|
+
this.plan?.addConstructionProject(this);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public static getQuerySPARQL(graphURI: string): string {
|
|
89
|
+
if (graphURI.length > 0) {
|
|
90
|
+
return AMPRIONConstructionProject.sparqlQuery.replace('<http://default/>', graphURI);
|
|
91
|
+
}
|
|
92
|
+
return AMPRIONConstructionProject.sparqlQuery;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public static sparqlQuery: string = `
|
|
96
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
97
|
+
PREFIX enervance: <http://enervance.com/CIM/Extensions#>
|
|
98
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
99
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
100
|
+
PREFIX amp: <http://amprion.net/CIM/Extensions#>
|
|
101
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
102
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
103
|
+
|
|
104
|
+
SELECT (strafter(strafter(str(?MRID), "#"), "_") AS ?uuid)
|
|
105
|
+
?name ?shortName ?description
|
|
106
|
+
?applicant ?projectGroup
|
|
107
|
+
|
|
108
|
+
(STRAFTER(STRAFTER(str(?prio), '#'), '.') AS ?priority)
|
|
109
|
+
?accountablePerson ?accountableDepartment ?number
|
|
110
|
+
?state ?projectPhase
|
|
111
|
+
|
|
112
|
+
?variationProject ?prospectiveDepartment ?prospectiveAccountableDepartment
|
|
113
|
+
?NEPState ?NEPProject ?investmentApplicationState ?externalParticipants ?externalContact
|
|
114
|
+
?ENLAGProject ?billingContact ?BBPIGState ?BBPIGProject
|
|
115
|
+
?affectedAssetGroups ?planCostsWithoutBGK ?planCostsWithBGK
|
|
116
|
+
(STRAFTER(str(?bUUID), '#_') AS ?bundleUUID)
|
|
117
|
+
(STRAFTER(str(?pUUID), '#_') AS ?planUUID)
|
|
118
|
+
(STRAFTER(str(?rUUID), '#_') AS ?regionUUID)
|
|
119
|
+
(group_concat(STRAFTER(str(?aUUIDs), '#_');separator=',') as ?assetUUIDs)
|
|
120
|
+
WHERE {
|
|
121
|
+
GRAPH <http://default/>{
|
|
122
|
+
|
|
123
|
+
?MRID rdf:type amp:AMPRIONConstructionProject .
|
|
124
|
+
OPTIONAL{?MRID cim:IdentifiedObject.name ?name .}
|
|
125
|
+
OPTIONAL{?MRID entsoe:IdentifiedObject.shortName ?shortName .}
|
|
126
|
+
OPTIONAL{?MRID cim:IdentifiedObject.description ?description .}
|
|
127
|
+
|
|
128
|
+
#AMPRIONErpProjectStructure
|
|
129
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.priority ?prio .}
|
|
130
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.accountablePerson ?accountablePerson .}
|
|
131
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.accountableDepartment ?accountableDepartment .}
|
|
132
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.number ?number .}
|
|
133
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.state ?state .}
|
|
134
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.projectPhase ?projectPhase .}
|
|
135
|
+
|
|
136
|
+
#AMPRIONErpProject
|
|
137
|
+
OPTIONAL{?MRID amp:AMPRIONErpProject.applicant ?applicant .}
|
|
138
|
+
OPTIONAL{?MRID amp:AMPRIONErpProject.projectGroup ?projectGroup .}
|
|
139
|
+
|
|
140
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.variationProject ?variationProject .}
|
|
141
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.prospectiveDepartment ?prospectiveDepartment .}
|
|
142
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.prospectiveAccountableDepartment ?prospectiveAccountableDepartment .}
|
|
143
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.privateLawNegotiationContact ?privateLawNegotiationContact .}
|
|
144
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.NEPState ?NEPState .}
|
|
145
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.NEPProject ?NEPProject .}
|
|
146
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.investmentApplicationState ?investmentApplicationState .}
|
|
147
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.externalParticipants ?externalParticipants .}
|
|
148
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.externalContact ?externalContact .}
|
|
149
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.ENLAGProject ?ENLAGProject .}
|
|
150
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.billingContact ?billingContact .}
|
|
151
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.BBPIGState ?BBPIGState .}
|
|
152
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.BBPIGProject ?BBPIGProject .}
|
|
153
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.affectedAssetGroups ?affectedAssetGroups .}
|
|
154
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.planCostsWithoutBGK ?planCostsWithoutBGK .}
|
|
155
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.planCostsWithBGK ?planCostsWithBGK .}
|
|
156
|
+
|
|
157
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.Bundle ?bUUID .}
|
|
158
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.Plan ?pUUID .}
|
|
159
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.Region ?rUUID .}
|
|
160
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProject.Assets ?aUUIDs .}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
GROUP BY ?MRID ?name ?shortName ?description
|
|
164
|
+
?applicant ?projectGroup
|
|
165
|
+
?accountablePerson ?accountableDepartment ?number
|
|
166
|
+
?state ?projectPhase ?prio
|
|
167
|
+
?variationProject ?prospectiveDepartment ?prospectiveAccountableDepartment
|
|
168
|
+
?NEPState ?NEPProject ?investmentApplicationState ?externalParticipants ?externalContact
|
|
169
|
+
?ENLAGProject ?billingContact ?BBPIGState ?BBPIGProject
|
|
170
|
+
?affectedAssetGroups ?planCostsWithoutBGK ?planCostsWithBGK
|
|
171
|
+
?bUUID ?pUUID ?rUUID
|
|
172
|
+
`;
|
|
173
|
+
|
|
174
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AMPRIONErpProjectStructure } from './AMPRIONErpProjectStructure';
|
|
2
|
+
import { AmprionModel } from '../model/AmprionModell';
|
|
3
|
+
import { getValue } from '../../../../util/utils';
|
|
4
|
+
import { AMPRIONConstructionProjectPlan } from './AMPRIONConstructionProjectPlan';
|
|
5
|
+
import { AMPRIONConstructionProject } from './AMPRIONConstructionProject';
|
|
6
|
+
|
|
7
|
+
export class AMPRIONConstructionProjectBundle extends AMPRIONErpProjectStructure {
|
|
8
|
+
|
|
9
|
+
externalAuthority: string;
|
|
10
|
+
|
|
11
|
+
plan: AMPRIONConstructionProjectPlan;
|
|
12
|
+
planUUID: string;
|
|
13
|
+
|
|
14
|
+
constructionProjects: Map<string,AMPRIONConstructionProject> = new Map();
|
|
15
|
+
|
|
16
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
17
|
+
super(uuid, name, shortName, description);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
addConstructionProject(project: AMPRIONConstructionProject) {
|
|
21
|
+
this.constructionProjects.set(project.getUUID(), project);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
public static resolveClassFusekiJSON(data: any, cimModel: AmprionModel) {
|
|
26
|
+
data.results.bindings.forEach((value: any) => {
|
|
27
|
+
const newClass = new AMPRIONConstructionProjectBundle();
|
|
28
|
+
newClass.resolveAttributesFusekiJSON(value);
|
|
29
|
+
cimModel.addConstructionProjectBundle(newClass);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public resolveAttributesFusekiJSON(value: any) {
|
|
34
|
+
super.resolveAttributesFusekiJSON(value);
|
|
35
|
+
this.externalAuthority = getValue(value, 'externalAuthority');
|
|
36
|
+
this.planUUID = getValue(value, 'planUUID');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public resolveParsedAssociations(cimModel: AmprionModel) {
|
|
40
|
+
super.resolveParsedAssociations(cimModel);
|
|
41
|
+
this.plan = cimModel.getErpProjectStructure(this.planUUID) as AMPRIONConstructionProjectPlan;
|
|
42
|
+
this.plan?.addBundle(this);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static getQuerySPARQL(graphURI: string): string {
|
|
46
|
+
if (graphURI.length > 0) {
|
|
47
|
+
return AMPRIONConstructionProjectBundle.sparqlQuery.replace('<http://default/>', graphURI);
|
|
48
|
+
}
|
|
49
|
+
return AMPRIONConstructionProjectBundle.sparqlQuery;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public static sparqlQuery: string = `
|
|
53
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
54
|
+
PREFIX amp: <http://amprion.net/CIM/Extensions#>
|
|
55
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
56
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
57
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
58
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
59
|
+
|
|
60
|
+
SELECT (strafter(strafter(str(?MRID), "#"), "_") AS ?uuid)
|
|
61
|
+
?name ?shortName ?description
|
|
62
|
+
(STRAFTER(STRAFTER(str(?prio), '#'), '.') AS ?priority)
|
|
63
|
+
?accountablePerson ?accountableDepartment ?number
|
|
64
|
+
?state ?projectPhase
|
|
65
|
+
?externalAuthority
|
|
66
|
+
(STRAFTER(str(?pUUID), '#_') AS ?planUUID)
|
|
67
|
+
|
|
68
|
+
WHERE {
|
|
69
|
+
GRAPH <http://default/> {
|
|
70
|
+
?MRID rdf:type amp:AMPRIONConstructionProjectBundle .
|
|
71
|
+
OPTIONAL{?MRID cim:IdentifiedObject.name ?name .}
|
|
72
|
+
OPTIONAL{?MRID entsoe:IdentifiedObject.shortName ?shortName .}
|
|
73
|
+
OPTIONAL{?MRID cim:IdentifiedObject.description ?description .}
|
|
74
|
+
|
|
75
|
+
#AMPRIONErpProjectStructure
|
|
76
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.priority ?prio .}
|
|
77
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.accountablePerson ?accountablePerson .}
|
|
78
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.accountableDepartment ?accountableDepartment .}
|
|
79
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.number ?number .}
|
|
80
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.state ?state .}
|
|
81
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.projectPhase ?projectPhase .}
|
|
82
|
+
|
|
83
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProjectBundle.externalAuthority ?externalAuthority .}
|
|
84
|
+
|
|
85
|
+
OPTIONAL{?MRID amp:AMPRIONConstructionProjectBundle.Plan ?pUUID .}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`
|
|
89
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AMPRIONErpProjectStructure } from './AMPRIONErpProjectStructure';
|
|
2
|
+
import { AmprionModel } from '../model/AmprionModell';
|
|
3
|
+
import { AMPRIONConstructionProjectBundle } from './AMPRIONConstructionProjectBundle';
|
|
4
|
+
import { AMPRIONConstructionProject } from './AMPRIONConstructionProject';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class AMPRIONConstructionProjectPlan extends AMPRIONErpProjectStructure {
|
|
8
|
+
|
|
9
|
+
bundles: Map<string,AMPRIONConstructionProjectBundle> = new Map();
|
|
10
|
+
constructionProjects: Map<string,AMPRIONConstructionProject> = new Map();
|
|
11
|
+
|
|
12
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
13
|
+
super(uuid, name, shortName, description);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
addBundle(bundle: AMPRIONConstructionProjectBundle) {
|
|
17
|
+
this.bundles.set(bundle.getUUID(), bundle);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
addConstructionProject(project: AMPRIONConstructionProject) {
|
|
21
|
+
this.constructionProjects.set(project.getUUID(), project);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public static resolveClassFusekiJSON(data: any, cimModel: AmprionModel) {
|
|
25
|
+
data?.results?.bindings?.forEach((value: any) => {
|
|
26
|
+
const newClass = new AMPRIONConstructionProjectPlan();
|
|
27
|
+
newClass.resolveAttributesFusekiJSON(value);
|
|
28
|
+
cimModel.addConstructionProjectPlan(newClass);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public static getQuerySPARQL(graphURI: string): string {
|
|
33
|
+
if (graphURI.length > 0) {
|
|
34
|
+
return AMPRIONConstructionProjectPlan.sparqlQuery.replace('<http://default/>', graphURI);
|
|
35
|
+
}
|
|
36
|
+
return AMPRIONConstructionProjectPlan.sparqlQuery;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public static sparqlQuery: string = `
|
|
40
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
41
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
42
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
43
|
+
PREFIX amp: <http://amprion.net/CIM/Extensions#>
|
|
44
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
45
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
46
|
+
|
|
47
|
+
SELECT (STRAFTER(str(?MRID), '#_') AS ?uuid)
|
|
48
|
+
?name ?shortName ?description
|
|
49
|
+
?number
|
|
50
|
+
(STRAFTER(STRAFTER(str(?prio), '#'), '.') AS ?priority)
|
|
51
|
+
|
|
52
|
+
WHERE {
|
|
53
|
+
GRAPH <http://default/> {
|
|
54
|
+
OPTIONAL{?MRID rdf:type amp:AMPRIONConstructionProjectPlan .}
|
|
55
|
+
OPTIONAL{?MRID cim:IdentifiedObject.name ?name .}
|
|
56
|
+
OPTIONAL{?MRID entsoe:IdentifiedObject.shortName ?shortName .}
|
|
57
|
+
OPTIONAL{?MRID cim:IdentifiedObject.description ?description .}
|
|
58
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.number ?number .}
|
|
59
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectStructure.priority ?prio .}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
|
|
64
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
import { getValue } from '../../../../util/utils';
|
|
3
|
+
import { AMPRIONErpProjectStructure } from './AMPRIONErpProjectStructure';
|
|
4
|
+
|
|
5
|
+
export class AMPRIONErpProject extends AMPRIONErpProjectStructure {
|
|
6
|
+
|
|
7
|
+
applicant: string;
|
|
8
|
+
projectGroup: string;
|
|
9
|
+
|
|
10
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
11
|
+
super(uuid, name, shortName, description);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
public resolveAttributesFusekiJSON(value: any) {
|
|
16
|
+
super.resolveAttributesFusekiJSON(value);
|
|
17
|
+
this.applicant = getValue(value, 'applicant');
|
|
18
|
+
this.projectGroup = getValue(value, 'projectGroup');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { IdentifiedObject } from '../../../core/IdentifiedObject';
|
|
2
|
+
import { AMPRIONErpProjectStructure } from './AMPRIONErpProjectStructure';
|
|
3
|
+
import { Model } from '../../../model/Model';
|
|
4
|
+
import { AmprionModel } from '../model/AmprionModell';
|
|
5
|
+
import { getValue } from '../../../../util/utils';
|
|
6
|
+
import { toBoolean } from '../../../../util/datatype-converter';
|
|
7
|
+
|
|
8
|
+
export class AMPRIONErpProjectPhase extends IdentifiedObject {
|
|
9
|
+
|
|
10
|
+
startDate: string;
|
|
11
|
+
endDate: string;
|
|
12
|
+
projectPhaseType: string;
|
|
13
|
+
negotiations: boolean;
|
|
14
|
+
|
|
15
|
+
hexColor: string;
|
|
16
|
+
argbColor: string;
|
|
17
|
+
|
|
18
|
+
project: AMPRIONErpProjectStructure;
|
|
19
|
+
projectUUID: string;
|
|
20
|
+
|
|
21
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
22
|
+
super(uuid, name, shortName, description);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
public static resolveClassFusekiJSON(data: any, cimModel: AmprionModel) {
|
|
27
|
+
data?.results?.bindings?.forEach((value: any) => {
|
|
28
|
+
const newClass = new AMPRIONErpProjectPhase();
|
|
29
|
+
newClass.resolveAttributesFusekiJSON(value);
|
|
30
|
+
cimModel.addErpProjectPhase(newClass);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public resolveAttributesFusekiJSON(value: any) {
|
|
35
|
+
super.resolveAttributesFusekiJSON(value);
|
|
36
|
+
this.startDate = getValue(value, 'startDate');
|
|
37
|
+
this.endDate = getValue(value, 'endDate');
|
|
38
|
+
this.projectPhaseType = getValue(value, 'projectPhaseType');
|
|
39
|
+
this.negotiations = toBoolean(getValue(value, 'negotiations'));
|
|
40
|
+
this.hexColor = getValue(value, 'hexColor');
|
|
41
|
+
this.argbColor = getValue(value, 'argbColor');
|
|
42
|
+
this.projectUUID = getValue(value, 'projectUUID');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public resolveParsedAssociations(cimModel: AmprionModel) {
|
|
46
|
+
super.resolveParsedAssociations(cimModel);
|
|
47
|
+
this.project = cimModel.getErpProjectStructure(this.projectUUID);
|
|
48
|
+
this.project?.addProjectPhase(this);
|
|
49
|
+
}
|
|
50
|
+
public static getQuerySPARQL(graphURI: string): string {
|
|
51
|
+
if (graphURI.length > 0) {
|
|
52
|
+
return AMPRIONErpProjectPhase.sparqlQuery.replace('<http://default/>', graphURI);
|
|
53
|
+
}
|
|
54
|
+
return AMPRIONErpProjectPhase.sparqlQuery;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public static sparqlQuery: string = `
|
|
58
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
59
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
60
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
61
|
+
PREFIX amp: <http://amprion.net/CIM/Extensions#>
|
|
62
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
63
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
64
|
+
|
|
65
|
+
SELECT (STRAFTER(str(?MRID), '#_') AS ?uuid)
|
|
66
|
+
?name ?shortName ?description
|
|
67
|
+
?startDate ?endDate ?projectPhaseType ?negotiations ?hexColor ?argbColor
|
|
68
|
+
(STRAFTER(str(?pUUID), '#_') AS ?projectUUID)
|
|
69
|
+
|
|
70
|
+
WHERE {
|
|
71
|
+
GRAPH <http://default/> {
|
|
72
|
+
OPTIONAL{?MRID rdf:type amp:AMPRIONErpProjectPhase .}
|
|
73
|
+
OPTIONAL{?MRID cim:IdentifiedObject.name ?name .}
|
|
74
|
+
OPTIONAL{?MRID entsoe:IdentifiedObject.shortName ?shortName .}
|
|
75
|
+
OPTIONAL{?MRID cim:IdentifiedObject.description ?description .}
|
|
76
|
+
|
|
77
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.startDate ?startDate .}
|
|
78
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.endDate ?endDate .}
|
|
79
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.projectPhaseType ?projectPhaseType .}
|
|
80
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.negotiations ?negotiations .}
|
|
81
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.hexColor ?hexColor .}
|
|
82
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.argbColor ?argbColor .}
|
|
83
|
+
|
|
84
|
+
OPTIONAL{?MRID amp:AMPRIONErpProjectPhase.Project ?pUUID .}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`
|
|
88
|
+
|
|
89
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IdentifiedObject } from '../../../core/IdentifiedObject';
|
|
2
|
+
import { AMPRIONProjectPriorityKind } from './AMPRIONProjectPriorityKind';
|
|
3
|
+
import { AMPRIONErpProjectPhase } from './AMPRIONErpProjectPhase';
|
|
4
|
+
import { getValue } from '../../../../util/utils';
|
|
5
|
+
|
|
6
|
+
export abstract class AMPRIONErpProjectStructure extends IdentifiedObject {
|
|
7
|
+
|
|
8
|
+
priority: AMPRIONProjectPriorityKind;
|
|
9
|
+
accountablePerson: string;
|
|
10
|
+
accountableDepartment: string;
|
|
11
|
+
number: string;
|
|
12
|
+
state: string;
|
|
13
|
+
projectPhase: string;
|
|
14
|
+
|
|
15
|
+
projectPhases: Map<string, AMPRIONErpProjectPhase> = new Map();
|
|
16
|
+
|
|
17
|
+
protected constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
18
|
+
super(uuid, name, shortName, description);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
addProjectPhase(phase: AMPRIONErpProjectPhase) {
|
|
22
|
+
this.projectPhases.set(phase.getUUID(), phase);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public resolveAttributesFusekiJSON(value: any) {
|
|
26
|
+
super.resolveAttributesFusekiJSON(value);
|
|
27
|
+
this.priority = AMPRIONProjectPriorityKind[getValue(value, 'priority')];
|
|
28
|
+
this.accountablePerson = getValue(value, 'accountablePerson');
|
|
29
|
+
this.accountableDepartment = getValue(value, 'accountableDepartment');
|
|
30
|
+
this.number = getValue(value, 'number');
|
|
31
|
+
this.state = getValue(value, 'state');
|
|
32
|
+
this.projectPhase = getValue(value, 'projectPhase');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import XMLWriter from 'xml-writer';
|
|
2
|
+
import { SeriesCompensator } from '../../../wires/SeriesCompensator';
|
|
3
|
+
import { RDF_XML } from '../../../../constants/rdf-xml';
|
|
4
|
+
import { writeElement, writeElementAttribute } from '../../../../util/utils';
|
|
5
|
+
|
|
6
|
+
export class AMPRIONSeriesCompensator extends SeriesCompensator {
|
|
7
|
+
|
|
8
|
+
nodeNumber: number;
|
|
9
|
+
|
|
10
|
+
constructor(uuid?: string, name?: string, shortName?: string, description?: string) {
|
|
11
|
+
super(uuid, name, shortName, description);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** CIM RDF/XML Serialisierung */
|
|
15
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
16
|
+
const suffixID = this.getSuffixID(profile);
|
|
17
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
18
|
+
|
|
19
|
+
if(profile === RDF_XML.PROFILE_EQ) {
|
|
20
|
+
let defaultValues = '';
|
|
21
|
+
this.checkMandatoryAttributes(profile, defaultValues);
|
|
22
|
+
this.description += defaultValues;
|
|
23
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'SeriesCompensator', RDF_XML.CIM_NS_16);
|
|
24
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
25
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
26
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
27
|
+
xmlWriter.endElement();
|
|
28
|
+
} else if (profile === RDF_XML.PROFILE_AMPI7 && this.checkExportData(RDF_XML.PROFILE_AMPI7)) {
|
|
29
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'SeriesCompensator', RDF_XML.CIM_NS_16);
|
|
30
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
31
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
32
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
33
|
+
xmlWriter.endElement();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
protected toCIMXMLAttributes(xmlWriter: XMLWriter, profile: string) {
|
|
38
|
+
super.toCIMXMLAttributes(xmlWriter, profile);
|
|
39
|
+
if (profile === RDF_XML.PROFILE_AMPI7) {
|
|
40
|
+
writeElement(xmlWriter, `${RDF_XML.CAPE_NS_PREFIX}:SeriesCompensator.NodeNumber`, this.nodeNumber);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Die Methode überprüft, ob für die übergebene ProfilURI
|
|
45
|
+
* relevante Informationen gepflegt sind.
|
|
46
|
+
* @param profilURI URI des Profils. */
|
|
47
|
+
checkExportData(profilURI: string): boolean {
|
|
48
|
+
if (this.nodeNumber) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { GeneratingUnit } from './GeneratingUnit';
|
|
2
2
|
import { WindGenUnitKind } from './WindGenUnitKind';
|
|
3
|
+
import XMLWriter from 'xml-writer';
|
|
4
|
+
import { RDF_XML } from '../../constants/rdf-xml';
|
|
5
|
+
import { writeElementAttribute } from '../../util/utils';
|
|
3
6
|
|
|
4
7
|
export class WindGeneratingUnit extends GeneratingUnit {
|
|
5
8
|
|
|
@@ -8,4 +11,74 @@ export class WindGeneratingUnit extends GeneratingUnit {
|
|
|
8
11
|
constructor(uuid?: string, name?: string, shortName?: string, description?: string){
|
|
9
12
|
super(uuid, name, shortName, description);
|
|
10
13
|
}
|
|
14
|
+
|
|
15
|
+
/** CIM RDF/XML Serialisierung */
|
|
16
|
+
public toCIMXML(xmlWriter: XMLWriter, profile: string) {
|
|
17
|
+
if(profile === RDF_XML.PROFILE_EQ) {
|
|
18
|
+
const suffixID = this.getSuffixID(profile);
|
|
19
|
+
const prefixUUID = this.getPrefixUUID(suffixID);
|
|
20
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, this.constructor.name, RDF_XML.CIM_NS_16);
|
|
21
|
+
writeElementAttribute(xmlWriter, suffixID, `${prefixUUID}${this.mrid}`);
|
|
22
|
+
this.toCIMXMLAttributes(xmlWriter, profile);
|
|
23
|
+
this.toCIMXMLAssociations(xmlWriter, profile);
|
|
24
|
+
xmlWriter.endElement();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
protected toCIMXMLAttributes(xmlWriter: XMLWriter, profile: string) {
|
|
29
|
+
super.toCIMXMLAttributes(xmlWriter, profile);
|
|
30
|
+
if (profile === RDF_XML.PROFILE_EQ) {
|
|
31
|
+
xmlWriter.startElementNS(RDF_XML.CIM_NS_PREFIX, 'WindGeneratingUnit.windGenUnitType', RDF_XML.CIM_NS_16);
|
|
32
|
+
writeElementAttribute(xmlWriter, RDF_XML.RDF_RESRC, `${RDF_XML.CIM_NS_16}WindGenUnitKind.${this.windGenUnitType}`);
|
|
33
|
+
xmlWriter.endElement();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** ------------------ Fuseki Schnittstelle ------------------*/
|
|
38
|
+
public static sparqlQuery : string = `
|
|
39
|
+
PREFIX cim: <http://iec.ch/TC57/2013/CIM-schema-cim16#>
|
|
40
|
+
PREFIX enervance: <http://enervance.com/CIM/Extensions#>
|
|
41
|
+
PREFIX westnetzneplan: <http://westnetzneplan.de/CIM/Extensions#>
|
|
42
|
+
PREFIX entsoe: <http://entsoe.eu/CIM/SchemaExtension/3/1#>
|
|
43
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
44
|
+
PREFIX amp: <http://amprion.net/Extensions#>
|
|
45
|
+
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
|
|
46
|
+
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
|
47
|
+
|
|
48
|
+
SELECT (STRAFTER(str(?MRID), '#_') AS ?uuid)
|
|
49
|
+
(CONCAT(STRBEFORE(str(?MRID), '#_'), '#_') AS ?baseIRI)
|
|
50
|
+
?name ?shortName ?description
|
|
51
|
+
?governorSCD ?initialP ?nominalP ?normalPF
|
|
52
|
+
?maxOperatingP ?minOperatingP
|
|
53
|
+
?startupCost ?variableCost
|
|
54
|
+
?name ?windGenUnitTypeEnum (STRAFTER(STRAFTER(str(?windGenUnitTypeEnum), '#'), '.') AS ?type)
|
|
55
|
+
(strafter(strafter(str(?ecUUID), '#'), '_') AS ?equipmentContainerUUID)
|
|
56
|
+
|
|
57
|
+
WHERE {
|
|
58
|
+
GRAPH <http://default/>{
|
|
59
|
+
?MRID rdf:type cim:WindGeneratingUnit .
|
|
60
|
+
OPTIONAL {?MRID cim:IdentifiedObject.name ?name .}
|
|
61
|
+
OPTIONAL {?MRID entsoe:IdentifiedObject.shortName ?shortName .}
|
|
62
|
+
OPTIONAL {?MRID cim:IdentifiedObject.description ?description .}
|
|
63
|
+
|
|
64
|
+
OPTIONAL{?MRID cim:GeneratingUnit.governorSCD ?governorSCD .}
|
|
65
|
+
OPTIONAL{?MRID cim:GeneratingUnit.initialP ?initialP .}
|
|
66
|
+
OPTIONAL{?MRID cim:GeneratingUnit.nominalP ?nominalP .}
|
|
67
|
+
OPTIONAL{?MRID cim:GeneratingUnit.normalPF ?normalPF .}
|
|
68
|
+
OPTIONAL{?MRID cim:GeneratingUnit.maxOperatingP ?maxOperatingP .}
|
|
69
|
+
OPTIONAL{?MRID cim:GeneratingUnit.minOperatingP ?minOperatingP .}
|
|
70
|
+
OPTIONAL{?MRID cim:GeneratingUnit.startupCost ?startupCost .}
|
|
71
|
+
OPTIONAL{?MRID cim:GeneratingUnit.variableCost ?variableCost .}
|
|
72
|
+
OPTIONAL {?MRID cim:WindGeneratingUnit.windGenUnitType ?windGenUnitTypeEnum .}
|
|
73
|
+
OPTIONAL{?MRID cim:Equipment.EquipmentContainer ?ecUUID .}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`
|
|
77
|
+
/** Implementierung: Klassen in der Hierarchie */
|
|
78
|
+
public static getQuerySPARQL(graphURI: string): string{
|
|
79
|
+
if(graphURI.length > 0){
|
|
80
|
+
return GeneratingUnit.sparqlQuery.replace('<http://default/>', graphURI);
|
|
81
|
+
}
|
|
82
|
+
return GeneratingUnit.sparqlQuery
|
|
83
|
+
}
|
|
11
84
|
}
|