Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfekorb.btc2017-11-10 02:49:54 -0500
committerfekorb.btc2017-11-10 02:49:54 -0500
commit700b2a3949db75dbc50500a7271e3f5aae80f30a (patch)
treea1cf8fd56ca241be767452a008c981958f0101ec
parent045bfd2cdde136e3faee513941a91eeba9c21aa2 (diff)
downloadorg.eclipse.openk-platform.openk-repo-700b2a3949db75dbc50500a7271e3f5aae80f30a.tar.gz
org.eclipse.openk-platform.openk-repo-700b2a3949db75dbc50500a7271e3f5aae80f30a.tar.xz
org.eclipse.openk-platform.openk-repo-700b2a3949db75dbc50500a7271e3f5aae80f30a.zip
CIM-Cache version 1 milestone 5 (interface update "electricity")
-rw-r--r--cim-cache/org.eclipse.openk.common/src/main/java/org/eclipse/openk/common/messaging/messages/InvalidParameterException.java14
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_RequestParameters.java157
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_Responder.java142
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_RequestParameters.java173
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_Responder.java144
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/Topology_2_Rdf_Responder.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/core/src/main/java/org/eclipse/openk/domain/dynamictopology/core/DynamicTopologyDefaults.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipmentTypes_Rest_EndPoint.java73
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipments_Rest_EndPoint.java73
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/Topology_Rest_EndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_QueryParameters.java109
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_View.java111
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_QueryParameters.java131
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_View.java114
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/DynamicTopologyViewUtilities.java292
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/Topology_1_View.java83
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/service/dynamic-topology-service.config56
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/DynamicTopologyService.java165
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/mapper/MapperFactory.java39
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/responder/ResponderFactory.java12
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/serializer/SerializerFactory.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/view/ViewFactory.java12
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementTypesResponder.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementsResponder.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/TopologyResponder.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/importer/Topology_2_Xml_Importer.java15
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Abstract_Cim17v07_StaticTopology2_Mapper.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/GeographicalRegions_Cim17v07_StaticTopology2_Mapper.java28
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/PowerTransformers_Cim17v07_StaticTopology2_Mapper.java24
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper.java42
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Substation_Cim17v07_StaticTopology2_Mapper.java27
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/VoltageLevels_Cim17v07_StaticTopology2_Mapper.java28
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Abstract_StaticTopology2_Cim17v07_Mapper.java94
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.java83
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Elements_StaticTopology2_OpenKonsequenz_Mapper.java191
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/GeographicalRegions_StaticTopology2_Cim17v07_Mapper.java1
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PetersenCoils_StaticTopology2_Cim17v07_Mapper.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PowerTransformers_StaticTopology2_Cim17v07_Mapper.java19
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper.java59
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Substation_StaticTopology2_Cim17v07_Mapper.java106
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/VoltageLevels_StaticTopology2_Cim17v07_Mapper.java20
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/core/src/main/java/org/eclipse/openk/domain/statictopology/core/StaticTopologyDefaults.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/logic/src/main/java/org/eclipse/openk/domain/statictopology/logic/StaticTopologyUtilities.java173
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/service/src/main/java/org/eclipse/openk/domain/statictopology/service/dataexchange/serializer/SerializerFactory.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/service/src/test/java/org/eclipse/openk/domain/statictopology/service/StaticTopologyServiceTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.domain.static-topology/service/static-topology-service.config50
-rw-r--r--cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/MeasurementPoints_Rest_EndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/Measurements_Rest_EndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/SwitchStates_RestEnd_Point.java2
-rw-r--r--cim-cache/org.eclipse.openk.domain.topology-state/service/topology-state-service.config6
-rw-r--r--cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/AbstractServiceAdapterController.java1
-rw-r--r--cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporter.java1
-rw-r--r--cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporterFactory.java1
-rw-r--r--cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractRestImporter.java1
-rw-r--r--cim-cache/org.eclipse.openk.service/infrastructure/src/main/java/org/eclipse/openk/service/infrastructure/dataexchange/rest/AbstractHttpRestEndPoint.java35
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/adapter/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/adapter/dataexchange/mapper/MockUpModelToCimMapper.java113
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/core/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/core/MockUpStaticTopologyDefaults.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/AcLineSegmentsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaseVoltagesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaysRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BreakersRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BusbarSectionsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/DisconnectorsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EarthFaultCompensatorsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergyConsumersRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergySourcesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GeographicalRegionsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundingImpedancesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/JunctionsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LineTypesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LinesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LoadBreakSwitchesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PetersenCoilsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PlantsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PowerTransformersRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubGeographicalRegionsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationTypesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SwitchesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyIdRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/VoltageLevelsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/MockUpStaticTopologyUtilities.java8
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/PowerTransformerFactory.java42
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/referencetopology/ReferenceTopologyFactory.java23
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyService.java52
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AbstractMockUpStaticTopologyResponderTest.java10
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AcLineSegmentsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaseVoltagesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaysIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BreakersIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BusbarSectionsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/DisconnectorsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EarthFaultCompensatorsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergyConsumersIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergySourcesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GeographicalRegionsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundingImpedancesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/IntegrationTestTemplate.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/JunctionsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LineTypesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LinesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LoadBreakSwitchesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyServiceTest.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PetersenCoilsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PlantsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PowerTransformersIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubGeographicalRegionsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationTypesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SwitchesIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/TopologyIntegrationTest.java6
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/VoltageLevelsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/core/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/core/MockUpTopologyStateDefaults.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementPointsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementsRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/SwitchStatesRestEndPoint.java2
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementPointsIntegrationTest.java4
-rw-r--r--cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementsIntegrationTest.java4
121 files changed, 1219 insertions, 2158 deletions
diff --git a/cim-cache/org.eclipse.openk.common/src/main/java/org/eclipse/openk/common/messaging/messages/InvalidParameterException.java b/cim-cache/org.eclipse.openk.common/src/main/java/org/eclipse/openk/common/messaging/messages/InvalidParameterException.java
index f84d8936..bbda6c9f 100644
--- a/cim-cache/org.eclipse.openk.common/src/main/java/org/eclipse/openk/common/messaging/messages/InvalidParameterException.java
+++ b/cim-cache/org.eclipse.openk.common/src/main/java/org/eclipse/openk/common/messaging/messages/InvalidParameterException.java
@@ -7,7 +7,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * http://www.eclipse.org/legal/epl-v10.html
*
* -----------------------------------------------------------------------------
*/
@@ -20,6 +20,7 @@ import org.eclipse.openk.common.string.StringUtilities;
* Wrapper-class for the invalid parameter message.
*
* @author Michael Korta
+ * @author 2017-11-01 Renko Ortgies
*/
public class InvalidParameterException extends AbstractRuntimeException {
@@ -52,6 +53,17 @@ public class InvalidParameterException extends AbstractRuntimeException {
* the name of the object; must not be <code>null</code> or <code>empty</code>
* @param details
* the details to the object; must not be <code>null</code> or <code>empty</code>
+ */
+ public InvalidParameterException(String objectName, String details) {
+
+ this(objectName, details, null);
+ }
+
+ /**
+ * @param objectName
+ * the name of the object; must not be <code>null</code> or <code>empty</code>
+ * @param details
+ * the details to the object; must not be <code>null</code> or <code>empty</code>
* @param cause
* the causing inner exception, can be <code>null</code>
*/
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_RequestParameters.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_RequestParameters.java
deleted file mode 100644
index 4cfa8ef3..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_RequestParameters.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-import org.eclipse.openk.common.dataexchange.cim.message.CimMessageDefaults;
-import org.eclipse.openk.common.dataexchange.cim.message.ICimHeaderParameters;
-import org.eclipse.openk.common.date.DateDefaults;
-import org.eclipse.openk.common.value.parameter.annotations.IntegerValidator;
-import org.eclipse.openk.common.value.parameter.annotations.LocalDateTimeValidator;
-import org.eclipse.openk.common.value.parameter.annotations.Parameter;
-import org.eclipse.openk.common.value.parameter.annotations.StringValidator;
-import org.eclipse.openk.domain.dynamictopology.model.ConnectionState;
-import org.eclipse.openk.domain.dynamictopology.model.FetchType;
-import org.eclipse.openk.domain.dynamictopology.model.Selector;
-
-/**
- * The conducting equipment types request parameters.
- *
- * @author 2017-10-24 Christian Brunzendorf
- * @author 2017-10-27 Felix Korb
- */
-public final class ConductingEquipmentTypes_1_Xml_RequestParameters implements ICimHeaderParameters {
-
- // Constants
- public static final String PARAMETER_CONNECTION_STATE = "connection-state";
- public static final String PARAMETER_ENTRY_POINT_ID = "entry-point-id";
- public static final String PARAMETER_FETCH_TYPE = "fetch-type";
- public static final String PARAMETER_SELECTOR = "selector";
- public static final String PARAMETER_TOPOLOGY_ID = "topology-id";
- private static final String NOUN = "get";
-
- // Attributes
- @Parameter(name = PARAMETER_CONNECTION_STATE, defaultValue = "Ignore", optional = true)
- private ConnectionState connectionState;
-
- @Parameter(name = PARAMETER_ENTRY_POINT_ID, optional = true)
- private UUID entryPointId;
-
- @Parameter(name = PARAMETER_FETCH_TYPE, defaultValue = "Lazy", optional = true)
- private FetchType fetchType;
-
- @Parameter(name = PARAMETER_MESSAGE_ID, optional = true)
- private UUID messageId;
-
- @IntegerValidator(minValue = 1)
- @Parameter(name = PARAMETER_REVISION, optional = false)
- private int revision;
-
- @Parameter(name = PARAMETER_SELECTOR, defaultValue = "Containing", optional = true)
- private Selector selector;
-
- @StringValidator(minLength = 1, maxLength = CimMessageDefaults.MAX_SOURCE_LENGTH)
- @Parameter(name = PARAMETER_SOURCE, optional = true)
- private String source;
-
- @LocalDateTimeValidator(dateFormat = DateDefaults.DATE_TIME_FORMATTER_PATTERN_UTC_TIMESTAMP)
- @Parameter(name = PARAMETER_TIMESTAMP, optional = true)
- private LocalDateTime timestamp;
-
- @Parameter(name = PARAMETER_TOPOLOGY_ID, optional = true)
- private UUID topologyId;
-
- @StringValidator(minLength = 1, maxLength = CimMessageDefaults.MAX_USER_ID_LENGTH)
- @Parameter(name = PARAMETER_USER_ID, optional = true)
- private String userId;
-
- // Properties
- /**
- * @return the connection state
- */
- public ConnectionState getConnectionState() {
-
- return connectionState;
- }
-
- /**
- * @return the entry point id
- */
- public UUID getEntryPointId() {
-
- return entryPointId;
- }
-
- /**
- * @return the fetch type
- */
- public FetchType getFetchType() {
-
- return fetchType;
- }
-
- @Override
- public UUID getMessageId() {
-
- return messageId;
- }
-
- @Override
- public String getNoun() {
-
- return NOUN;
- }
-
- @Override
- public int getRevision() {
-
- return revision;
- }
-
- /**
- * @return the selector
- */
- public Selector getSelector() {
-
- return selector;
- }
-
- @Override
- public String getSource() {
-
- return source;
- }
-
- @Override
- public LocalDateTime getTimestamp() {
-
- return timestamp;
- }
-
- /**
- * @return the topology id
- */
- public UUID getTopologyId() {
-
- return topologyId;
- }
-
- @Override
- public String getUserId() {
-
- return userId;
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_Responder.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_Responder.java
deleted file mode 100644
index c72428de..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipmentTypes_1_Xml_Responder.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.openk.cim.cim17v07.Cim17v07;
-import org.eclipse.openk.cim.profile.openkonsequenz.OpenKonsequenz;
-import org.eclipse.openk.cim.profile.openkonsequenz.api.statictopology.ElementType;
-import org.eclipse.openk.common.IVersion;
-import org.eclipse.openk.common.Version;
-import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.common.messaging.messages.FailedToCreateException;
-import org.eclipse.openk.common.model.IModelDefinition;
-import org.eclipse.openk.common.value.parameter.NoParameters;
-import org.eclipse.openk.domain.dynamictopology.core.DynamicTopologyDefaults;
-import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.ConductingEquipmentTypes_1_QueryParameters;
-import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
-import org.eclipse.openk.service.adapter.IServiceAdapterController;
-import org.eclipse.openk.service.adapter.dataexchange.cim.responder.AbstractCimResponder;
-import org.eclipse.openk.service.adapter.dataexchange.cim.responder.CimResponderConfiguration;
-import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
-import org.eclipse.openk.service.adapter.dataexchange.mapper.MapperConfiguration;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.logic.dataexchange.view.IView;
-import org.eclipse.openk.service.model.new_repository.model.IEntity;
-
-/**
- * The conducting equipment types responder.
- *
- * @author 2017-10-24 Christian Brunzendorf
- */
-public final class ConductingEquipmentTypes_1_Xml_Responder extends AbstractCimResponder<CimResponderConfiguration, List<IEntity>, List<ElementType>, ConductingEquipmentTypes_1_Xml_RequestParameters> {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ConductingEquipmentTypes_1_Xml_Responder.class);
- public static final IVersion VERSION = new Version(1);
-
- // Attributes
- private IServiceContext context;
-
- // Constructors
- /**
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ConductingEquipmentTypes_1_Xml_Responder(IServiceContext context) throws IllegalArgumentException {
-
- super(DynamicTopologyDefaults.SCOPE_ELEMENT_TYPES, VERSION, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
-
- if(context == null)
- throw new IllegalArgumentException("context", new NullPointerException());
- else
- this.context = context;
- }
-
- // Methods
- @Override
- protected List<IEntity> fetchResponseData(ConductingEquipmentTypes_1_Xml_RequestParameters requestParameters) throws IOException {
-
- ConductingEquipmentTypes_1_QueryParameters queryParameters = null;
- List<IEntity> result = null;
- IView<?, List<IEntity>, ConductingEquipmentTypes_1_QueryParameters> view;
-
- /* create suitable view */
- {
- view = ((IServiceAdapterController<?>) getContext().getServiceController()).getViewFactory().createView(getScope(), new Version(1));
- if(view == null)
- getLogger().warn(new FailedToCreateException(" a suitable view."));
- else {
- /* get query parameters */
- queryParameters = new ConductingEquipmentTypes_1_QueryParameters();
- queryParameters.setConnectionState(requestParameters.getConnectionState());
- queryParameters.setEntryPointId(requestParameters.getEntryPointId());
- queryParameters.setFetchType(requestParameters.getFetchType());
- queryParameters.setSelector(requestParameters.getSelector());
-
- /* read data */
- result = view.executeQuery(queryParameters);
- }
- }
- return result;
- }
-
- @Override
- protected List<ElementType> mapToTransferData(ConductingEquipmentTypes_1_Xml_RequestParameters requestParameters, List<IEntity> responseData) throws IOException {
-
- IMapper<MapperConfiguration, List<IEntity>, List<ElementType>, NoParameters> mapper = ((IServiceAdapterController<?>) getContext()).getMapperFactory().createMapper(getScope(), StaticTopology2.INSTANCE, OpenKonsequenz.INSTANCE);
-
- return mapper.map(responseData, NoParameters.INSTANCE);
- }
-
- // Properties
- @Override
- public IServiceContext getContext() {
-
- return context;
- }
-
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-
- @Override
- public Class<ConductingEquipmentTypes_1_Xml_RequestParameters> getRequestParametersObjectType() {
-
- return ConductingEquipmentTypes_1_Xml_RequestParameters.class;
- }
-
- @Override
- public IModelDefinition getCimModelDefinition() {
-
- return Cim17v07.INSTANCE;
- }
-
- @Override
- protected Class<CimResponderConfiguration> getConfigurationType() {
-
- return CimResponderConfiguration.class;
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_RequestParameters.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_RequestParameters.java
deleted file mode 100644
index ba3116f4..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_RequestParameters.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder;
-
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.UUID;
-
-import org.eclipse.openk.common.dataexchange.cim.message.CimMessageDefaults;
-import org.eclipse.openk.common.dataexchange.cim.message.ICimHeaderParameters;
-import org.eclipse.openk.common.date.DateDefaults;
-import org.eclipse.openk.common.value.parameter.annotations.IntegerValidator;
-import org.eclipse.openk.common.value.parameter.annotations.ListValidator;
-import org.eclipse.openk.common.value.parameter.annotations.LocalDateTimeValidator;
-import org.eclipse.openk.common.value.parameter.annotations.Parameter;
-import org.eclipse.openk.common.value.parameter.annotations.StringValidator;
-import org.eclipse.openk.common.value.parameter.definitions.items.ItemEncoder;
-import org.eclipse.openk.common.value.parameter.definitions.items.StringItemDecoder;
-import org.eclipse.openk.domain.dynamictopology.model.ConnectionState;
-import org.eclipse.openk.domain.dynamictopology.model.FetchType;
-import org.eclipse.openk.domain.dynamictopology.model.Selector;
-
-/**
- * The conducting equipments request parameters.
- *
- * @author 2017-10-26 Christian Brunzendorf
- */
-public final class ConductingEquipments_1_Xml_RequestParameters implements ICimHeaderParameters {
-
- // Constants
- public static final String PARAMETER_CONNECTION_STATE = "connection-state";
- public static final String PARAMETER_ELEMENT_TYPES = "element-types";
- public static final String PARAMETER_ENTRY_POINT_ID = "entry-point-id";
- public static final String PARAMETER_FETCH_TYPE = "fetch-type";
- public static final String PARAMETER_SELECTOR = "selector";
- public static final String PARAMETER_TOPOLOGY_ID = "topology-id";
- private static final String NOUN = "get";
-
- // Attributes
- @Parameter(name = PARAMETER_CONNECTION_STATE, defaultValue = "Ignore", optional = true)
- private ConnectionState connectionState;
-
- @ListValidator(itemDecoder = StringItemDecoder.class, itemEncoder = ItemEncoder.class)
- @Parameter(name = PARAMETER_ELEMENT_TYPES, optional = true)
- private List<String> elementTypes;
-
- @Parameter(name = PARAMETER_ENTRY_POINT_ID, optional = true)
- private UUID entryPointId;
-
- @Parameter(name = PARAMETER_FETCH_TYPE, defaultValue = "Lazy", optional = true)
- private FetchType fetchType;
-
- @Parameter(name = PARAMETER_MESSAGE_ID, optional = true)
- private UUID messageId;
-
- @IntegerValidator(minValue = 1)
- @Parameter(name = PARAMETER_REVISION, optional = false)
- private int revision;
-
- @Parameter(name = PARAMETER_SELECTOR, defaultValue = "Containing", optional = true)
- private Selector selector;
-
- @StringValidator(minLength = 1, maxLength = CimMessageDefaults.MAX_SOURCE_LENGTH)
- @Parameter(name = PARAMETER_SOURCE, optional = true)
- private String source;
-
- @LocalDateTimeValidator(dateFormat = DateDefaults.DATE_TIME_FORMATTER_PATTERN_UTC_TIMESTAMP)
- @Parameter(name = PARAMETER_TIMESTAMP, optional = true)
- private LocalDateTime timestamp;
-
- @Parameter(name = PARAMETER_TOPOLOGY_ID, optional = true)
- private UUID topologyId;
-
- @StringValidator(minLength = 1, maxLength = CimMessageDefaults.MAX_USER_ID_LENGTH)
- @Parameter(name = PARAMETER_USER_ID, optional = true)
- private String userId;
-
- // Properties
- /**
- * @return the connection state
- */
- public ConnectionState getConnectionState() {
-
- return connectionState;
- }
-
- /**
- * @return the element types
- */
- public List<String> getElementTypes() {
-
- return elementTypes;
- }
-
- /**
- * @return the entry point id
- */
- public UUID getEntryPointId() {
-
- return entryPointId;
- }
-
- /**
- * @return the fetch type
- */
- public FetchType getFetchType() {
-
- return fetchType;
- }
-
- @Override
- public UUID getMessageId() {
-
- return messageId;
- }
-
- @Override
- public String getNoun() {
-
- return NOUN;
- }
-
- @Override
- public int getRevision() {
-
- return revision;
- }
-
- /**
- * @return the selector
- */
- public Selector getSelector() {
-
- return selector;
- }
-
- @Override
- public String getSource() {
-
- return source;
- }
-
- @Override
- public LocalDateTime getTimestamp() {
-
- return timestamp;
- }
-
- /**
- * @return the topology id
- */
- public UUID getTopologyId() {
-
- return topologyId;
- }
-
- @Override
- public String getUserId() {
-
- return userId;
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_Responder.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_Responder.java
deleted file mode 100644
index d76f546a..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/ConductingEquipments_1_Xml_Responder.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.openk.cim.cim17v07.Cim17v07;
-import org.eclipse.openk.cim.profile.openkonsequenz.OpenKonsequenz;
-import org.eclipse.openk.common.IVersion;
-import org.eclipse.openk.common.Version;
-import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
-import org.eclipse.openk.common.dataexchange.cim.ICimEntity;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.common.messaging.messages.FailedToCreateException;
-import org.eclipse.openk.common.model.IModelDefinition;
-import org.eclipse.openk.common.value.parameter.NoParameters;
-import org.eclipse.openk.domain.dynamictopology.core.DynamicTopologyDefaults;
-import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.ConductingEquipments_1_QueryParameters;
-import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
-import org.eclipse.openk.service.adapter.IServiceAdapterController;
-import org.eclipse.openk.service.adapter.dataexchange.cim.responder.AbstractCimResponder;
-import org.eclipse.openk.service.adapter.dataexchange.cim.responder.CimResponderConfiguration;
-import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
-import org.eclipse.openk.service.adapter.dataexchange.mapper.MapperConfiguration;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.logic.dataexchange.view.IView;
-import org.eclipse.openk.service.model.new_repository.model.IEntity;
-
-/**
- * The conducting equipments responder.
- *
- * @author 2017-10-24 Christian Brunzendorf
- */
-public final class ConductingEquipments_1_Xml_Responder extends AbstractCimResponder<CimResponderConfiguration, List<? extends IEntity>, List<? extends ICimEntity>, ConductingEquipments_1_Xml_RequestParameters> {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ConductingEquipments_1_Xml_Responder.class);
- public static final IVersion VERSION = new Version(1);
-
- // Attributes
- private IServiceContext context;
-
- // Constructors
- /**
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ConductingEquipments_1_Xml_Responder(IServiceContext context) throws IllegalArgumentException {
-
- // super(DynamicTopologyDefaults.SCOPE_CONDUCTING_EQUIPMENTS, VERSION, CommunicationTechnology.REST, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
- super(DynamicTopologyDefaults.SCOPE_ELEMENTS, VERSION, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
- if(context == null)
- throw new IllegalArgumentException("context", new NullPointerException());
- else
- this.context = context;
- }
-
- // Methods
- @Override
- protected List<? extends IEntity> fetchResponseData(ConductingEquipments_1_Xml_RequestParameters requestParameters) throws IOException {
-
- ConductingEquipments_1_QueryParameters queryParameters = null;
- List<IEntity> result = null;
- IView<?, List<IEntity>, ConductingEquipments_1_QueryParameters> view;
- /* create suitable view */
-
- {
- view = ((IServiceAdapterController<?>) getContext().getServiceController()).getViewFactory().createView(getScope(), new Version(1));
- if(view == null)
- getLogger().warn(new FailedToCreateException("Failed to create a suitable view."));
- else {
- /* get query parameters */
- queryParameters = new ConductingEquipments_1_QueryParameters();
- queryParameters.setConnectionState(requestParameters.getConnectionState());
- queryParameters.setElementTypes(requestParameters.getElementTypes());
- queryParameters.setEntryPointId(requestParameters.getEntryPointId());
- queryParameters.setFetchType(requestParameters.getFetchType());
- queryParameters.setSelector(requestParameters.getSelector());
-
- /* read data */
- result = view.executeQuery(queryParameters);
- }
- }
-
- return result;
- }
-
- @Override
- protected List<? extends ICimEntity> mapToTransferData(ConductingEquipments_1_Xml_RequestParameters requestParameters, List<? extends IEntity> responseData) throws IOException {
-
- IMapper<MapperConfiguration, List<? extends IEntity>, List<? extends ICimEntity>, NoParameters> mapper = ((IServiceAdapterController<?>) getContext()).getMapperFactory().createMapper(getScope(), StaticTopology2.INSTANCE, OpenKonsequenz.INSTANCE);
-
- return mapper.map(responseData, NoParameters.INSTANCE);
- }
-
- // Properties
- @Override
- protected Class<CimResponderConfiguration> getConfigurationType() {
-
- return CimResponderConfiguration.class;
- }
-
- @Override
- public IServiceContext getContext() {
-
- return context;
- }
-
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-
- @Override
- public Class<ConductingEquipments_1_Xml_RequestParameters> getRequestParametersObjectType() {
-
- return ConductingEquipments_1_Xml_RequestParameters.class;
- }
-
- @Override
- public IModelDefinition getCimModelDefinition() {
-
- return Cim17v07.INSTANCE;
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/Topology_2_Rdf_Responder.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/Topology_2_Rdf_Responder.java
index 1d125721..e8cd7bac 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/Topology_2_Rdf_Responder.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/adapter/src/main/java/org/eclipse/openk/domain/dynamictopology/adapter/dataexchange/responder/Topology_2_Rdf_Responder.java
@@ -76,7 +76,7 @@ public final class Topology_2_Rdf_Responder extends AbstractCimResponder<CimResp
// Methods
@Override
- protected List<IEntity> fetchResponseData(Topology_2_Rdf_RequestParameters requestParameters) throws IOException {
+ protected List<IEntity> fetchResponseData(Topology_2_Rdf_RequestParameters requestParameters) throws IllegalArgumentException, IOException {
Topology_1_QueryParameters queryParameters = null;
List<IEntity> result = null;
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/core/src/main/java/org/eclipse/openk/domain/dynamictopology/core/DynamicTopologyDefaults.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/core/src/main/java/org/eclipse/openk/domain/dynamictopology/core/DynamicTopologyDefaults.java
index d6e3f07c..48d6fa4a 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/core/src/main/java/org/eclipse/openk/domain/dynamictopology/core/DynamicTopologyDefaults.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/core/src/main/java/org/eclipse/openk/domain/dynamictopology/core/DynamicTopologyDefaults.java
@@ -25,8 +25,8 @@ public final class DynamicTopologyDefaults {
// Constants
/* scopes dynamic-topology */
- public static final String SCOPE_ELEMENTS = "Elements";
- public static final String SCOPE_ELEMENT_TYPES = "ElementTypes";
+ public static final String SCOPE_POWER_SYSTEM_RESOURCES = "PowerSystemResources";
+ public static final String SCOPE_POWER_SYSTEM_RESOURCE_TYPES = "PowerSystemResourceTypes";
public static final String SCOPE_TOPOLOGY = "Topology";
// Constructors
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipmentTypes_Rest_EndPoint.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipmentTypes_Rest_EndPoint.java
deleted file mode 100644
index cb734029..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipmentTypes_Rest_EndPoint.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.infrastructure.dataexchange.rest;
-
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.domain.dynamictopology.core.DynamicTopologyDefaults;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.infrastructure.dataexchange.rest.AbstractHttpRestEndPoint;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * The <i>REST</i> end point for the topology.
- *
- * @author 2017-10-24 Frank Jäger
- */
-@RestController
-@RequestMapping(path = "/domain/dynamic-topology")
-public final class ConductingEquipmentTypes_Rest_EndPoint extends AbstractHttpRestEndPoint {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ConductingEquipmentTypes_Rest_EndPoint.class);
-
- // Constructors
- /**
- * Instantiates a new topology rest end point.
- *
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ConductingEquipmentTypes_Rest_EndPoint(IServiceContext context) throws IllegalArgumentException {
- super(context);
- }
-
- // Methods
- @Override
- @GetMapping(path = "/element-types", produces = "application/xml")
- public void getResponse(HttpServletResponse response, @RequestParam Map<String, String> requestProperties) {
-
- writeHttpRestResponse(response, requestProperties, DynamicTopologyDefaults.SCOPE_ELEMENT_TYPES, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
- }
-
- // Properties
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipments_Rest_EndPoint.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipments_Rest_EndPoint.java
deleted file mode 100644
index 28140bd4..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/ConductingEquipments_Rest_EndPoint.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.infrastructure.dataexchange.rest;
-
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.domain.dynamictopology.core.DynamicTopologyDefaults;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.infrastructure.dataexchange.rest.AbstractHttpRestEndPoint;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * The <i>REST</i> end point for elements, respective conducting equipments.
- *
- * @author 2017-10-24 Frank Jäger
- */
-@RestController
-@RequestMapping(path = "/domain/dynamic-topology")
-public final class ConductingEquipments_Rest_EndPoint extends AbstractHttpRestEndPoint {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ConductingEquipments_Rest_EndPoint.class);
-
- // Constructors
- /**
- * Instantiates a new elements rest end point.
- *
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ConductingEquipments_Rest_EndPoint(IServiceContext context) throws IllegalArgumentException {
- super(context);
- }
-
- // Methods
- @Override
- @GetMapping(path = "/elements", produces = "application/xml")
- public void getResponse(HttpServletResponse response, @RequestParam Map<String, String> requestProperties) {
-
- writeHttpRestResponse(response, requestProperties, DynamicTopologyDefaults.SCOPE_ELEMENTS, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
- }
-
- // Properties
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/Topology_Rest_EndPoint.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/Topology_Rest_EndPoint.java
index 29459d13..9237659b 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/Topology_Rest_EndPoint.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/infrastructure/src/main/java/org/eclipse/openk/domain/dynamictopology/infrastructure/dataexchange/rest/Topology_Rest_EndPoint.java
@@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author 2017-10-24 Frank Jäger
*/
@RestController
-@RequestMapping(path = "/domain/dynamic-topology")
+@RequestMapping(path = "/domain/electricity/dynamic-topology")
public final class Topology_Rest_EndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_QueryParameters.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_QueryParameters.java
deleted file mode 100644
index ef2d44c4..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_QueryParameters.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view;
-
-import java.util.UUID;
-
-import org.eclipse.openk.domain.dynamictopology.model.ConnectionState;
-import org.eclipse.openk.domain.dynamictopology.model.FetchType;
-import org.eclipse.openk.domain.dynamictopology.model.Selector;
-
-/**
- * The conducting equipment types query parameters.
- *
- * @author 2017-10-24 Michael Korta
- */
-public class ConductingEquipmentTypes_1_QueryParameters {
-
- // Constants
- public static final String PARAMETER_CONNECTION_STATE = "connection-state";
- public static final String PARAMETER_ENTRY_POINT_ID = "entry-point-id";
- public static final String PARAMETER_FETCH_TYPE = "fetch-type";
- public static final String PARAMETER_SELECTOR = "selector";
-
- // Attributes
- private ConnectionState connectionState;
- private UUID entryPointId;
- private FetchType fetchType;
- private Selector selector;
-
- // Properties
- /**
- * @return the connection state; not <code>null</code>
- */
- public ConnectionState getConnectionState() {
-
- return connectionState;
- }
-
- /**
- * @return the entry point id; can be <code>null</code>
- */
- public UUID getEntryPointId() {
-
- return entryPointId;
- }
-
- /**
- * @return the fetch type
- */
- public FetchType getFetchType() {
-
- return fetchType;
- }
-
- /**
- * @return the selector; not <code>null</code>
- */
- public Selector getSelector() {
-
- return selector;
- }
-
- /**
- * @param connectionState
- * the new connection state
- */
- public void setConnectionState(ConnectionState connectionState) {
-
- this.connectionState = connectionState;
- }
-
- /**
- * @param entryPointId
- * the new entry point id
- */
- public void setEntryPointId(UUID entryPointId) {
-
- this.entryPointId = entryPointId;
- }
-
- /**
- * @param fetchType
- * the new fetch type
- */
- public void setFetchType(FetchType fetchType) {
-
- this.fetchType = fetchType;
- }
-
- /**
- * @param selector
- * the new selector
- */
- public void setSelector(Selector selector) {
-
- this.selector = selector;
- }
-}
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_View.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_View.java
deleted file mode 100644
index c7ee4617..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipmentTypes_1_View.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.openk.common.IVersion;
-import org.eclipse.openk.common.Version;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.domain.statictopology.core.StaticTopologyDefaults;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.logic.IServiceLogicController;
-import org.eclipse.openk.service.logic.dataexchange.view.AbstractView;
-import org.eclipse.openk.service.logic.dataexchange.view.ViewConfiguration;
-import org.eclipse.openk.service.model.new_repository.IRepository;
-import org.eclipse.openk.service.model.new_repository.model.IEntity;
-
-/**
- * The view for conducting equipment types.
- *
- * @author 2017-10-26 Michael Korta
- * @author 2017-10-26 Tomke Meyer
- *
- */
-public final class ConductingEquipmentTypes_1_View extends AbstractView<ViewConfiguration, List<Class<? extends IEntity>>, ConductingEquipmentTypes_1_QueryParameters> {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ConductingEquipmentTypes_1_View.class);
-
- public static final String SCOPE = "ElementTypes";
- public static final IVersion VERSION = new Version(1);
-
- // Constructors
- /**
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ConductingEquipmentTypes_1_View(IServiceContext context) throws IllegalArgumentException {
-
- super(context, SCOPE, VERSION);
- }
-
- // Methods
- @Override
- public List<Class<? extends IEntity>> executeQuery(ConductingEquipmentTypes_1_QueryParameters queryParameters) throws IllegalArgumentException, IOException {
-
- List<Class<? extends IEntity>> result = null;
- IRepository<IEntity> staticTopologyRepository;
- IRepository<IEntity> topologyStateRepository;
-
- if(queryParameters == null) {
- throw new IllegalArgumentException("queryParameters", new NullPointerException());
- }
- else {
- staticTopologyRepository = (IRepository<IEntity>) ((IServiceLogicController<?>) getContext().getServiceController()).getNewRepository(StaticTopologyDefaults.REPOSITORY_KEY_STATIC_TOPOLOGY);
-
- if(staticTopologyRepository != null) {
- if(!staticTopologyRepository.isEmpty()) {
- Set<Class<? extends IEntity>> elementTypes = new HashSet<>();
-
- for(IEntity entity : staticTopologyRepository.findAll())
- if(!elementTypes.contains(entity.getClass()))
- elementTypes.add(entity.getClass());
-
- if(!elementTypes.isEmpty()) {
- result = new ArrayList<>(elementTypes.size());
-
- for(Class<? extends IEntity> elementType : elementTypes)
- result.add(elementType);
- }
- }
- }
- }
-
- return result;
- }
-
- // Properties
- @Override
- protected Class<ViewConfiguration> getConfigurationType() {
-
- return ViewConfiguration.class;
- }
-
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-}
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_QueryParameters.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_QueryParameters.java
deleted file mode 100644
index eac5e7c4..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_QueryParameters.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view;
-
-import java.util.List;
-import java.util.UUID;
-
-import org.eclipse.openk.domain.dynamictopology.model.ConnectionState;
-import org.eclipse.openk.domain.dynamictopology.model.FetchType;
-import org.eclipse.openk.domain.dynamictopology.model.Selector;
-
-/**
- * The conducting equipments query parameters.
- *
- * @author 2017-10-26 Christian Brunzendorf
- * @author 2017-10-24 Michael Korta
- */
-public class ConductingEquipments_1_QueryParameters {
-
- // Constants
- public static final String PARAMETER_CONNECTION_STATE = "connection-state";
- public static final String PARAMETER_ELEMENT_TYPES = "element-types";
- public static final String PARAMETER_ENTRY_POINT_ID = "entry-point-id";
- public static final String PARAMETER_FETCH_TYPE = "fetch-type";
- public static final String PARAMETER_SELECTOR = "selector";
-
- // Attributes
- private ConnectionState connectionState;
- private List<String> elementTypes;
- private UUID entryPointId;
- private FetchType fetchType;
- private Selector selector;
-
- // Properties
-
- /**
- * @return the connection state; not <code>null</code>
- */
- public ConnectionState getConnectionState() {
-
- return connectionState;
- }
-
- /**
- * @return the element types; not <code>null</code>
- */
- public List<String> getElementTypes() {
-
- return elementTypes;
- }
-
- /**
- * @return the entry point id; can be <code>null</code>
- */
- public UUID getEntryPointId() {
-
- return entryPointId;
- }
-
- /**
- * @return the fetch type
- */
- public FetchType getFetchType() {
-
- return fetchType;
- }
-
- /**
- * @return the selector; not <code>null</code>
- */
- public Selector getSelector() {
-
- return selector;
- }
-
- /**
- * @param connectionState
- * the new connection state
- */
- public void setConnectionState(ConnectionState connectionState) {
-
- this.connectionState = connectionState;
- }
-
- /**
- * @param elementTypes
- * the new element types
- */
- public void setElementTypes(List<String> elementTypes) {
-
- this.elementTypes = elementTypes;
- }
-
- /**
- * @param entryPointId
- * the new entry point id
- */
- public void setEntryPointId(UUID entryPointId) {
-
- this.entryPointId = entryPointId;
- }
-
- /**
- * @param fetchType
- * the new fetch type
- */
- public void setFetchType(FetchType fetchType) {
-
- this.fetchType = fetchType;
- }
-
- /**
- * @param selector
- * the new selector
- */
- public void setSelector(Selector selector) {
-
- this.selector = selector;
- }
-}
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_View.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_View.java
deleted file mode 100644
index 9fd35396..00000000
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/ConductingEquipments_1_View.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.openk.common.IVersion;
-import org.eclipse.openk.common.Version;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.domain.statictopology.core.StaticTopologyDefaults;
-import org.eclipse.openk.domain.topologystate.core.TopologyStateDefaults;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.logic.IServiceLogicController;
-import org.eclipse.openk.service.logic.dataexchange.view.AbstractView;
-import org.eclipse.openk.service.logic.dataexchange.view.ViewConfiguration;
-import org.eclipse.openk.service.model.new_repository.IRepository;
-import org.eclipse.openk.service.model.new_repository.model.IEntity;
-
-/**
- * The view for conducting equipments.
- *
- * @author 2017-10-24 Michael Korta
- * @author 2017-10-26 Tomke Meyer
- */
-public final class ConductingEquipments_1_View extends AbstractView<ViewConfiguration, List<IEntity>, ConductingEquipments_1_QueryParameters> {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ConductingEquipments_1_View.class);
-
- public static final String SCOPE = "Elements";
- public static final IVersion VERSION = new Version(1);
-
- // Constructors
- /**
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ConductingEquipments_1_View(IServiceContext context) throws IllegalArgumentException {
-
- super(context, SCOPE, VERSION);
- }
-
- // Methods
- @Override
- public List<IEntity> executeQuery(ConductingEquipments_1_QueryParameters parameters) throws IOException {
-
- List<IEntity> result = null;
- IRepository<IEntity> staticTopologyRepository;
- IRepository<IEntity> topologyStateRepository;
-
- staticTopologyRepository = (IRepository<IEntity>) ((IServiceLogicController<?>) getContext().getServiceController()).getNewRepository(StaticTopologyDefaults.REPOSITORY_KEY_STATIC_TOPOLOGY);
- topologyStateRepository = (IRepository<IEntity>) ((IServiceLogicController<?>) getContext().getServiceController()).getNewRepository(TopologyStateDefaults.REPOSITORY_KEY_TOPOLOGY_STATE);
-
- if(staticTopologyRepository != null) {
- List<IEntity> entities = (List<IEntity>) staticTopologyRepository.findAll();
-
- // REMIND 2017-10-26 Renko: Parameter prüfen
-
- // parameters.getFetchType();
- // parameters.getElementTypes();
- //
-
- /* get entry point entity */
- // IEntity entryPointEntity = DynamicTopologyViewUtilities.getEntryPointEntity(parameters.getEntryPointId(), staticTopologyRepository);
-
- /* get entities by selector state */
- // Map<Key, IEntity> selectedEntitiesBySelector = DynamicTopologyViewUtilities.getSelectedEntities(parameters.getSelector(), entryPointEntity, staticTopologyRepository);
-
- /* get switched entities */
- // List<IEntity> selectedEntitiesByConnectionState = DynamicTopologyViewUtilities.getSwitchedEntities(parameters.getConnectionState(), selectedEntitiesBySelector, topologyStateRepository);
-
- /* get entities by selector state */
- // List<IEntity> selectedEntitiesByFetchType = DynamicTopologyViewUtilities.getSwitchedEntities(parameters.getFetchType(), selectedEntitiesByConnectionState, topologyStateRepository);
-
- /* get entities by measurement types */
-
- /* create result using the conducting equipment filter */
- result = entities; // (List<IEntity>) selectedEntitiesBySelector.values();
- }
-
- return result;
- }
-
- // Properties
- @Override
- protected Class<ViewConfiguration> getConfigurationType() {
-
- return ViewConfiguration.class;
- }
-
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-}
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/DynamicTopologyViewUtilities.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/DynamicTopologyViewUtilities.java
index 6b7677d3..d930e9e9 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/DynamicTopologyViewUtilities.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/DynamicTopologyViewUtilities.java
@@ -14,18 +14,29 @@
package org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
+import org.apache.commons.lang3.NotImplementedException;
import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
+import org.eclipse.openk.common.messaging.messages.InvalidParameterException;
+import org.eclipse.openk.common.string.StringUtilities;
import org.eclipse.openk.domain.dynamictopology.model.ConnectionState;
+import org.eclipse.openk.domain.dynamictopology.model.FetchType;
import org.eclipse.openk.domain.dynamictopology.model.Selector;
+import org.eclipse.openk.domain.statictopology.model.IConductingEquipment;
import org.eclipse.openk.domain.statictopology.model.IEquipment;
import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
+import org.eclipse.openk.domain.statictopology.model.line.Line;
+import org.eclipse.openk.domain.statictopology.model.substation.Substation;
+import org.eclipse.openk.domain.statictopology.model.substation.powertransformer.PowerTransformer;
+import org.eclipse.openk.domain.statictopology.model.substation.powertransformer.PowerTransformerEnd;
+import org.eclipse.openk.domain.statictopology.model.substation.switches.Switch;
import org.eclipse.openk.service.model.new_repository.IRepository;
import org.eclipse.openk.service.model.new_repository.model.IEntity;
@@ -33,11 +44,13 @@ import org.eclipse.openk.service.model.new_repository.model.IEntity;
* The utility class dynamic views.
*
* @author 2017-10-27 Christian Brunzendorf
+ * @author 2017-11-01 Renko Ortgies
*/
public final class DynamicTopologyViewUtilities {
// Constants
private static final ILogger LOGGER = LoggerFactory.createLogger(DynamicTopologyViewUtilities.class);
+ private static final String NOT_IMPLEMENTED = " not implemented yet!";
// Constructors
private DynamicTopologyViewUtilities() {
@@ -46,28 +59,109 @@ public final class DynamicTopologyViewUtilities {
// Methods
/**
- * Gets the entry point entity. By default the entry point entity is the first Element in the repository.
+ * Filter by power system resource types.
+ *
+ * @param staticTopologyEntities
+ * the entities; not <code>null</code>
+ * @param powerSystemResourceTypes
+ * the power system resource types; can be <code>null</code>, if <code>null</code> the entities will be returned
+ * @return the filtered list
+ */
+ public static List<IEntity> filterByPowerSystemResourceTypes(List<IEntity> staticTopologyEntities, List<String> powerSystemResourceTypes) {
+
+ if(powerSystemResourceTypes == null)
+ return staticTopologyEntities;
+ else {
+ String powerSystemResourceType;
+ List<IEntity> result = new ArrayList<>(staticTopologyEntities.size());
+
+ for(IEntity entity : staticTopologyEntities) {
+ if(entity instanceof Substation) {
+ powerSystemResourceType = entity.getClass().getSimpleName();
+ if(!powerSystemResourceTypes.contains(StringUtilities.toTrainCase(powerSystemResourceType)))
+ powerSystemResourceType = ((Substation) entity).getSubstationType() != null ? ((Substation) entity).getSubstationType().getName() : entity.getClass().getSimpleName();
+ }
+ else if(entity instanceof Line) {
+ powerSystemResourceType = entity.getClass().getSimpleName();
+ if(!powerSystemResourceTypes.contains(StringUtilities.toTrainCase(powerSystemResourceType)))
+ powerSystemResourceType = ((Line) entity).getLineType() != null ? ((Line) entity).getLineType().getName() : entity.getClass().getSimpleName();
+ }
+ else
+ powerSystemResourceType = entity.getClass().getSimpleName();
+
+ if(powerSystemResourceTypes.contains(StringUtilities.toTrainCase(powerSystemResourceType)))
+ result.add(entity);
+ }
+
+ return result;
+ }
+ }
+
+ /**
+ * Gets the selected entities.
+ *
+ * @param selector
+ * the selector; not <code>null</code>
+ * @param fetchType
+ * the fetch type; not <code>null</code>
+ * @param entryPointEntity
+ * the entry point entity; not <code>null</code>
+ * @return the selected entities; not <code>null</code> but can be empty
+ */
+ public static Map<Key, IEntity> getEntitiesByEntryPointEntity(Selector selector, FetchType fetchType, IEntity entryPointEntity) {
+
+ Map<Key, IEntity> result = null;
+ switch(selector) {
+ case Behind:
+ if(result == null)
+ result = new HashMap<>();
+ if(entryPointEntity instanceof PowerTransformer) {
+ /* get secondary winding */
+ PowerTransformerEnd powerTransformerEnd = ((PowerTransformer) entryPointEntity).getPowerTransformerEnds().get(1);
+ if(powerTransformerEnd != null) {
+ result.put(powerTransformerEnd.getBaseVoltage().getKey(), powerTransformerEnd.getBaseVoltage());
+ result.putAll(powerTransformerEnd.getBaseVoltage().getConductingEquipments());
+ }
+ }
+ break;
+ case Containing:
+ result = getContainingEntitiesByEntryPointEntity(selector, fetchType, entryPointEntity);
+ break;
+ case Above:
+ case All:
+ case ContainingAndAbove:
+ case ContainingAndBehind:
+ throw new NotImplementedException(selector.name() + NOT_IMPLEMENTED);
+
+ default:
+ result = new HashMap<>();
+ break;
+ }
+ return result;
+ }
+
+ /**
+ * Gets the entry point entity.
*
* @param entryPointId
* the entry point id; can be <code>null</code>
* @param staticTopologyRepository
* the static topology repository; not <code>null</code>
- * @return the entry point entity; can be <code>null</code> if {@link IRepository} is empty
- * @throws UnsupportedOperationException
- * the unsupported operation exception
- * Is thrown in the following cases:
- * <ul>
- * <li><code></code> is ></li>
- * </ul>
+ * @return the entry point entity
+ * <ul>
+ * <li><code>null</code>, if the entryPointId was not found.</li>
+ * <li><code>null</code>, if entryPointId is <code>null</code>.</li>
+ * </ul>
* @throws IOException
- * Signals that an I/O exception has occurred.
+ * {@link IOException}
+ * @throws UnsupportedOperationException
+ * {@link UnsupportedOperationException}
*/
- public static IEntity getEntryPointEntity(UUID entryPointId, IRepository<IEntity> staticTopologyRepository) throws UnsupportedOperationException, IOException {
+ public static IEntity getEntryPointEntity(UUID entryPointId, IRepository<IEntity> staticTopologyRepository) throws IOException, UnsupportedOperationException {
IEntity result = null;
if(entryPointId == null) {
- if(!staticTopologyRepository.isEmpty())
- result = staticTopologyRepository.findAll().get(0);
+ return null;
}
else
result = staticTopologyRepository.select(entryPointId);
@@ -76,62 +170,121 @@ public final class DynamicTopologyViewUtilities {
}
/**
- * Gets the selected entities.
+ * Gets the switched entities.
+ *
+ * @param connectionState
+ * the connection state; not <code>null</code>
+ * @param staticTopologyEntities
+ * the entities; not <code>null</code>
+ * @param topologyStateEntities
+ * the topology state repository; not <code>null</code> but can be empty
+ * @return the switched entities; not <code>null</code> but can be empty
+ * @throws IOException
+ * {@link IOException}
+ * @throws UnsupportedOperationException
+ * {@link UnsupportedOperationException}
+ */
+ public static List<IEntity> getSwitchedEntitiesByConnectionState(ConnectionState connectionState, List<IEntity> staticTopologyEntities, List<IEntity> topologyStateEntities) throws IOException, UnsupportedOperationException {
+
+ List<IEntity> result;
+
+ switch(connectionState) {
+
+ case Ignore:
+ result = staticTopologyEntities;
+ break;
+ case Normal:
+ // REFACTOR 2017-11-06 Renko => Überarbeiten: diese Methode liefert im Moment alle Switches mit isNormalOpen == false
+ result = getAllNormalClosedSwitches(staticTopologyEntities);
+ break;
+ case Active:
+ case NormalWithSwitchState:
+ throw new NotImplementedException(connectionState.name() + NOT_IMPLEMENTED);
+
+ default:
+ throw new InvalidParameterException("connectionState", "The '" + connectionState + "' is invalid!");
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets the topology by entry point entity.
*
+ * @param connectionState
+ * the connection state; not <code>null</code>
* @param selector
* the selector; not <code>null</code>
* @param entryPointEntity
* the entry point entity; not <code>null</code>
- * @param staticTopologyRepository
- * the static topology repository; not <code>null</code> but can be empty
- * @return the selected entities; not <code>null</code> but can be empty
+ * @return the topology by entry point entity; not <code>null</code> but can be empty
*/
- public static Map<Key, IEntity> getSelectedEntities(Selector selector, IEntity entryPointEntity, IRepository<IEntity> staticTopologyRepository) {
+ public static List<IEntity> getTopologyByEntryPointEntity(ConnectionState connectionState, Selector selector, IConductingEquipment entryPointEntity) {
+
+ List<IEntity> result = null;
- Map<Key, IEntity> result = null;
switch(selector) {
- case Above:
- result = getEntities(selector, entryPointEntity);
- break;
- case All:
- result = getSelectedEntities(Selector.Containing, entryPointEntity, staticTopologyRepository);
- result.putAll(getSelectedEntities(Selector.Above, entryPointEntity, staticTopologyRepository));
- result.putAll(getSelectedEntities(Selector.Behind, entryPointEntity, staticTopologyRepository));
- break;
case Behind:
- result = getEntities(selector, entryPointEntity);
+ if(result == null)
+ result = new ArrayList<>();
+ result.addAll(getEntitiesByEntryPointEntity(selector, FetchType.Lazy, entryPointEntity).values());
break;
+ case Above:
+ case All:
case Containing:
- result = getEntities(selector, entryPointEntity);
- break;
case ContainingAndAbove:
- result = getSelectedEntities(Selector.Containing, entryPointEntity, staticTopologyRepository);
- result.putAll(getSelectedEntities(Selector.Above, entryPointEntity, staticTopologyRepository));
- break;
case ContainingAndBehind:
- result = getSelectedEntities(Selector.Containing, entryPointEntity, staticTopologyRepository);
- result.putAll(getSelectedEntities(Selector.Behind, entryPointEntity, staticTopologyRepository));
- break;
-
+ throw new NotImplementedException(selector.name() + NOT_IMPLEMENTED);
default:
- result = new HashMap<>();
+ result = new ArrayList<>();
break;
}
return result;
}
/**
- * Gets the entities.
+ * Gets all normal closed {@link Switch}es (isNormalOpen == false).
+ *
+ * @param staticTopologyEntities
+ * the static topology entities; not <code>null</code>
+ * @return the closed {@link Switch}es; not <code>null</code> but can be empty
+ */
+ private static List<IEntity> getAllNormalClosedSwitches(List<IEntity> staticTopologyEntities) {
+
+ List<IEntity> result = new ArrayList<>(staticTopologyEntities.size());
+
+ /* iterate the static topology entities */
+ for(IEntity entity : staticTopologyEntities) {
+
+ LOGGER.debug("entity " + entity.getName() + " " + entity.getKey().getId().toString());
+
+ /* check type (Switch) */
+ if(entity instanceof Switch) {
+ Switch switchEntity = (Switch) entity;
+ LOGGER.debug("switchEntity.isNormalOpen() " + switchEntity.isNormalOpen());
+ /* Switch -> add, if not isNormalOpen -> closed */
+ if(!switchEntity.isNormalOpen().booleanValue())
+ result.add(switchEntity);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets the containing entities.
*
* @param <E>
* the element type
* @param selector
* the selector; not <code>null</code>
+ * @param fetchType
+ * the fetch type; not <code>null</code>
* @param entryPointEntity
* the entry point entity; not <code>null</code>
* @return the entities
*/
- private static <E extends IEntity> Map<Key, IEntity> getEntities(Selector selector, E entryPointEntity) {
+ private static <E extends IEntity> Map<Key, IEntity> getContainingEntitiesByEntryPointEntity(Selector selector, FetchType fetchType, E entryPointEntity) {
Map<Key, IEntity> result = new HashMap<>();
/* get type information */
@@ -139,9 +292,8 @@ public final class DynamicTopologyViewUtilities {
/* is equipment container */
IEquipmentContainer equipmentContainer = (IEquipmentContainer) entryPointEntity;
- result.putAll(getEntities(selector, equipmentContainer));
+ result.putAll(getEntitiesByEquipmentContainer(selector, fetchType, equipmentContainer));
}
-
else if(IEquipment.class.isAssignableFrom(entryPointEntity.getClass())) {
/* is equipment */
IEquipment equipment = (IEquipment) entryPointEntity;
@@ -149,11 +301,6 @@ public final class DynamicTopologyViewUtilities {
result.put(equipment.getKey(), equipment);
}
- else {
- /* e.g. BaseVoltage */
- // REMIND 2017-10-27 Christian Brunzendorf: keine entity
- }
-
return result;
}
@@ -161,12 +308,20 @@ public final class DynamicTopologyViewUtilities {
* Gets the entities.
*
* @param selector
- * the selector
+ * the selector; not <code>null</code>
+ * @param fetchType
+ * the fetch type; not <code>null</code>
* @param equipmentContainer
* the equipment container
* @return the entities
+ * @throws IllegalArgumentException
+ * Is thrown in the following cases:
+ * <ul>
+ * <li><code>equipmentContainer</code> is <code>null</code></li>
+ * </ul>
+ *
*/
- private static Map<Key, IEntity> getEntities(Selector selector, IEquipmentContainer equipmentContainer) {
+ private static Map<Key, IEntity> getEntitiesByEquipmentContainer(Selector selector, FetchType fetchType, IEquipmentContainer equipmentContainer) throws IllegalArgumentException {
if(equipmentContainer == null) {
throw new IllegalArgumentException("equipmentContainer");
@@ -176,27 +331,23 @@ public final class DynamicTopologyViewUtilities {
switch(selector) {
case Above:
- /* above equipments */
- result.put(equipmentContainer.getKey(), equipmentContainer);
- // result.putAll(getEntities(Selector.Above, equipmentContainer.getSuperEquipmentContainer()));
- // REMIND 2017-10-27 Christian Brunzendorf: ausgehende Knoten verfolgen north Terminals von Eqipments
-
- break;
case Behind:
- /* behind equipments */
- result.putAll(equipmentContainer.getEquipments());
- // REMIND 2017-10-27 Christian Brunzendorf: ausgehende Knoten verfolgen south Terminals von Eqipments
-
- break;
+ throw new NotImplementedException(selector.name() + NOT_IMPLEMENTED);
case Containing:
/* containing equipments */
if(equipmentContainer.getEquipments() != null)
result.putAll(equipmentContainer.getEquipments());
/* containing equipment container */
- for(IEquipmentContainer eContainer : equipmentContainer.getSubEquipmentContainers()) {
- result.put(eContainer.getKey(), eContainer);
- result.putAll(getEntities(selector, eContainer));
+ List<IEquipmentContainer> subEquipmentContainers = equipmentContainer.getSubEquipmentContainers();
+ /* only get entities from next equipment container if fetch type is eager */
+ if(subEquipmentContainers == null)
+ break;
+
+ for(IEquipmentContainer subEquipmentContainer : subEquipmentContainers) {
+ result.put(subEquipmentContainer.getKey(), subEquipmentContainer);
+ if(fetchType == FetchType.Eager)
+ result.putAll(getEntitiesByEquipmentContainer(selector, fetchType, subEquipmentContainer));
}
break;
default:
@@ -205,21 +356,4 @@ public final class DynamicTopologyViewUtilities {
return result;
}
-
- /**
- * Gets the switched entities.
- *
- * @param connectionState
- * the connection state; not <code>null</code>
- * @param entities
- * the entities; can be <code>null</code> or empty
- * @param topologyStateRepository
- * the topology state repository; not <code>null</code> but can be empty
- * @return the switched entities; not <code>null</code> but can be empty
- */
- public static List<IEntity> getSwitchedEntities(ConnectionState connectionState, List<IEntity> entities, IRepository<IEntity> topologyStateRepository) {
-
- return null;
- }
-
} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/Topology_1_View.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/Topology_1_View.java
index 9f2bde47..c234662f 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/Topology_1_View.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/logic/src/main/java/org/eclipse/openk/domain/dynamictopology/logic/dataexchange/view/Topology_1_View.java
@@ -14,13 +14,20 @@
package org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import org.eclipse.openk.common.IVersion;
import org.eclipse.openk.common.Version;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
+import org.eclipse.openk.common.messaging.messages.InvalidParameterException;
+import org.eclipse.openk.domain.dynamictopology.model.ConnectionState;
+import org.eclipse.openk.domain.dynamictopology.model.Selector;
import org.eclipse.openk.domain.statictopology.core.StaticTopologyDefaults;
+import org.eclipse.openk.domain.statictopology.model.IConductingEquipment;
+import org.eclipse.openk.domain.statictopology.model.substation.powertransformer.PowerTransformer;
import org.eclipse.openk.service.core.IServiceContext;
import org.eclipse.openk.service.logic.IServiceLogicController;
import org.eclipse.openk.service.logic.dataexchange.view.AbstractView;
@@ -61,18 +68,80 @@ public final class Topology_1_View extends AbstractView<ViewConfiguration, List<
}
// Methods
- @Override
- public List<? extends IEntity> executeQuery(Topology_1_QueryParameters parameters) throws IOException {
+ /**
+ * Creates the topology view.
+ *
+ * @param connectionState
+ * the connection state; not <code>null</code>
+ * @param selector
+ * the selector; not <code>null</code>
+ * @param entryPointId
+ * the entry point id; not <code>null</code>
+ * @param repository
+ * the repository; can be <code>null</code> or empty
+ * @return the list; can be <code>null</code>
+ * @throws InvalidParameterException
+ * the invalid parameter exception
+ * Is thrown in the following cases:
+ * <ul>
+ * <li><code>entryPointId</code> is invalid</li>
+ * </ul>
+ * @throws IOException
+ * {@link IOException}
+ * @throws UnsupportedOperationException
+ * {@link UnsupportedOperationException}
+ */
+ private List<IEntity> createView(ConnectionState connectionState, Selector selector, UUID entryPointId, IRepository<IEntity> repository) throws InvalidParameterException, IOException, UnsupportedOperationException {
List<IEntity> result = null;
- IRepository<IEntity> staticTopologyRepository;
- staticTopologyRepository = (IRepository<IEntity>) ((IServiceLogicController<?>) getContext().getServiceController()).getNewRepository(StaticTopologyDefaults.REPOSITORY_KEY_STATIC_TOPOLOGY);
+ if(repository != null) {
+
+ /* get entry point entity from parameter */
+ IConductingEquipment entryPointEntity = (IConductingEquipment) DynamicTopologyViewUtilities.getEntryPointEntity(entryPointId, repository);
+
+ /* found the the entry point id? */
+ if(entryPointEntity != null && entryPointEntity.getClass().equals(PowerTransformer.class)) {
+ result = new ArrayList<>();
+ result.addAll(DynamicTopologyViewUtilities.getTopologyByEntryPointEntity(connectionState, selector, entryPointEntity));
+ }
+ else {
+ getLogger().error(new InvalidParameterException("entryPointId", "The entry-point-id '" + entryPointId + "' couldn't be found or isn't a power transformer!"));
+ throw new InvalidParameterException("entryPointId", "The entry-point-id is invalid!");
+ }
+ }
+
+ return result;
+ }
- if(staticTopologyRepository != null) {
- List<IEntity> entities = (List<IEntity>) staticTopologyRepository.findAll();
+ @Override
+ public List<? extends IEntity> executeQuery(Topology_1_QueryParameters parameters) throws IllegalArgumentException, IOException {
+
+ List<IEntity> result = null;
- result = entities;
+ if(parameters == null) {
+ throw new IllegalArgumentException("parameters", new NullPointerException());
+ }
+ else {
+
+ IRepository<IEntity> staticTopologyRepository = (IRepository<IEntity>) ((IServiceLogicController<?>) getContext().getServiceController()).getNewRepository(StaticTopologyDefaults.REPOSITORY_KEY_STATIC_TOPOLOGY);
+
+ ConnectionState connectionState = parameters.getConnectionState();
+ Selector selector = parameters.getSelector();
+ UUID entryPointId = parameters.getEntryPointId();
+
+ /* check currently supported parameters and get the topology */
+ if((connectionState == ConnectionState.Ignore) && (selector == Selector.All))
+ result = (List<IEntity>) staticTopologyRepository.findAll();
+ else if((connectionState == ConnectionState.Normal) && (selector == Selector.Behind) && entryPointId != null)
+ try {
+ result = createView(connectionState, selector, entryPointId, staticTopologyRepository);
+ }
+ catch(InvalidParameterException exception) {
+ throw new IllegalArgumentException(exception.getMessage(), exception);
+ }
+ else
+ throw new IllegalArgumentException("parameters combination", new UnsupportedOperationException());
}
return result;
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/dynamic-topology-service.config b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/dynamic-topology-service.config
index f1cf615d..1879d782 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/dynamic-topology-service.config
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/dynamic-topology-service.config
@@ -2,141 +2,141 @@
DP|AcLineSegments|3|XML_1-0.scheme=http
DP|AcLineSegments|3|XML_1-0.host=localhost
DP|AcLineSegments|3|XML_1-0.port=9518
-DP|AcLineSegments|3|XML_1-0.base-path=source-system/topology
+DP|AcLineSegments|3|XML_1-0.base-path=source-system/electricity/static-topology
# BaseVoltages, V3
DP|BaseVoltages|3|XML_1-0.scheme=http
DP|BaseVoltages|3|XML_1-0.host=localhost
DP|BaseVoltages|3|XML_1-0.port=9518
-DP|BaseVoltages|3|XML_1-0.base-path=source-system/topology
+DP|BaseVoltages|3|XML_1-0.base-path=source-system/electricity/static-topology
# Bays, V2
DP|Bays|2|XML_1-0.scheme=http
DP|Bays|2|XML_1-0.host=localhost
DP|Bays|2|XML_1-0.port=9518
-DP|Bays|2|XML_1-0.base-path=source-system/topology
+DP|Bays|2|XML_1-0.base-path=source-system/electricity/static-topology
# Breakers, V3
DP|Breakers|3|XML_1-0.scheme=http
DP|Breakers|3|XML_1-0.host=localhost
DP|Breakers|3|XML_1-0.port=9518
-DP|Breakers|3|XML_1-0.base-path=source-system/topology
+DP|Breakers|3|XML_1-0.base-path=source-system/electricity/static-topology
# BusbarSections, V3
DP|BusbarSections|3|XML_1-0.scheme=http
DP|BusbarSections|3|XML_1-0.host=localhost
DP|BusbarSections|3|XML_1-0.port=9518
-DP|BusbarSections|3|XML_1-0.base-path=source-system/topology
+DP|BusbarSections|3|XML_1-0.base-path=source-system/electricity/static-topology
# Disconnectors, V3
DP|Disconnectors|3|XML_1-0.scheme=http
DP|Disconnectors|3|XML_1-0.host=localhost
DP|Disconnectors|3|XML_1-0.port=9518
-DP|Disconnectors|3|XML_1-0.base-path=source-system/topology
+DP|Disconnectors|3|XML_1-0.base-path=source-system/electricity/static-topology
# EarthFaultCompensators, V1
DP|EarthFaultCompensators|1|XML_1-0.scheme=http
DP|EarthFaultCompensators|1|XML_1-0.host=localhost
DP|EarthFaultCompensators|1|XML_1-0.port=9518
-DP|EarthFaultCompensators|1|XML_1-0.base-path=source-system/topology
+DP|EarthFaultCompensators|1|XML_1-0.base-path=source-system/electricity/static-topology
# EnergyConsumers, V3
DP|EnergyConsumers|3|XML_1-0.scheme=http
DP|EnergyConsumers|3|XML_1-0.host=localhost
DP|EnergyConsumers|3|XML_1-0.port=9518
-DP|EnergyConsumers|3|XML_1-0.base-path=source-system/topology
+DP|EnergyConsumers|3|XML_1-0.base-path=source-system/electricity/static-topology
# EnergySources, V3
DP|EnergySources|3|XML_1-0.scheme=http
DP|EnergySources|3|XML_1-0.host=localhost
DP|EnergySources|3|XML_1-0.port=9518
-DP|EnergySources|3|XML_1-0.base-path=source-system/topology
+DP|EnergySources|3|XML_1-0.base-path=source-system/electricity/static-topology
# GeographicalRegions, V3
DP|GeographicalRegions|3|XML_1-0.scheme=http
DP|GeographicalRegions|3|XML_1-0.host=localhost
DP|GeographicalRegions|3|XML_1-0.port=9518
-DP|GeographicalRegions|3|XML_1-0.base-path=source-system/topology
+DP|GeographicalRegions|3|XML_1-0.base-path=source-system/electricity/static-topology
# Grounds, V1
DP|Grounds|1|XML_1-0.scheme=http
DP|Grounds|1|XML_1-0.host=localhost
DP|Grounds|1|XML_1-0.port=9518
-DP|Grounds|1|XML_1-0.base-path=source-system/topology
+DP|Grounds|1|XML_1-0.base-path=source-system/electricity/static-topology
# GroundingImpedances, V1
DP|GroundingImpedances|1|XML_1-0.scheme=http
DP|GroundingImpedances|1|XML_1-0.host=localhost
DP|GroundingImpedances|1|XML_1-0.port=9518
-DP|GroundingImpedances|1|XML_1-0.base-path=source-system/topology
+DP|GroundingImpedances|1|XML_1-0.base-path=source-system/electricity/static-topology
# Junctions, V3
DP|Junctions|3|XML_1-0.scheme=http
DP|Junctions|3|XML_1-0.host=localhost
DP|Junctions|3|XML_1-0.port=9518
-DP|Junctions|3|XML_1-0.base-path=source-system/topology
+DP|Junctions|3|XML_1-0.base-path=source-system/electricity/static-topology
# Lines
DP|Lines|3|XML_1-0.scheme=http
DP|Lines|3|XML_1-0.host=localhost
DP|Lines|3|XML_1-0.port=9518
-DP|Lines|3|XML_1-0.base-path=source-system/topology
+DP|Lines|3|XML_1-0.base-path=source-system/electricity/static-topology
# LineTypes, V2
DP|LineTypes|2|XML_1-0.scheme=http
DP|LineTypes|2|XML_1-0.host=localhost
DP|LineTypes|2|XML_1-0.port=9518
-DP|LineTypes|2|XML_1-0.base-path=source-system/topology
+DP|LineTypes|2|XML_1-0.base-path=source-system/electricity/static-topology
# LoadBreakSwitches, V3
DP|LoadBreakSwitches|3|XML_1-0.scheme=http
DP|LoadBreakSwitches|3|XML_1-0.host=localhost
DP|LoadBreakSwitches|3|XML_1-0.port=9518
-DP|LoadBreakSwitches|3|XML_1-0.base-path=source-system/topology
+DP|LoadBreakSwitches|3|XML_1-0.base-path=source-system/electricity/static-topology
# PetersenCoils, V1
DP|PetersenCoils|1|XML_1-0.scheme=http
DP|PetersenCoils|1|XML_1-0.host=localhost
DP|PetersenCoils|1|XML_1-0.port=9518
-DP|PetersenCoils|1|XML_1-0.base-path=source-system/topology
+DP|PetersenCoils|1|XML_1-0.base-path=source-system/electricity/static-topology
# Plants, V2
DP|Plants|2|XML_1-0.scheme=http
DP|Plants|2|XML_1-0.host=localhost
DP|Plants|2|XML_1-0.port=9518
-DP|Plants|2|XML_1-0.base-path=source-system/topology
+DP|Plants|2|XML_1-0.base-path=source-system/electricity/static-topology
# PowerTransformers
DP|PowerTransformers|3|XML_1-0.scheme=http
DP|PowerTransformers|3|XML_1-0.host=localhost
DP|PowerTransformers|3|XML_1-0.port=9518
-DP|PowerTransformers|3|XML_1-0.base-path=source-system/topology
+DP|PowerTransformers|3|XML_1-0.base-path=source-system/electricity/static-topology
# SubGeographicalRegions, V2
DP|SubGeographicalRegions|2|XML_1-0.scheme=http
DP|SubGeographicalRegions|2|XML_1-0.host=localhost
DP|SubGeographicalRegions|2|XML_1-0.port=9518
-DP|SubGeographicalRegions|2|XML_1-0.base-path=source-system/topology
+DP|SubGeographicalRegions|2|XML_1-0.base-path=source-system/electricity/static-topology
# Substations, V3
DP|Substations|3|XML_1-0.scheme=http
DP|Substations|3|XML_1-0.host=localhost
DP|Substations|3|XML_1-0.port=9518
-DP|Substations|3|XML_1-0.base-path=source-system/topology
+DP|Substations|3|XML_1-0.base-path=source-system/electricity/static-topology
# SubstationTypes, V3
DP|SubstationTypes|3|XML_1-0.scheme=http
DP|SubstationTypes|3|XML_1-0.host=localhost
DP|SubstationTypes|3|XML_1-0.port=9518
-DP|SubstationTypes|3|XML_1-0.base-path=source-system/topology
+DP|SubstationTypes|3|XML_1-0.base-path=source-system/electricity/static-topology
# Switches, V2
DP|Switches|2|XML_1-0.scheme=http
DP|Switches|2|XML_1-0.host=localhost
DP|Switches|2|XML_1-0.port=9518
-DP|Switches|2|XML_1-0.base-path=source-system/topology
+DP|Switches|2|XML_1-0.base-path=source-system/electricity/static-topology
# TopologyId, V1
DP|TopologyId|1|XML_1-0.scheme=http
DP|TopologyId|1|XML_1-0.host=localhost
DP|TopologyId|1|XML_1-0.port=9518
-DP|TopologyId|1|XML_1-0.base-path=source-system/topology
+DP|TopologyId|1|XML_1-0.base-path=source-system/electricity/static-topology
# VoltageLevels, V3
DP|VoltageLevels|3|XML_1-0.scheme=http
DP|VoltageLevels|3|XML_1-0.host=localhost
DP|VoltageLevels|3|XML_1-0.port=9518
-DP|VoltageLevels|3|XML_1-0.base-path=source-system/topology
+DP|VoltageLevels|3|XML_1-0.base-path=source-system/electricity/static-topology
# Measurements
DP|Measurements|2|XML_1-0.scheme=http
DP|Measurements|2|XML_1-0.host=localhost
DP|Measurements|2|XML_1-0.port=9511
-DP|Measurements|2|XML_1-0.base-path=source-system/measurement
+DP|Measurements|2|XML_1-0.base-path=source-system/electricity/topology-state
# MeasurementPonts
DP|MeasurementPoints|1|XML_1-0.scheme=http
DP|MeasurementPoints|1|XML_1-0.host=localhost
DP|MeasurementPoints|1|XML_1-0.port=9511
-DP|MeasurementPoints|1|XML_1-0.base-path=source-system/measurement
+DP|MeasurementPoints|1|XML_1-0.base-path=source-system/electricity/topology-state
# SwitchStates
DP|SwitchStates|3|XML_1-0.scheme=http
DP|SwitchStates|3|XML_1-0.host=localhost
DP|SwitchStates|3|XML_1-0.port=9511
-DP|SwitchStates|3|XML_1-0.base-path=source-system/measurement
+DP|SwitchStates|3|XML_1-0.base-path=source-system/electricity/topology-state
# ServiceController
SC|dynamic-topology|1.configuration-type=OK \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/DynamicTopologyService.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/DynamicTopologyService.java
index 6abafb6e..09723866 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/DynamicTopologyService.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/DynamicTopologyService.java
@@ -14,8 +14,11 @@
package org.eclipse.openk.domain.dynamictopology.service;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import javax.annotation.PostConstruct;
@@ -25,9 +28,14 @@ import org.eclipse.openk.common.collection.AlreadyExistingItemException;
import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
+import org.eclipse.openk.common.value.parameter.ParameterUtilities;
+import org.eclipse.openk.common.value.parameter.exceptions.InvalidParametersException;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.importer.Topology_2_Xml_ImportParameters;
import org.eclipse.openk.domain.statictopology.core.StaticTopologyDefaults;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
+import org.eclipse.openk.domain.topologystate.adapter.dataexchange.importer.MeasurementPoints_1_Xml_ImportParameters;
+import org.eclipse.openk.domain.topologystate.adapter.dataexchange.importer.Measurements_2_Xml_ImportParameters;
+import org.eclipse.openk.domain.topologystate.core.TopologyStateDefaults;
import org.eclipse.openk.service.adapter.dataexchange.deserializer.IDeserializerFactory;
import org.eclipse.openk.service.adapter.dataexchange.importer.IImporter;
import org.eclipse.openk.service.adapter.dataexchange.importer.IImporterFactory;
@@ -50,6 +58,7 @@ import org.springframework.stereotype.Service;
* The application starts here.
*
* @author Christian Brunzendorf
+ * @author 2017-11-01 Renko Ortgies
*/
@Service
@SpringBootApplication(scanBasePackages = { "com.btc", "org.eclipse" })
@@ -97,6 +106,9 @@ public class DynamicTopologyService extends AbstractServiceInfrastructureControl
List<? extends IEntity> imports = null;
IRepository<IEntity> staticTopologyRepository = null;
+ IRepository<IEntity> topologyStateRepository = null;
+
+ StringBuffer measurementIds = null;
/* import static topology */
{
@@ -125,71 +137,94 @@ public class DynamicTopologyService extends AbstractServiceInfrastructureControl
}
repositories.put(StaticTopologyDefaults.REPOSITORY_KEY_STATIC_TOPOLOGY, staticTopologyRepository);
- // /* add topology repository */
- // {
- // IRepository<IEntity> topologyStateRepository = new InMemoryRepository<>();
- //
- // IImporter<ImporterConfiguration, List<IEntity>, MeasurementPoints_1_Xml_ImportParameters> measurementPointsImporter = getImporterFactory().createImporter(TopologyStateDefaults.SCOPE_MEASUREMENT_POINTS, new Version(1), DataExchangeFormat.FORMAT_XML_1_0);
- // IImporter<ImporterConfiguration, List<IEntity>, Measurements_2_Xml_ImportParameters> measurementsImporter = getImporterFactory().createImporter(TopologyStateDefaults.SCOPE_MEASUREMENTS, new Version(2), DataExchangeFormat.FORMAT_XML_1_0);
- //
- // // REMIND 2017-10-26 Christian Brunzendorf: woher wissen wir die?
- // UUID stationId = UUID.fromString("fadcdf74-6f15-4d3d-89d7-c015bf1987a7");
- // LOGGER.debug("For measurement point import test. station-id: " + stationId.toString());
- //
- // List<IEntity> importList = new ArrayList<>();
- // Measurements_2_Xml_ImportParameters measurementsImportParameters = null;
- // MeasurementPoints_1_Xml_ImportParameters measurementPointsImportParameters = null;
- // Map<String, String> mesurementsImportProperties = new HashMap<>();
- // Map<String, String> mesurementPointsImportProperties = new HashMap<>(2);
- //
- // {
- // mesurementPointsImportProperties.put(MeasurementPoints_1_Xml_ImportParameters.PARAMETER_STATION_ID, stationId.toString());
- //
- // try {
- // measurementPointsImportParameters = ParameterUtilities.createParameters(MeasurementPoints_1_Xml_ImportParameters.class, mesurementPointsImportProperties);
- // }
- // catch(InvalidParametersException e) {
- // LOGGER.debug("Can't create measurementPointsImportParameters");
- // }
- // }
- //
- // {
- // mesurementsImportProperties.put(Measurements_2_Xml_ImportParameters.PARAMETER_MEASUREMENT_POINT_IDS, "043d903a-5702-4451-9613-4476e57e6a6d|1c0b7ae1-1d28-4599-8659-ddda708b31c1|ce9e868a-d575-4688-aef4-fb217919ec2e");
- // // mesurementsImportProperties.put(Measurements_2_Xml_ImportParameters.PARAMETER_START_TIME, this.getTimer().getCurrentDateTime().toString());
- // // mesurementsImportProperties.put(Measurements_2_Xml_ImportParameters.PARAMETER_END_TIME, this.getTimer().getCurrentDateTime().toString());
- // try {
- // measurementsImportParameters = ParameterUtilities.createParameters(Measurements_2_Xml_ImportParameters.class, mesurementsImportProperties);
- // }
- // catch(InvalidParametersException e) {
- // LOGGER.debug("Can't create measurementsImportParameters");
- // }
- // }
- //
- // if(measurementsImporter != null && measurementPointsImporter != null) {
- // try {
- // importList.addAll(measurementPointsImporter.doImport(measurementPointsImportParameters));
- // importList.addAll(measurementsImporter.doImport(measurementsImportParameters));
- // }
- // catch(IOException exception) {
- // LOGGER.debug("I/O-Exception during import");
- // }
- // }
- // else {
- // if(measurementPointsImporter == null)
- // throw new UnsupportedOperationException("measurementPointsImporter", new NullPointerException());
- // else
- // throw new UnsupportedOperationException("measurementsImporter", new NullPointerException());
- // }
- //
- // try {
- // topologyStateRepository.insert(importList);
- // }
- // catch(AlreadyExistingItemException | IOException exception) {
- // LOGGER.debug("already exist");
- // }
- //
- // repositories.put(TopologyStateDefaults.REPOSITORY_KEY_TOPOLOGY_STATE, topologyStateRepository);
- // }
+ // REFACTOR 2017-11-01 Renko/Christian => war ab hier auskommentiert; wieder rein genommen; mit Christian abstimmen
+
+ /* add topology state repository */
+ {
+ topologyStateRepository = new InMemoryRepository<>();
+
+ IImporter<ImporterConfiguration, List<IEntity>, MeasurementPoints_1_Xml_ImportParameters> measurementPointsImporter = getImporterFactory().createImporter(TopologyStateDefaults.SCOPE_MEASUREMENT_POINTS, new Version(1), DataExchangeFormat.FORMAT_XML_1_0);
+ IImporter<ImporterConfiguration, List<IEntity>, Measurements_2_Xml_ImportParameters> measurementsImporter = getImporterFactory().createImporter(TopologyStateDefaults.SCOPE_MEASUREMENTS, new Version(2), DataExchangeFormat.FORMAT_XML_1_0);
+
+ // REMIND 2017-10-26 Christian Brunzendorf: woher wissen wir die?
+ UUID stationId = UUID.fromString("fadcdf74-6f15-4d3d-89d7-c015bf1987a7");
+ LOGGER.debug("For measurement point import test. station-id: " + stationId.toString());
+
+ List<IEntity> importList = new ArrayList<>();
+ Measurements_2_Xml_ImportParameters measurementsImportParameters = null;
+ MeasurementPoints_1_Xml_ImportParameters measurementPointsImportParameters = null;
+ Map<String, String> mesurementsImportProperties = new HashMap<>();
+ Map<String, String> mesurementPointsImportProperties = new HashMap<>(2);
+
+ {
+ /* measurement points import */
+ mesurementPointsImportProperties.put(MeasurementPoints_1_Xml_ImportParameters.PARAMETER_STATION_ID, stationId.toString());
+
+ try {
+ measurementPointsImportParameters = ParameterUtilities.createParameters(MeasurementPoints_1_Xml_ImportParameters.class, mesurementPointsImportProperties);
+ }
+ catch(InvalidParametersException e) {
+ LOGGER.debug("Can't create measurementPointsImportParameters");
+ }
+
+ if(measurementPointsImporter != null) {
+ try {
+ List<IEntity> measurementPoints = measurementPointsImporter.doImport(measurementPointsImportParameters);
+ if(measurementPoints != null) {
+ importList.addAll(measurementPoints);
+
+ /* save ids for measurement import */
+ measurementIds = new StringBuffer();
+ for(IEntity iEntity : measurementPoints) {
+ measurementIds.append(iEntity.getKey().getId().toString());
+ measurementIds.append("|");
+ }
+ }
+ }
+ catch(IOException exception) {
+ LOGGER.debug("I/O-Exception during measurment points import");
+ }
+ }
+ else
+ throw new UnsupportedOperationException("measurementPointsImporter", new NullPointerException());
+ }
+
+ {
+ /* measurements import */
+ mesurementsImportProperties.put(Measurements_2_Xml_ImportParameters.PARAMETER_MEASUREMENT_POINT_IDS, measurementIds.toString());
+ // mesurementsImportProperties.put(Measurements_2_Xml_ImportParameters.PARAMETER_START_TIME, this.getTimer().getCurrentDateTime().toString());
+ // mesurementsImportProperties.put(Measurements_2_Xml_ImportParameters.PARAMETER_END_TIME, this.getTimer().getCurrentDateTime().toString());
+ try {
+ measurementsImportParameters = ParameterUtilities.createParameters(Measurements_2_Xml_ImportParameters.class, mesurementsImportProperties);
+ }
+ catch(InvalidParametersException e) {
+ LOGGER.debug("Can't create measurementsImportParameters");
+ }
+
+ if(measurementsImporter != null) {
+ try {
+ List<IEntity> measurements = measurementsImporter.doImport(measurementsImportParameters);
+ if(measurements != null)
+ importList.addAll(measurements);
+ }
+ catch(IOException exception) {
+ LOGGER.debug("I/O-Exception during measurements import");
+ }
+ }
+ else
+ throw new UnsupportedOperationException("measurementsImporter", new NullPointerException());
+
+ }
+
+ try {
+ topologyStateRepository.insert(importList);
+ }
+ catch(AlreadyExistingItemException | IOException exception) {
+ LOGGER.debug("already exist");
+ }
+
+ repositories.put(TopologyStateDefaults.REPOSITORY_KEY_TOPOLOGY_STATE, topologyStateRepository);
+ }
}
/**
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/mapper/MapperFactory.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/mapper/MapperFactory.java
index 3e82771a..23a03cdf 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/mapper/MapperFactory.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/mapper/MapperFactory.java
@@ -17,7 +17,6 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.openk.cim.cim17v07.Cim17v07;
-import org.eclipse.openk.cim.profile.openkonsequenz.OpenKonsequenz;
import org.eclipse.openk.common.IContext;
import org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.mapper.Topology_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.dynamictopology.core.DynamicTopologyDefaults;
@@ -52,8 +51,6 @@ import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.stati
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.BusbarSections_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.Disconnectors_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.EarthFaultCompensators_StaticTopology2_Cim17v07_Mapper;
-import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.ElementTypes_StaticTopology2_OpenKonsequenz_Mapper;
-import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.Elements_StaticTopology2_OpenKonsequenz_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.EnergyConsumers_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.EnergySources_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.GeographicalRegions_StaticTopology2_Cim17v07_Mapper;
@@ -65,6 +62,8 @@ import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.stati
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.LoadBreakSwitches_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.PetersenCoils_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.Plants_StaticTopology2_Cim17v07_Mapper;
+import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.PowerSystemResourceTypes_StaticTopology2_Cim17v07_Mapper;
+import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.PowerSystemResources_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.PowerTransformers_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper;
import org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2.SubstationTypes_StaticTopology2_Cim17v07_Mapper;
@@ -135,16 +134,16 @@ public final class MapperFactory extends AbstractMapperFactory {
String key;
Map<String, Class<?>> result = new HashMap<>();
- /* elements export mapper */
+ /* PowerSystemResources export mapper */
{
- key = AbstractMapper.createKey(DynamicTopologyDefaults.SCOPE_ELEMENTS, TopologyState2.INSTANCE, Cim17v07.INSTANCE);
- result.put(key, Elements_StaticTopology2_OpenKonsequenz_Mapper.class);
+ key = AbstractMapper.createKey(DynamicTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE);
+ result.put(key, PowerSystemResources_StaticTopology2_Cim17v07_Mapper.class);
}
- /* element-types export mapper */
+ /* PowerSystemResourceTypes export mapper */
{
- key = AbstractMapper.createKey(DynamicTopologyDefaults.SCOPE_ELEMENT_TYPES, TopologyState2.INSTANCE, OpenKonsequenz.INSTANCE);
- result.put(key, ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.class);
+ key = AbstractMapper.createKey(DynamicTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCE_TYPES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE);
+ result.put(key, PowerSystemResourceTypes_StaticTopology2_Cim17v07_Mapper.class);
}
/* topology export mapper */
@@ -221,17 +220,17 @@ public final class MapperFactory extends AbstractMapperFactory {
result.put(key, EnergySources_StaticTopology2_Cim17v07_Mapper.class);
}
- /* Elements_StaticTopology2_OpenKonsequenz_Mapper */
- {
- key = AbstractMapper.createKey(StaticTopologyDefaults.SCOPE_ELEMENTS, StaticTopology2.INSTANCE, OpenKonsequenz.INSTANCE);
- result.put(key, Elements_StaticTopology2_OpenKonsequenz_Mapper.class);
- }
-
- /* ElementType_StaticTopology2_OpenKonsequenz_Mapper */
- {
- key = AbstractMapper.createKey(StaticTopologyDefaults.SCOPE_ELEMENT_TYPES, StaticTopology2.INSTANCE, OpenKonsequenz.INSTANCE);
- result.put(key, ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.class);
- }
+ // /* PowerSystemResources_StaticTopology2_Cim17v07_Mapper */
+ // {
+ // key = AbstractMapper.createKey(StaticTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE);
+ // result.put(key, PowerSystemResources_StaticTopology2_Cim17v07_Mapper.class);
+ // }
+ //
+ // /* PowerSystemResourceTypes_StaticTopology2_Cim17v07_Mapper */
+ // {
+ // key = AbstractMapper.createKey(StaticTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCE_TYPES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE);
+ // result.put(key, PowerSystemResourceTypes_StaticTopology2_Cim17v07_Mapper.class);
+ // }
/* GeographicalRegions_StaticTopology2_Cim17v07_Mapper */
{
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/responder/ResponderFactory.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/responder/ResponderFactory.java
index 56225f8d..4b38a084 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/responder/ResponderFactory.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/responder/ResponderFactory.java
@@ -19,8 +19,8 @@ import java.util.Map;
import org.eclipse.openk.common.IContext;
import org.eclipse.openk.common.dataexchange.CommunicationTechnology;
import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
-import org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder.ConductingEquipmentTypes_1_Xml_Responder;
-import org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder.ConductingEquipments_1_Xml_Responder;
+import org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder.PowerSystemResourceTypes_1_Xml_Responder;
+import org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder.PowerSystemResources_1_Xml_Responder;
import org.eclipse.openk.domain.dynamictopology.adapter.dataexchange.responder.Topology_2_Rdf_Responder;
import org.eclipse.openk.domain.dynamictopology.core.DynamicTopologyDefaults;
import org.eclipse.openk.service.adapter.dataexchange.responder.AbstractResponder;
@@ -51,14 +51,14 @@ public final class ResponderFactory extends AbstractResponderFactory {
/* create ConductingEquipments_1_Xml_Responder */
{
- key = AbstractResponder.createKey(DynamicTopologyDefaults.SCOPE_ELEMENTS, ConductingEquipments_1_Xml_Responder.VERSION, CommunicationTechnology.REST, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
- result.put(key, ConductingEquipments_1_Xml_Responder.class);
+ key = AbstractResponder.createKey(DynamicTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCES, PowerSystemResources_1_Xml_Responder.VERSION, CommunicationTechnology.REST, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ result.put(key, PowerSystemResources_1_Xml_Responder.class);
}
/* create ConductingEquipmentTypes_1_Xml_Responder */
{
- key = AbstractResponder.createKey(DynamicTopologyDefaults.SCOPE_ELEMENT_TYPES, ConductingEquipmentTypes_1_Xml_Responder.VERSION, CommunicationTechnology.REST, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
- result.put(key, ConductingEquipmentTypes_1_Xml_Responder.class);
+ key = AbstractResponder.createKey(DynamicTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCE_TYPES, PowerSystemResourceTypes_1_Xml_Responder.VERSION, CommunicationTechnology.REST, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ result.put(key, PowerSystemResourceTypes_1_Xml_Responder.class);
}
/* create Topology_2_Rdf_Responder */
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/serializer/SerializerFactory.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/serializer/SerializerFactory.java
index 6403fe48..6f64f7c0 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/serializer/SerializerFactory.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/serializer/SerializerFactory.java
@@ -51,13 +51,13 @@ public final class SerializerFactory extends AbstractSerializerFactory {
// REMIND 2017-10-24 Christian Brunzendorf: Benötigt der Serializer eine Version? (wie der Mapper)
/* ConductingEquipments */
{
- key = AbstractSerializer.createKey(DynamicTopologyDefaults.SCOPE_ELEMENTS, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ key = AbstractSerializer.createKey(DynamicTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCES, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
result.put(key, CimXmlSerializer.class);
}
/* ConductingEquipmentTypes */
{
- key = AbstractSerializer.createKey(DynamicTopologyDefaults.SCOPE_ELEMENT_TYPES, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ key = AbstractSerializer.createKey(DynamicTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCE_TYPES, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
result.put(key, CimXmlSerializer.class);
}
diff --git a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/view/ViewFactory.java b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/view/ViewFactory.java
index ce062e97..850b69e7 100644
--- a/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/view/ViewFactory.java
+++ b/cim-cache/org.eclipse.openk.domain.dynamic-topology/service/src/main/java/org/eclipse/openk/domain/dynamictopology/service/dataexchange/view/ViewFactory.java
@@ -17,8 +17,8 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.openk.common.IContext;
-import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.ConductingEquipmentTypes_1_View;
-import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.ConductingEquipments_1_View;
+import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.PowerSystemResourceTypes_1_View;
+import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.PowerSystemResources_1_View;
import org.eclipse.openk.domain.dynamictopology.logic.dataexchange.view.Topology_1_View;
import org.eclipse.openk.service.core.IServiceContext;
import org.eclipse.openk.service.logic.dataexchange.view.AbstractView;
@@ -48,14 +48,14 @@ public final class ViewFactory extends AbstractViewFactory {
/* create ConductingEquipments_1_View */
{
- key = AbstractView.createKey(ConductingEquipments_1_View.SCOPE, ConductingEquipments_1_View.VERSION);
- result.put(key, ConductingEquipments_1_View.class);
+ key = AbstractView.createKey(PowerSystemResources_1_View.SCOPE, PowerSystemResources_1_View.VERSION);
+ result.put(key, PowerSystemResources_1_View.class);
}
/* create ConductingEquipmentTypes_1_View */
{
- key = AbstractView.createKey(ConductingEquipmentTypes_1_View.SCOPE, ConductingEquipmentTypes_1_View.VERSION);
- result.put(key, ConductingEquipmentTypes_1_View.class);
+ key = AbstractView.createKey(PowerSystemResourceTypes_1_View.SCOPE, PowerSystemResourceTypes_1_View.VERSION);
+ result.put(key, PowerSystemResourceTypes_1_View.class);
}
/* create Topology_1_View */
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementTypesResponder.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementTypesResponder.java
index 5391d36d..c9432c46 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementTypesResponder.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementTypesResponder.java
@@ -44,7 +44,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Inge Seidel
*/
@RestController
-@RequestMapping(path = "/domain/topology")
+@RequestMapping(path = "/domain/electricity/static-topology")
public final class ElementTypesResponder extends AbstractTopologyResponder<ICimEntity, List<ICimEntity>, TopologyRequestParameters> {
// Constants
@@ -58,7 +58,7 @@ public final class ElementTypesResponder extends AbstractTopologyResponder<ICimE
// Constructors
public ElementTypesResponder() {
- super(StaticTopologyDefaults.SCOPE_ELEMENT_TYPES, VERSION, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ super(StaticTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCE_TYPES, VERSION, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
}
// Methods
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementsResponder.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementsResponder.java
index bb3e137d..50ea5280 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementsResponder.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/ElementsResponder.java
@@ -44,7 +44,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Inge Seidel
*/
@RestController
-@RequestMapping(path = "/domain/topology")
+@RequestMapping(path = "/domain/electricity/static-topology")
public final class ElementsResponder extends AbstractTopologyResponder<ICimEntity, List<ICimEntity>, ElementsRequestParameters> {
// Constants
@@ -58,7 +58,7 @@ public final class ElementsResponder extends AbstractTopologyResponder<ICimEntit
// Constructors
public ElementsResponder() {
- super(StaticTopologyDefaults.SCOPE_ELEMENTS, VERSION, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ super(StaticTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCES, VERSION, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
}
// Methods
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/TopologyResponder.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/TopologyResponder.java
index 15e98e05..37e30ae3 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/TopologyResponder.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/exporter/TopologyResponder.java
@@ -44,7 +44,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Inge Seidel
*/
@RestController
-@RequestMapping(path = "/domain")
+@RequestMapping(path = "/domain/electricity/static-topology")
public final class TopologyResponder extends AbstractTopologyResponder<ICimEntity, List<ICimEntity>, TopologyRequestParameters> {
// Constants
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/importer/Topology_2_Xml_Importer.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/importer/Topology_2_Xml_Importer.java
index a8676deb..f8644936 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/importer/Topology_2_Xml_Importer.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/importer/Topology_2_Xml_Importer.java
@@ -24,7 +24,6 @@ import java.util.UUID;
import org.eclipse.openk.common.IVersion;
import org.eclipse.openk.common.Version;
import org.eclipse.openk.common.dataexchange.DataExchangeFormat;
-import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.model.IModelDefinition;
@@ -187,9 +186,10 @@ public final class Topology_2_Xml_Importer extends AbstractImporter<ImporterConf
protected List<IEntity> mapToImportData(TopologyData transferData, Topology_2_Xml_ImportParameters importParameters) throws IOException {
List<IEntity> result = null;
- Map<Key, IEntity> connectivityNodes = new HashMap<>();
- Map<Key, IEntity> equipmentContainers = new HashMap<>();
- Map<Key, IEntity> propertyEntities = new HashMap<>();
+ Map<UUID, IEntity> connectivityNodes = new HashMap<>();
+ Map<UUID, IEquipmentContainer> equipmentContainers = new HashMap<>();
+ Map<UUID, IEquipment> conductingEquipments = new HashMap<>();
+ Map<UUID, IEntity> propertyEntities = new HashMap<>();
if((transferData != null) && (!transferData.entities.isEmpty())) {
result = new ArrayList<>();
@@ -205,19 +205,20 @@ public final class Topology_2_Xml_Importer extends AbstractImporter<ImporterConf
if(entity instanceof IConductingEquipment) {
/* equipment like breakers */
StaticTopologyUtilities.add(connectivityNodes, (IConductingEquipment) entity);
- StaticTopologyUtilities.add(equipmentContainers, (IConductingEquipment) entity);
+ StaticTopologyUtilities.add(conductingEquipments, (IEquipment) entity);
}
else
- StaticTopologyUtilities.add(equipmentContainers, (IEquipment) entity);
+ StaticTopologyUtilities.add(conductingEquipments, (IEquipment) entity);
}
else
- propertyEntities.put(entity.getKey(), entity);
+ propertyEntities.put(entity.getKey().getId(), entity);
result.add(entity);
}
}
/* post processing */
+ StaticTopologyUtilities.connectEquipmentsAndContainers(equipmentContainers, conductingEquipments);
StaticTopologyUtilities.setBaseVoltageOrLineTypeOrSubstationType(propertyEntities, result);
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Abstract_Cim17v07_StaticTopology2_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Abstract_Cim17v07_StaticTopology2_Mapper.java
index 55c4a38d..295773ae 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Abstract_Cim17v07_StaticTopology2_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Abstract_Cim17v07_StaticTopology2_Mapper.java
@@ -86,7 +86,7 @@ public abstract class Abstract_Cim17v07_StaticTopology2_Mapper<S, D, P> extends
* <li><code>destinationModelDefinition</code> is <code>null</code></li>
* </ul>
*/
- protected Abstract_Cim17v07_StaticTopology2_Mapper(IServiceContext context, String scope, IModelDefinition sourceModelDefinition, IModelDefinition destinationModelDefinition) {
+ protected Abstract_Cim17v07_StaticTopology2_Mapper(IServiceContext context, String scope, IModelDefinition sourceModelDefinition, IModelDefinition destinationModelDefinition) throws IllegalArgumentException {
super(context, scope, sourceModelDefinition, destinationModelDefinition);
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/GeographicalRegions_Cim17v07_StaticTopology2_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/GeographicalRegions_Cim17v07_StaticTopology2_Mapper.java
index fe96b1b0..934f6dec 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/GeographicalRegions_Cim17v07_StaticTopology2_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/GeographicalRegions_Cim17v07_StaticTopology2_Mapper.java
@@ -23,9 +23,12 @@ import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
+import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
import org.eclipse.openk.domain.statictopology.model.region.GeographicalRegion;
import org.eclipse.openk.domain.statictopology.model.region.GeographicalRegion.GeographicalRegionBuilder;
+import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion;
+import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion.SubGeographicalRegionBuilder;
import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
import org.eclipse.openk.service.core.IServiceContext;
@@ -58,6 +61,30 @@ public final class GeographicalRegions_Cim17v07_StaticTopology2_Mapper extends A
}
// Methods
+ /**
+ * Creates the sub equipment containers.
+ *
+ * @param regions
+ * the regions; can be <code>null</code> or empty
+ * @return the list; can be <code>null</code> or empty
+ */
+ private List<IEquipmentContainer> createSubEquipmentContainers(List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion> regions) {
+
+ List<IEquipmentContainer> result = null;
+
+ if(regions != null && !regions.isEmpty()) {
+ for(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion subGeographicalRegion : regions) {
+ if(result == null)
+ result = new ArrayList<>(regions.size());
+
+ result.add(new SubGeographicalRegionBuilder() //
+ .withKey(new Key(SubGeographicalRegion.class, UUID.fromString(subGeographicalRegion.getMRID()))) //
+ .build());
+ }
+ }
+ return result;
+ }
+
@Override
public List<GeographicalRegion> map(List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.GeographicalRegion> source, NoParameters mappingParameters) throws IllegalArgumentException, IOException {
@@ -72,6 +99,7 @@ public final class GeographicalRegions_Cim17v07_StaticTopology2_Mapper extends A
.withKey(new Key(GeographicalRegion.class, UUID.fromString(sourceItem.getMRID()))) //
.withName(sourceItem.getName()) //
.withDescription(sourceItem.getDescription()) //
+ .withSubEquipmentContainers(createSubEquipmentContainers(sourceItem.getRegions())) //
.withOriginalKeys(extractOriginalKeys(sourceItem.getNames())) //
.build();
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/PowerTransformers_Cim17v07_StaticTopology2_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/PowerTransformers_Cim17v07_StaticTopology2_Mapper.java
index 6dd853f7..4e1ba0df 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/PowerTransformers_Cim17v07_StaticTopology2_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/PowerTransformers_Cim17v07_StaticTopology2_Mapper.java
@@ -68,9 +68,10 @@ public final class PowerTransformers_Cim17v07_StaticTopology2_Mapper extends Abs
/**
* Extract {@link BaseVoltage}.
*
- * @param powerTransformerEnd can be <code>null</code>
+ * @param powerTransformerEnd
+ * can be <code>null</code>
* @return the base voltage; can be <code>null</code>
- *
+ *
*/
private BaseVoltage extractBaseVoltage(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.PowerTransformerEnd powerTransformerEnd) {
@@ -88,7 +89,7 @@ public final class PowerTransformers_Cim17v07_StaticTopology2_Mapper extends Abs
return result;
}
-
+
/**
* Extract high step.
*
@@ -161,13 +162,14 @@ public final class PowerTransformers_Cim17v07_StaticTopology2_Mapper extends Abs
RatioTapChanger result = null;
if(source != null) {
- result = new RatioTapChangerBuilder() //
- .withLowStep(extractLowStep(source)) //
- .withNormalStep(extractNormalStep(source)) //
- .withHighStep(extractHighStep(source)) //
- .withStep(extractStep(source)) //
- .withStepVoltageIncrement(extractStepVoltageIncrement(source)) //
- .build();
+ if(source.getRatioTapChanger() != null)
+ result = new RatioTapChangerBuilder() //
+ .withLowStep(extractLowStep(source)) //
+ .withNormalStep(extractNormalStep(source)) //
+ .withHighStep(extractHighStep(source)) //
+ .withStep(extractStep(source)) //
+ .withStepVoltageIncrement(extractStepVoltageIncrement(source)) //
+ .build();
}
return result;
@@ -234,7 +236,7 @@ public final class PowerTransformers_Cim17v07_StaticTopology2_Mapper extends Abs
result.add(new PowerTransformerEndBuilder() //
.withRatedU(UnitUtilities.normalizeValue(powerTransformerEnd.getRatedU(), UnitUtilities.getUnitInformation(TypeInformationProvider.DEFAULT_INSTANCE, PowerTransformerEnd.class, PowerTransformerEnd.PROPERTY_RATED_U))) //
.withRatedS(UnitUtilities.normalizeValue(powerTransformerEnd.getRatedS(), UnitUtilities.getUnitInformation(TypeInformationProvider.DEFAULT_INSTANCE, PowerTransformerEnd.class, PowerTransformerEnd.PROPERTY_RATED_S))) //
- .withRatioTapChanger(extractRatioTapChanger(powerTransformerEnd)) //
+ .withRatioTapChanger(extractRatioTapChanger(powerTransformerEnd)) //
.withBaseVoltage(extractBaseVoltage(powerTransformerEnd)).withTerminal(extractTerminal(powerTransformerEnd.getTerminal())).build());
}
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper.java
index ead34253..461e3b77 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper.java
@@ -23,11 +23,14 @@ import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
+import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
-import org.eclipse.openk.domain.statictopology.model.region.GeographicalRegion;
-import org.eclipse.openk.domain.statictopology.model.region.GeographicalRegion.GeographicalRegionBuilder;
+import org.eclipse.openk.domain.statictopology.model.line.Line;
+import org.eclipse.openk.domain.statictopology.model.line.Line.LineBuilder;
import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion;
import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion.SubGeographicalRegionBuilder;
+import org.eclipse.openk.domain.statictopology.model.substation.Substation;
+import org.eclipse.openk.domain.statictopology.model.substation.Substation.SubstationBuilder;
import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
import org.eclipse.openk.service.core.IServiceContext;
@@ -61,6 +64,39 @@ public final class SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper extend
}
// Methods
+ /**
+ * Creates the sub equipment containers.
+ *
+ * @param substations
+ * the voltage levels; can be <code>null</code> or empty
+ * @param lines
+ * the bays; can be <code>null</code> or empty
+ * @return the list; can be <code>null</code> or empty
+ */
+ private List<IEquipmentContainer> createSubEquipmentContainers(List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation> substations, List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line> lines) {
+
+ List<IEquipmentContainer> result = null;
+
+ if(substations != null && !substations.isEmpty()) {
+ for(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.EquipmentContainer equipmentContainer : substations) {
+ if(result == null)
+ result = new ArrayList<>(substations.size());
+
+ result.add(new SubstationBuilder().withKey(new Key(Substation.class, UUID.fromString(equipmentContainer.getMRID()))).build());
+ }
+ }
+ if(lines != null && !lines.isEmpty()) {
+ for(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line equipmentContainer : lines) {
+ if(result == null)
+ result = new ArrayList<>(lines.size());
+
+ result.add(new LineBuilder().withKey(new Key(Line.class, UUID.fromString(equipmentContainer.getMRID()))).build());
+ }
+ }
+
+ return result;
+ }
+
@Override
public List<SubGeographicalRegion> map(List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion> source, NoParameters mappingParameters) throws IllegalArgumentException, IOException {
@@ -76,7 +112,7 @@ public final class SubGeographicalRegions_Cim17v07_StaticTopology2_Mapper extend
.withName(sourceItem.getName()) //
.withDescription(sourceItem.getDescription()) //
.withOriginalKeys(extractOriginalKeys(sourceItem.getNames())) //
- .withSuperEquipmentContainer(new GeographicalRegionBuilder().withKey(new Key(GeographicalRegion.class, UUID.fromString(sourceItem.getMRID()))).build()) //
+ .withSubEquipmentContainers(createSubEquipmentContainers(sourceItem.getSubstations(), sourceItem.getLines())) //
.build();
result.add(destinationItem);
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Substation_Cim17v07_StaticTopology2_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Substation_Cim17v07_StaticTopology2_Mapper.java
index 81ce2615..f246b8d7 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Substation_Cim17v07_StaticTopology2_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/Substation_Cim17v07_StaticTopology2_Mapper.java
@@ -25,7 +25,6 @@ import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
-import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion;
import org.eclipse.openk.domain.statictopology.model.substation.Bay;
import org.eclipse.openk.domain.statictopology.model.substation.Bay.BayBuilder;
import org.eclipse.openk.domain.statictopology.model.substation.Substation;
@@ -82,10 +81,10 @@ public final class Substation_Cim17v07_StaticTopology2_Mapper extends Abstract_C
.withKey(new Key(Substation.class, UUID.fromString(sourceItem.getMRID()))) //
.withName(sourceItem.getName()) //
.withDescription(sourceItem.getDescription()) //
- .withOriginalKeys(extractOriginalKeys(sourceItem.getNames())).withSubstationType(new SubstationTypeBuilder().withKey(new Key(SubstationType.class, UUID.fromString(sourceItem.getPSRType().getMRID()))).build()) //
+ .withOriginalKeys(extractOriginalKeys(sourceItem.getNames())) //
+ .withSubstationType(new SubstationTypeBuilder().withKey(new Key(SubstationType.class, UUID.fromString(sourceItem.getPSRType().getMRID()))).build()) //
.withEquipments(extractEquipments(sourceItem.getEquipments()))//
.withSubEquipmentContainers(createSubEquipmentContainers(sourceItem.getVoltageLevels(), sourceItem.getBays())) //
- .withSuperEquipmentContainer(extractSubgeographicalRegion(sourceItem)) //
.build(); //
result.add(destinationItem);
@@ -96,28 +95,6 @@ public final class Substation_Cim17v07_StaticTopology2_Mapper extends Abstract_C
}
/**
- * Extract {@link SubGeographicalRegion}.
- *
- * @param sourceItem
- * the source item; not <code>null</code>
- * @return the sub geographical region; can be <code>null</code>
- */
- private SubGeographicalRegion extractSubgeographicalRegion(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation sourceItem) {
-
- SubGeographicalRegion result = null;
-
- if(sourceItem.getRegion() != null) {
- if(sourceItem.getRegion().getMRID() != null) {
- result = new SubGeographicalRegion.SubGeographicalRegionBuilder() //
- .withKey(new Key(SubGeographicalRegion.class, UUID.fromString(sourceItem.getRegion().getMRID()))) //
- .build();
- }
- }
-
- return result;
- }
-
- /**
* Creates the sub equipment containers.
*
* @param voltageLevels
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/VoltageLevels_Cim17v07_StaticTopology2_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/VoltageLevels_Cim17v07_StaticTopology2_Mapper.java
index 1efb125c..efffe9ea 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/VoltageLevels_Cim17v07_StaticTopology2_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/cim17v07/VoltageLevels_Cim17v07_StaticTopology2_Mapper.java
@@ -19,11 +19,14 @@ import java.util.List;
import java.util.UUID;
import org.eclipse.openk.cim.cim17v07.Cim17v07;
+import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay;
import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
+import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
+import org.eclipse.openk.domain.statictopology.model.substation.Bay.BayBuilder;
import org.eclipse.openk.domain.statictopology.model.substation.Substation;
import org.eclipse.openk.domain.statictopology.model.substation.Substation.SubstationBuilder;
import org.eclipse.openk.domain.statictopology.model.substation.VoltageLevel;
@@ -78,7 +81,7 @@ public class VoltageLevels_Cim17v07_StaticTopology2_Mapper extends Abstract_Cim1
.withOriginalKeys(extractOriginalKeys(sourceItem.getNames())) //
.withEquipments(extractEquipments(sourceItem.getEquipments())) //
.withBaseVoltage(extractBaseVoltage(sourceItem)) //
- .withSuperEquipmentContainer(extractSubstation(sourceItem)) //
+ .withSubEquipmentContainers(createSubEquipmentContainers(sourceItem.getBays())) //
.build();
result.add(destinationItem);
@@ -89,6 +92,29 @@ public class VoltageLevels_Cim17v07_StaticTopology2_Mapper extends Abstract_Cim1
}
/**
+ * Creates the sub equipment containers.
+ *
+ * @param bays
+ * the bays; can be <code>null</code> or empty
+ * @return the list; can be <code>null</code> or empty
+ */
+ private List<IEquipmentContainer> createSubEquipmentContainers(List<Bay> bays) {
+
+ List<IEquipmentContainer> result = null;
+
+ if(bays != null && !bays.isEmpty()) {
+ for(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.EquipmentContainer equipmentContainer : bays) {
+ if(result == null)
+ result = new ArrayList<>(bays.size());
+
+ result.add(new BayBuilder().withKey(new Key(Bay.class, UUID.fromString(equipmentContainer.getMRID()))).build());
+ }
+ }
+
+ return result;
+ }
+
+ /**
* Extract {@link Substation}.
*
* @param sourceItem
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Abstract_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Abstract_StaticTopology2_Cim17v07_Mapper.java
index 12f14794..ce5482db 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Abstract_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Abstract_StaticTopology2_Cim17v07_Mapper.java
@@ -15,13 +15,16 @@ package org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.stat
import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Equipment;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Name;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.NameType;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.NameTypeAuthority;
+import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.PowerSystemResource;
import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.common.key.sourcesystem.OriginalKey;
import org.eclipse.openk.common.key.sourcesystem.OriginalKeyType;
@@ -33,10 +36,25 @@ import org.eclipse.openk.common.value.MissingValueException;
import org.eclipse.openk.domain.statictopology.model.ConductingEquipment;
import org.eclipse.openk.domain.statictopology.model.EquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.IEquipment;
+import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
+import org.eclipse.openk.domain.statictopology.model.consumption.EnergyConsumer;
import org.eclipse.openk.domain.statictopology.model.core.BaseVoltage;
import org.eclipse.openk.domain.statictopology.model.core.Terminal;
+import org.eclipse.openk.domain.statictopology.model.generation.EnergySource;
+import org.eclipse.openk.domain.statictopology.model.line.AcLineSegment;
+import org.eclipse.openk.domain.statictopology.model.line.Junction;
+import org.eclipse.openk.domain.statictopology.model.substation.BusbarSection;
import org.eclipse.openk.domain.statictopology.model.substation.VoltageLevel;
+import org.eclipse.openk.domain.statictopology.model.substation.grounding.EarthFaultCompensator;
+import org.eclipse.openk.domain.statictopology.model.substation.grounding.Ground;
+import org.eclipse.openk.domain.statictopology.model.substation.grounding.GroundingImpedance;
+import org.eclipse.openk.domain.statictopology.model.substation.grounding.PetersenCoil;
+import org.eclipse.openk.domain.statictopology.model.substation.powertransformer.PowerTransformer;
import org.eclipse.openk.domain.statictopology.model.substation.powertransformer.PowerTransformerEnd;
+import org.eclipse.openk.domain.statictopology.model.substation.switches.Breaker;
+import org.eclipse.openk.domain.statictopology.model.substation.switches.Disconnector;
+import org.eclipse.openk.domain.statictopology.model.substation.switches.LoadBreakSwitch;
+import org.eclipse.openk.domain.statictopology.model.substation.switches.Switch;
import org.eclipse.openk.service.adapter.dataexchange.mapper.AbstractMapper;
import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
import org.eclipse.openk.service.adapter.dataexchange.mapper.MapperConfiguration;
@@ -58,8 +76,30 @@ import org.eclipse.openk.service.core.IServiceContext;
public abstract class Abstract_StaticTopology2_Cim17v07_Mapper<S, D, P> extends AbstractMapper<MapperConfiguration, S, D, P> {
// Constants
+ private static final Map<Class<? extends IEquipment>, PowerSystemResource> EQUIPMENT_CIM17V07_INSTANCES;
private static final ILogger LOGGER = LoggerFactory.createLogger(Abstract_StaticTopology2_Cim17v07_Mapper.class);
+ static {
+ Map<Class<? extends IEquipment>, PowerSystemResource> result = new HashMap<>();
+
+ result.put(AcLineSegment.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.ACLineSegment());
+ result.put(Breaker.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Breaker());
+ result.put(BusbarSection.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.BusbarSection());
+ result.put(Disconnector.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Disconnector());
+ result.put(EarthFaultCompensator.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.EarthFaultCompensator());
+ result.put(EnergyConsumer.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.EnergyConsumer());
+ result.put(EnergySource.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.EnergySource());
+ result.put(GroundingImpedance.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.GroundingImpedance());
+ result.put(Ground.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Ground());
+ result.put(Junction.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Junction());
+ result.put(LoadBreakSwitch.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.LoadBreakSwitch());
+ result.put(PetersenCoil.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.PetersenCoil());
+ result.put(PowerTransformer.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.PowerTransformer());
+ result.put(Switch.class, new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Switch());
+
+ EQUIPMENT_CIM17V07_INSTANCES = result;
+ }
+
// Constructors
/**
* @param context
@@ -178,7 +218,7 @@ public abstract class Abstract_StaticTopology2_Cim17v07_Mapper<S, D, P> extends
* Extracts the specified {@link org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Equipment}s.
*
* @param equipments
- * the specified map of @l{@link Key} - {@link IEquipment} pairs; can be <code>null</code> or empty
+ * the specified map of {@link Key} - {@link IEquipment} pairs; can be <code>null</code> or empty
* @return the list of {@link org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Equipment}s; can be <code>null</code> or empty
*/
protected List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Equipment> extractEquipments(Map<Key, IEquipment> equipments) {
@@ -186,15 +226,19 @@ public abstract class Abstract_StaticTopology2_Cim17v07_Mapper<S, D, P> extends
List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Equipment> result = null;
if((equipments != null) && !equipments.isEmpty()) {
+ PowerSystemResource powerSystemResource;
for(IEquipment equipment : equipments.values()) {
-
if(result == null)
result = new ArrayList<>();
+ powerSystemResource = EQUIPMENT_CIM17V07_INSTANCES.get(equipment.getClass());
- org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.ConductingEquipment conductingEquipment = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.ConductingEquipment();
- conductingEquipment.setMRID(equipment.getKey().getId().toString());
+ if(powerSystemResource != null) {
+ powerSystemResource.setMRID(equipment.getKey().getId().toString());
+ result.add((Equipment) powerSystemResource);
+ }
+ else
+ getLogger().debug("Can not map equipment " + equipment.getClass().getSimpleName());
- result.add(conductingEquipment);
}
}
@@ -241,41 +285,23 @@ public abstract class Abstract_StaticTopology2_Cim17v07_Mapper<S, D, P> extends
}
/**
- * Extract {@link org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.GeographicalRegion}.
- *
- * @param sourceItem
- * the {@link EquipmentContainer}; not <code>null</code>
- * @return the geographical region; can be <code>null</code>
- */
- protected org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.GeographicalRegion extractGeographicalRegion(EquipmentContainer sourceItem) {
-
- org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.GeographicalRegion result = null;
-
- if(sourceItem.getSuperEquipmentContainer() != null) {
- if(sourceItem.getSuperEquipmentContainer().getKey() != null) {
- result = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.GeographicalRegion();
- result.setMRID(sourceItem.getSuperEquipmentContainer().getKey().getId().toString());
- }
- }
-
- return result;
- }
-
- /**
* Extract {@link org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion}.
*
- * @param sourceItem
- * the {@link EquipmentContainer}; not <code>null</code>
+ * @param sourceItems
+ * the {@link EquipmentContainer}'s; can be <code>null</code> or empty
* @return the sub geographical region; can be <code>null</code>
*/
- protected org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion extractSubgeographicalRegion(EquipmentContainer sourceItem) {
+ protected List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion> extractSubGeographicalRegions(List<IEquipmentContainer> sourceItems) {
- org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion result = null;
+ List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion> result = null;
- if(sourceItem.getSuperEquipmentContainer() != null) {
- if(sourceItem.getSuperEquipmentContainer().getKey() != null) {
- result = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion();
- result.setMRID(sourceItem.getSuperEquipmentContainer().getKey().getId().toString());
+ if((sourceItems != null) && !sourceItems.isEmpty()) {
+ result = new ArrayList<>(sourceItems.size());
+ org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion region = null;
+ for(IEquipmentContainer equipmentContainer : sourceItems) {
+ region = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion();
+ region.setMRID(equipmentContainer.getKey().getId().toString());
+ result.add(region);
}
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.java
deleted file mode 100644
index 367e10dc..00000000
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.openk.cim.profile.openkonsequenz.OpenKonsequenz;
-import org.eclipse.openk.cim.profile.openkonsequenz.api.statictopology.ElementType;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.common.string.StringUtilities;
-import org.eclipse.openk.common.value.parameter.NoParameters;
-import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
-import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.model.new_repository.model.IEntity;
-
-/**
- * The {@link IMapper} for mapping from {@link IEntity}-{@link StaticTopology2}-model-definition to {@link ElementType}-{@link OpenKonsequenz}-model-definition.
- *
- * @author 2017-10-26 Michael Korta
- */
-public final class ElementTypes_StaticTopology2_OpenKonsequenz_Mapper extends Abstract_StaticTopology2_Cim17v07_Mapper<List<Class<? extends IEntity>>, List<ElementType>, NoParameters> {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(ElementTypes_StaticTopology2_OpenKonsequenz_Mapper.class);
- private static final String SCOPE = "ElementTypes";
-
- // Constructors
- /**
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public ElementTypes_StaticTopology2_OpenKonsequenz_Mapper(IServiceContext context) throws IllegalArgumentException {
-
- super(context, SCOPE, StaticTopology2.INSTANCE, OpenKonsequenz.INSTANCE);
- }
-
- // Methods
- @Override
- public List<ElementType> map(List<Class<? extends IEntity>> source, NoParameters mappingParameters) throws IllegalArgumentException, IOException {
-
- List<ElementType> result = null;
-
- if((source != null) && !source.isEmpty()) {
- result = new ArrayList<>(source.size());
-
- for(Class<? extends IEntity> entityType : source) {
- ElementType elementType = new ElementType();
- elementType.setName(StringUtilities.toTrainCase(entityType.getSimpleName()));
-
- result.add(elementType);
- }
- }
-
- return result;
- }
-
- // Properties
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Elements_StaticTopology2_OpenKonsequenz_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Elements_StaticTopology2_OpenKonsequenz_Mapper.java
deleted file mode 100644
index b77cc5ea..00000000
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Elements_StaticTopology2_OpenKonsequenz_Mapper.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * -----------------------------------------------------------------------------
- *
- * Copyright © 2015-2017 BTC AG - http://www.btc-ag.com
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * -----------------------------------------------------------------------------
- */
-package org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.statictopology2;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.openk.cim.cim17v07.Cim17v07;
-import org.eclipse.openk.cim.profile.openkonsequenz.OpenKonsequenz;
-import org.eclipse.openk.cim.profile.openkonsequenz.api.statictopology.ElementType;
-import org.eclipse.openk.common.dataexchange.cim.ICimEntity;
-import org.eclipse.openk.common.messaging.ILogger;
-import org.eclipse.openk.common.messaging.LoggerFactory;
-import org.eclipse.openk.common.model.IModelDefinition;
-import org.eclipse.openk.common.value.parameter.NoParameters;
-import org.eclipse.openk.domain.statictopology.core.StaticTopologyDefaults;
-import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
-import org.eclipse.openk.domain.statictopology.model.consumption.EnergyConsumer;
-import org.eclipse.openk.domain.statictopology.model.core.BaseVoltage;
-import org.eclipse.openk.domain.statictopology.model.generation.EnergySource;
-import org.eclipse.openk.domain.statictopology.model.generation.Plant;
-import org.eclipse.openk.domain.statictopology.model.line.AcLineSegment;
-import org.eclipse.openk.domain.statictopology.model.line.Junction;
-import org.eclipse.openk.domain.statictopology.model.line.Line;
-import org.eclipse.openk.domain.statictopology.model.line.LineType;
-import org.eclipse.openk.domain.statictopology.model.region.GeographicalRegion;
-import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion;
-import org.eclipse.openk.domain.statictopology.model.substation.Bay;
-import org.eclipse.openk.domain.statictopology.model.substation.BusbarSection;
-import org.eclipse.openk.domain.statictopology.model.substation.Substation;
-import org.eclipse.openk.domain.statictopology.model.substation.SubstationType;
-import org.eclipse.openk.domain.statictopology.model.substation.VoltageLevel;
-import org.eclipse.openk.domain.statictopology.model.substation.grounding.EarthFaultCompensator;
-import org.eclipse.openk.domain.statictopology.model.substation.grounding.GroundingImpedance;
-import org.eclipse.openk.domain.statictopology.model.substation.grounding.PetersenCoil;
-import org.eclipse.openk.domain.statictopology.model.substation.powertransformer.PowerTransformer;
-import org.eclipse.openk.domain.statictopology.model.substation.switches.Breaker;
-import org.eclipse.openk.domain.statictopology.model.substation.switches.Disconnector;
-import org.eclipse.openk.domain.statictopology.model.substation.switches.LoadBreakSwitch;
-import org.eclipse.openk.domain.statictopology.model.substation.switches.Switch;
-import org.eclipse.openk.service.adapter.IServiceAdapterController;
-import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
-import org.eclipse.openk.service.core.IServiceContext;
-import org.eclipse.openk.service.model.new_repository.model.IEntity;
-
-/**
- * The {@link IMapper} for mapping from {@link IEntity}-{@link StaticTopology2}-model-definition to {@link ElementType}-{@link OpenKonsequenz}-model-definition.
- *
- * @author 2017-10-27 Felix Korb
- * @author 2017-10-26 Frank Jäger
- * @author 2017-10-26 Michael Korta
- * @author 2017-10-27 Renko Ortgies
- */
-public final class Elements_StaticTopology2_OpenKonsequenz_Mapper extends Abstract_StaticTopology2_Cim17v07_Mapper<List<? extends IEntity>, List<? extends ICimEntity>, NoParameters> {
-
- // Constants
- private static final ILogger LOGGER = LoggerFactory.createLogger(Elements_StaticTopology2_OpenKonsequenz_Mapper.class);
-
- private static final Map<Class<? extends IEntity>, MapperInfo> MAPPER_INFOS;
- private static final String SCOPE = "Elements";
-
- static {
- Map<Class<? extends IEntity>, MapperInfo> result = new HashMap<>();
-
- result.put(AcLineSegment.class, new MapperInfo(StaticTopologyDefaults.SCOPE_AC_LINE_SEGMENTS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(BaseVoltage.class, new MapperInfo(StaticTopologyDefaults.SCOPE_BASE_VOLTAGES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Breaker.class, new MapperInfo(StaticTopologyDefaults.SCOPE_BREAKERS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(BusbarSection.class, new MapperInfo(StaticTopologyDefaults.SCOPE_BUSBAR_SECTIONS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Bay.class, new MapperInfo(StaticTopologyDefaults.SCOPE_BAYS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Disconnector.class, new MapperInfo(StaticTopologyDefaults.SCOPE_DISCONNECTORS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(EarthFaultCompensator.class, new MapperInfo(StaticTopologyDefaults.SCOPE_EARTH_FAULT_COMPENSATORS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(EnergyConsumer.class, new MapperInfo(StaticTopologyDefaults.SCOPE_ENERGY_CONSUMERS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(EnergySource.class, new MapperInfo(StaticTopologyDefaults.SCOPE_ENERGY_SOURCES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(GeographicalRegion.class, new MapperInfo(StaticTopologyDefaults.SCOPE_GEOGRAPHICAL_REGIONS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(GroundingImpedance.class, new MapperInfo(StaticTopologyDefaults.SCOPE_GROUNDING_IMPEDANCES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Junction.class, new MapperInfo(StaticTopologyDefaults.SCOPE_JUNCTIONS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(LineType.class, new MapperInfo(StaticTopologyDefaults.SCOPE_LINE_TYPES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Line.class, new MapperInfo(StaticTopologyDefaults.SCOPE_LINES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(LoadBreakSwitch.class, new MapperInfo(StaticTopologyDefaults.SCOPE_LOAD_BREAK_SWITCHES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(PetersenCoil.class, new MapperInfo(StaticTopologyDefaults.SCOPE_PETERSEN_COILS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Plant.class, new MapperInfo(StaticTopologyDefaults.SCOPE_PLANTS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(PowerTransformer.class, new MapperInfo(StaticTopologyDefaults.SCOPE_POWER_TRANSFORMERS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(SubGeographicalRegion.class, new MapperInfo(StaticTopologyDefaults.SCOPE_SUB_GEOGRAPHICAL_REGIONS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(SubstationType.class, new MapperInfo(StaticTopologyDefaults.SCOPE_SUBSTATION_TYPES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Substation.class, new MapperInfo(StaticTopologyDefaults.SCOPE_SUBSTATIONS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(Switch.class, new MapperInfo(StaticTopologyDefaults.SCOPE_SWITCHES, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
- result.put(VoltageLevel.class, new MapperInfo(StaticTopologyDefaults.SCOPE_VOLTAGE_LEVELS, StaticTopology2.INSTANCE, Cim17v07.INSTANCE));
-
- MAPPER_INFOS = result;
- }
-
- // Constructors
- /**
- * @param context
- * the context
- * @throws IllegalArgumentException
- * Is thrown in the following cases:
- * <ul>
- * <li><code>context</code> is <code>null</code></li>
- * </ul>
- */
- public Elements_StaticTopology2_OpenKonsequenz_Mapper(IServiceContext context) throws IllegalArgumentException {
-
- super(context, SCOPE, StaticTopology2.INSTANCE, Cim17v07.INSTANCE);
- }
-
- // Methods
- @Override
- public List<? extends ICimEntity> map(List<? extends IEntity> source, NoParameters mappingParameters) throws IllegalArgumentException, IOException {
-
- List<ICimEntity> result = null;
-
- if((source == null) || source.isEmpty())
- result = null;
- else {
- List<ICimEntity> cimEntities;
- IMapper<?, List<IEntity>, List<ICimEntity>, NoParameters> mapper;
- MapperInfo mapperInfo;
-
- result = new ArrayList<>(source.size());
-
- for(IEntity entity : source) {
- mapperInfo = MAPPER_INFOS.get(entity.getClass());
-
- if(mapperInfo != null) {
- mapper = ((IServiceAdapterController<?>) getContext()).getMapperFactory().createMapper(mapperInfo.scope, mapperInfo.sourceModelDefinition, mapperInfo.destinationModelDefinition);
-
- if(mapper != null) {
- cimEntities = mapper.map(Collections.singletonList(entity), mappingParameters);
-
- result.addAll(cimEntities);
- }
- }
- }
- }
-
- return result;
- }
-
- // Properties
- @Override
- public ILogger getLogger() {
-
- return LOGGER;
- }
-
- // inner Classes
- /**
- * The mapper info.
- */
- private static final class MapperInfo {
-
- // Attributes
- IModelDefinition destinationModelDefinition;
- IModelDefinition sourceModelDefinition;
- String scope;
-
- // Constructors
- /**
- * @param scope
- * the scope - specifies the application area<br/>
- * for example: 'BaseVoltages'
- * @param sourceModelDefinition
- * the source {@link IModelDefinition}
- * @param destinationModelDefinition
- * the destination {@link IModelDefinition}
- */
-
- private MapperInfo(String scope, IModelDefinition sourceModelDefinition, IModelDefinition destinationModelDefinition) {
-
- this.sourceModelDefinition = sourceModelDefinition;
- this.destinationModelDefinition = destinationModelDefinition;
- this.scope = scope;
- }
- }
-} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/GeographicalRegions_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/GeographicalRegions_StaticTopology2_Cim17v07_Mapper.java
index 85186aa3..a93e66e6 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/GeographicalRegions_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/GeographicalRegions_StaticTopology2_Cim17v07_Mapper.java
@@ -70,6 +70,7 @@ public final class GeographicalRegions_StaticTopology2_Cim17v07_Mapper extends A
destinationItem.setName(sourceItem.getName());
destinationItem.setDescription(sourceItem.getDescription());
destinationItem.setNames(extractOriginalKeys(sourceItem.getOriginalKeys()));
+ destinationItem.setRegions(extractSubGeographicalRegions(sourceItem.getSubEquipmentContainers()));
result.add(destinationItem);
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PetersenCoils_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PetersenCoils_StaticTopology2_Cim17v07_Mapper.java
index 01a31717..13b854aa 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PetersenCoils_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PetersenCoils_StaticTopology2_Cim17v07_Mapper.java
@@ -79,7 +79,7 @@ public final class PetersenCoils_StaticTopology2_Cim17v07_Mapper extends Abstrac
destinationItem.setMode(mapPetersenCoilModeKind(sourceItem.getMode()));
destinationItem.setOffsetCurrent(UnitUtilities.toCimDatatype(CurrentFlow.class, UnitMultiplier.class, UnitSymbol.class, sourceItem, PetersenCoil.PROPERTY_OFFSET_CURRENT));
- destinationItem.setOffsetCurrent(UnitUtilities.toCimDatatype(CurrentFlow.class, UnitMultiplier.class, UnitSymbol.class, sourceItem, PetersenCoil.PROPERTY_POSITION_CURRENT));
+ destinationItem.setPositionCurrent(UnitUtilities.toCimDatatype(CurrentFlow.class, UnitMultiplier.class, UnitSymbol.class, sourceItem, PetersenCoil.PROPERTY_POSITION_CURRENT));
destinationItem.setXGroundMax(UnitUtilities.toCimDatatype(Reactance.class, UnitMultiplier.class, UnitSymbol.class, sourceItem, PetersenCoil.PROPERTY_X_GROUND_MAX));
destinationItem.setXGroundMin(UnitUtilities.toCimDatatype(Reactance.class, UnitMultiplier.class, UnitSymbol.class, sourceItem, PetersenCoil.PROPERTY_X_GROUND_MIN));
destinationItem.setXGroundNominal(UnitUtilities.toCimDatatype(Reactance.class, UnitMultiplier.class, UnitSymbol.class, sourceItem, PetersenCoil.PROPERTY_X_GROUND_NOMINAL));
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PowerTransformers_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PowerTransformers_StaticTopology2_Cim17v07_Mapper.java
index e2c7c7a3..cc588276 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PowerTransformers_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/PowerTransformers_StaticTopology2_Cim17v07_Mapper.java
@@ -15,6 +15,7 @@ package org.eclipse.openk.domain.statictopology.adapter.dataexchange.mapper.stat
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.openk.cim.cim17v07.Cim17v07;
@@ -132,16 +133,16 @@ public final class PowerTransformers_StaticTopology2_Cim17v07_Mapper extends Abs
org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.RatioTapChanger result = null;
if(source != null) {
- result = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.RatioTapChanger();
+ if(source.getRatioTapChanger() != null) {
+ result = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.RatioTapChanger();
- result.setLowStep(extractLowStep(source));
- result.setNormalStep(extractNormalStep(source));
- result.setHighStep(extractHighStep(source));
- result.setStep(extractStep(source));
- if(source.getRatioTapChanger() != null)
+ result.setLowStep(extractLowStep(source));
+ result.setNormalStep(extractNormalStep(source));
+ result.setHighStep(extractHighStep(source));
+ result.setStep(extractStep(source));
result.setStepVoltageIncrement(UnitUtilities.toCimDatatype(PerCent.class, UnitMultiplier.class, UnitSymbol.class, source.getRatioTapChanger(), RatioTapChanger.PROPERTY_STEP_VOLTAGE_INCREMENT));
- else
- result.setStepVoltageIncrement(null);
+
+ }
}
return result;
@@ -188,7 +189,7 @@ public final class PowerTransformers_StaticTopology2_Cim17v07_Mapper extends Abs
destinationPowerTransformerEnd.setRatedU(UnitUtilities.toCimDatatype(Voltage.class, UnitMultiplier.class, UnitSymbol.class, powerTransformerEnd, PowerTransformerEnd.PROPERTY_RATED_U));
destinationPowerTransformerEnd.setRatedS(UnitUtilities.toCimDatatype(ApparentPower.class, UnitMultiplier.class, UnitSymbol.class, powerTransformerEnd, PowerTransformerEnd.PROPERTY_RATED_S));
-
+ destinationPowerTransformerEnd.setTerminal(extractTerminal(powerTransformerEnd.getTerminal()));
destinationPowerTransformerEnd.setRatioTapChanger(extractRatioTapChanger(powerTransformerEnd));
destinationPowerTransformerEnd.setBaseVoltage(extractBaseVoltage(powerTransformerEnd));
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper.java
index 9c3e8b64..e85ff316 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper.java
@@ -21,8 +21,12 @@ import org.eclipse.openk.cim.cim17v07.Cim17v07;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
+import org.eclipse.openk.domain.statictopology.model.EquipmentContainer;
+import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
+import org.eclipse.openk.domain.statictopology.model.line.Line;
import org.eclipse.openk.domain.statictopology.model.region.SubGeographicalRegion;
+import org.eclipse.openk.domain.statictopology.model.substation.Substation;
import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
import org.eclipse.openk.service.core.IServiceContext;
@@ -56,6 +60,58 @@ public final class SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper extend
}
// Methods
+ /**
+ * Extract {@link org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion}.
+ *
+ * @param sourceItems
+ * the {@link EquipmentContainer}'s; can be <code>null</code> or empty
+ * @return the sub geographical region; can be <code>null</code>
+ */
+ private List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line> extractLines(List<IEquipmentContainer> sourceItems) {
+
+ List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line> result = null;
+
+ if((sourceItems != null) && !sourceItems.isEmpty()) {
+ result = new ArrayList<>(sourceItems.size());
+ org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line line = null;
+ for(IEquipmentContainer equipmentContainer : sourceItems) {
+ if(equipmentContainer.getClass().isAssignableFrom(Line.class)) {
+ line = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line();
+ line.setMRID(equipmentContainer.getKey().getId().toString());
+ result.add(line);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Extract {@link org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion}.
+ *
+ * @param sourceItems
+ * the {@link EquipmentContainer}'s; can be <code>null</code> or empty
+ * @return the sub geographical region; can be <code>null</code>
+ */
+ private List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation> extractSubstations(List<IEquipmentContainer> sourceItems) {
+
+ List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation> result = null;
+
+ if((sourceItems != null) && !sourceItems.isEmpty()) {
+ result = new ArrayList<>(sourceItems.size());
+ org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation substation = null;
+ for(IEquipmentContainer equipmentContainer : sourceItems) {
+ if(equipmentContainer.getClass().isAssignableFrom(Substation.class)) {
+ substation = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation();
+ substation.setMRID(equipmentContainer.getKey().getId().toString());
+ result.add(substation);
+ }
+ }
+ }
+
+ return result;
+ }
+
@Override
public List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographicalRegion> map(List<SubGeographicalRegion> source, NoParameters mappingParameters) throws IllegalArgumentException, IOException {
@@ -72,7 +128,8 @@ public final class SubGeographicalRegions_StaticTopology2_Cim17v07_Mapper extend
destinationItem.setName(sourceItem.getName());
destinationItem.setDescription(sourceItem.getDescription());
destinationItem.setNames(extractOriginalKeys(sourceItem.getOriginalKeys()));
- destinationItem.setRegion(extractGeographicalRegion(sourceItem));
+ destinationItem.setSubstations(extractSubstations(sourceItem.getSubEquipmentContainers()));
+ destinationItem.setLines(extractLines(sourceItem.getSubEquipmentContainers()));
result.add(destinationItem);
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Substation_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Substation_StaticTopology2_Cim17v07_Mapper.java
index e309aef5..09c70f80 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Substation_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/Substation_StaticTopology2_Cim17v07_Mapper.java
@@ -19,12 +19,14 @@ import java.util.List;
import org.eclipse.openk.cim.cim17v07.Cim17v07;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay;
+import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.PSRType;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
import org.eclipse.openk.domain.statictopology.model.substation.Substation;
+import org.eclipse.openk.domain.statictopology.model.substation.VoltageLevel;
import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
import org.eclipse.openk.service.core.IServiceContext;
@@ -58,6 +60,26 @@ public final class Substation_StaticTopology2_Cim17v07_Mapper extends Abstract_S
}
// Methods
+ /**
+ * Extract line type.
+ *
+ * @param sourceItem
+ * the source item; not <code>null</code>
+ * @return the line type; can be <code>null</code>
+ */
+ private PSRType extractSubstationType(Substation sourceItem) {
+
+ PSRType result = null;
+
+ if(sourceItem != null) {
+ if(sourceItem.getSubstationType() != null) {
+ result = new PSRType();
+ result.setMRID(sourceItem.getKey().getId().toString());
+ }
+ }
+
+ return result;
+ }
@Override
public List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation> map(List<Substation> source, NoParameters mappingParameters) throws IllegalArgumentException, IOException {
@@ -78,8 +100,7 @@ public final class Substation_StaticTopology2_Cim17v07_Mapper extends Abstract_S
destinationItem.setEquipments(extractEquipments(sourceItem.getEquipments()));
destinationItem.setVoltageLevels(createVoltageLevels(sourceItem.getSubEquipmentContainers()));
destinationItem.setBays(createBays(sourceItem.getSubEquipmentContainers()));
-// destinationItem.setBays( (List<Bay>) (Object) createConductingEquipments(sourceItem.getSubEquipmentContainers(), Bay.class)); // Alternative
- destinationItem.setRegion(extractSubgeographicalRegion(sourceItem));
+ destinationItem.setPSRType(extractSubstationType(sourceItem));
result.add(destinationItem);
}
@@ -101,10 +122,10 @@ public final class Substation_StaticTopology2_Cim17v07_Mapper extends Abstract_S
if(equipmentContainers != null && !equipmentContainers.isEmpty()) {
for(IEquipmentContainer equipmentContainer : equipmentContainers) {
- if(result == null)
- result = new ArrayList<>(equipmentContainers.size());
+ if(VoltageLevel.class.isAssignableFrom(equipmentContainer.getClass())) {
+ if(result == null)
+ result = new ArrayList<>(equipmentContainers.size());
- if(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.VoltageLevel.class.isAssignableFrom(equipmentContainer.getClass())) {
org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.VoltageLevel destinationVoltageLevel = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.VoltageLevel();
destinationVoltageLevel.setMRID(equipmentContainer.getKey().getId().toString());
@@ -129,10 +150,11 @@ public final class Substation_StaticTopology2_Cim17v07_Mapper extends Abstract_S
if(equipmentContainers != null && !equipmentContainers.isEmpty()) {
for(IEquipmentContainer equipmentContainer : equipmentContainers) {
- if(result == null)
- result = new ArrayList<>(equipmentContainers.size());
- if(org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay.class.isAssignableFrom(equipmentContainer.getClass())) {
+ if(Bay.class.isAssignableFrom(equipmentContainer.getClass())) {
+ if(result == null)
+ result = new ArrayList<>(equipmentContainers.size());
+
org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay destinationBay = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay();
destinationBay.setMRID(equipmentContainer.getKey().getId().toString());
@@ -144,40 +166,40 @@ public final class Substation_StaticTopology2_Cim17v07_Mapper extends Abstract_S
return result;
}
-// /**
-// * Creates the conducting equipment.
-// *
-// * @param type
-// * the generic type
-// * @param equipmentContainers
-// * the equipment containers
-// * @return the list
-// */
-// private <T extends org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.ConductingEquipment> List<T> createConductingEquipments(List<IEquipmentContainer> equipmentContainers, Class<?> type) {
-//
-// List<T> result = null;
-//
-// if(equipmentContainers != null && !equipmentContainers.isEmpty()) {
-// for(IEquipmentContainer equipmentContainer : equipmentContainers) {
-// if(result == null)
-// result = new ArrayList<>(equipmentContainers.size());
-//
-// if(type.getClass().isAssignableFrom(equipmentContainer.getClass())) {
-// T destination = null;
-// try {
-// destination = (T) (Object) type.getClass().newInstance();
-// destination.setMRID(equipmentContainer.getKey().getId().toString());
-// }
-// catch(InstantiationException | IllegalAccessException e) {
-// throw new IllegalArgumentException("the class " + type.getClass() + "could not be instantiated.");
-// }
-// result.add(destination);
-// }
-// }
-// }
-//
-// return result;
-// }
+ // /**
+ // * Creates the conducting equipment.
+ // *
+ // * @param type
+ // * the generic type
+ // * @param equipmentContainers
+ // * the equipment containers
+ // * @return the list
+ // */
+ // private <T extends org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.ConductingEquipment> List<T> createConductingEquipments(List<IEquipmentContainer> equipmentContainers, Class<?> type) {
+ //
+ // List<T> result = null;
+ //
+ // if(equipmentContainers != null && !equipmentContainers.isEmpty()) {
+ // for(IEquipmentContainer equipmentContainer : equipmentContainers) {
+ // if(result == null)
+ // result = new ArrayList<>(equipmentContainers.size());
+ //
+ // if(type.getClass().isAssignableFrom(equipmentContainer.getClass())) {
+ // T destination = null;
+ // try {
+ // destination = (T) (Object) type.getClass().newInstance();
+ // destination.setMRID(equipmentContainer.getKey().getId().toString());
+ // }
+ // catch(InstantiationException | IllegalAccessException e) {
+ // throw new IllegalArgumentException("the class " + type.getClass() + "could not be instantiated.");
+ // }
+ // result.add(destination);
+ // }
+ // }
+ // }
+ //
+ // return result;
+ // }
// Properties
@Override
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/VoltageLevels_StaticTopology2_Cim17v07_Mapper.java b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/VoltageLevels_StaticTopology2_Cim17v07_Mapper.java
index 4d542774..d834a1a5 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/VoltageLevels_StaticTopology2_Cim17v07_Mapper.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/adapter/src/main/java/org/eclipse/openk/domain/statictopology/adapter/dataexchange/mapper/statictopology2/VoltageLevels_StaticTopology2_Cim17v07_Mapper.java
@@ -21,6 +21,7 @@ import org.eclipse.openk.cim.cim17v07.Cim17v07;
import org.eclipse.openk.common.messaging.ILogger;
import org.eclipse.openk.common.messaging.LoggerFactory;
import org.eclipse.openk.common.value.parameter.NoParameters;
+import org.eclipse.openk.domain.statictopology.model.IEquipmentContainer;
import org.eclipse.openk.domain.statictopology.model.StaticTopology2;
import org.eclipse.openk.domain.statictopology.model.substation.VoltageLevel;
import org.eclipse.openk.service.adapter.dataexchange.mapper.IMapper;
@@ -74,7 +75,7 @@ public class VoltageLevels_StaticTopology2_Cim17v07_Mapper extends Abstract_Stat
destinationItem.setNames(extractOriginalKeys(sourceItem.getOriginalKeys()));
destinationItem.setEquipments(extractEquipments(sourceItem.getEquipments()));
destinationItem.setBaseVoltage(extractBaseVoltage(sourceItem));
- destinationItem.setSubstation(extractSubstation(sourceItem));
+ destinationItem.setBays(extractBays(sourceItem));
result.add(destinationItem);
}
@@ -90,14 +91,19 @@ public class VoltageLevels_StaticTopology2_Cim17v07_Mapper extends Abstract_Stat
* the source item; not <code>null</code>
* @return the sub station; can be <code>null</code>
*/
- private org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation extractSubstation(VoltageLevel sourceItem) {
+ private List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay> extractBays(VoltageLevel sourceItem) {
- org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation result = null;
+ List<org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay> result = null;
- if(sourceItem.getBaseVoltage() != null) {
- if(sourceItem.getBaseVoltage().getKey().getId() != null) {
- result = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation();
- result.setMRID(sourceItem.getBaseVoltage().getKey().getId().toString());
+ List<IEquipmentContainer> equipmentContainers = sourceItem.getSubEquipmentContainers();
+
+ if((equipmentContainers != null) && !equipmentContainers.isEmpty()) {
+ result = new ArrayList<>(equipmentContainers.size());
+
+ for(IEquipmentContainer equipmentContainer : equipmentContainers) {
+ org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay bay = new org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Bay();
+ bay.setMRID(equipmentContainer.getKey().getId().toString());
+ result.add(bay);
}
}
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/core/src/main/java/org/eclipse/openk/domain/statictopology/core/StaticTopologyDefaults.java b/cim-cache/org.eclipse.openk.domain.static-topology/core/src/main/java/org/eclipse/openk/domain/statictopology/core/StaticTopologyDefaults.java
index ddc06653..bc6795fb 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/core/src/main/java/org/eclipse/openk/domain/statictopology/core/StaticTopologyDefaults.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/core/src/main/java/org/eclipse/openk/domain/statictopology/core/StaticTopologyDefaults.java
@@ -26,8 +26,8 @@ public final class StaticTopologyDefaults {
public static final String REPOSITORY_KEY_STATIC_TOPOLOGY = "static-topology";
/* scopes for response */
- public static final String SCOPE_ELEMENTS = "Elements";
- public static final String SCOPE_ELEMENT_TYPES = "ElementTypes";
+ public static final String SCOPE_POWER_SYSTEM_RESOURCES = "PowerSystemResources";
+ public static final String SCOPE_POWER_SYSTEM_RESOURCE_TYPES = "PowerSystemResourceTypes";
public static final String SCOPE_TOPOLOGY = "Topology";
/* scopes for request */
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/logic/src/main/java/org/eclipse/openk/domain/statictopology/logic/StaticTopologyUtilities.java b/cim-cache/org.eclipse.openk.domain.static-topology/logic/src/main/java/org/eclipse/openk/domain/statictopology/logic/StaticTopologyUtilities.java
index a817a853..ec7a6934 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/logic/src/main/java/org/eclipse/openk/domain/statictopology/logic/StaticTopologyUtilities.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/logic/src/main/java/org/eclipse/openk/domain/statictopology/logic/StaticTopologyUtilities.java
@@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import org.eclipse.openk.common.key.Key;
import org.eclipse.openk.domain.statictopology.model.EquipmentContainer;
@@ -71,43 +72,24 @@ public final class StaticTopologyUtilities {
}
/**
- * Crossing references of {@link IEquipment} and {@link IEquipmentContainer}.
- *
- * @param equipmentContainer
- * the {@link IEquipmentContainer}
- * @param equipment
- * the {@link IEquipment}
- */
- private static void addReferences(IEquipmentContainer equipmentContainer, IEquipment equipment) {
-
- equipment.setEquipmentContainer(equipmentContainer);
-
- equipmentContainer.getEquipments().put(equipment.getKey(), equipment);
- }
-
- /**
- * Crossing references of {@link IEquipmentContainer} and {@link IEquipmentContainer}.
- *
- * @param equipmentContainer
- * the {@link IEquipmentContainer}
- * @param superEquipmentContainer
- * the {@link IEquipmentContainer}
+ * Crossing references of {@link BaseVoltage} and {@link IConductingEquipment}.
+ *
+ * @param baseVoltage
+ * the base voltage
+ * @param conductingEquipment
+ * the conducting equipment
*/
- private static void addReferences(IEquipmentContainer equipmentContainer, IEquipmentContainer superEquipmentContainer) {
+ private static void addReferences(BaseVoltage baseVoltage, IConductingEquipment conductingEquipment) {
- /* add new reference to super equipment container */
- equipmentContainer.setSuperEquipmentContainer(superEquipmentContainer);
+ conductingEquipment.setBaseVoltage(baseVoltage);
- if(superEquipmentContainer != null) {
- /* add equipment container */
- List<IEquipmentContainer> subEquipmentContainer = superEquipmentContainer.getSubEquipmentContainers();
- if(subEquipmentContainer == null) {
- subEquipmentContainer = new ArrayList<>();
- superEquipmentContainer.setSubEquipmentContainers(subEquipmentContainer);
- }
-
- subEquipmentContainer.add(equipmentContainer);
+ Map<Key, IConductingEquipment> conductingEquipments = baseVoltage.getConductingEquipments();
+ if(conductingEquipments == null) {
+ conductingEquipments = new HashMap<>();
+ baseVoltage.setConductingEquipments(conductingEquipments);
}
+ conductingEquipments.put(conductingEquipment.getKey(), conductingEquipment);
+
}
/**
@@ -118,7 +100,7 @@ public final class StaticTopologyUtilities {
* @param conductingEquipment
* the {@link IConductingEquipment}; can be <code>null</code>
*/
- public static void add(Map<Key, IEntity> connectivityNodes, IConductingEquipment conductingEquipment) {
+ public static void add(Map<UUID, IEntity> connectivityNodes, IConductingEquipment conductingEquipment) {
if(conductingEquipment != null) {
Map<Key, Terminal> terminals = conductingEquipment.getTerminals();
@@ -142,23 +124,17 @@ public final class StaticTopologyUtilities {
* {@link EquipmentContainer} is an entry set of the specified equipment containers, than the
* equipment gets the new reference. Otherwise the {@link EquipmentContainer} would be added to the
* specified equipment containers.
- *
- * @param equipmentContainers
- * the {@link IEquipmentContainer}'s; not <code>null</code>
+ *
+ * @param equipments
+ * the {@link IEquipment}'s; not <code>null</code>
* @param equipment
* the {@link IEquipment}; can be <code>null</code>
*/
- public static void add(Map<Key, IEntity> equipmentContainers, IEquipment equipment) {
+ public static void add(Map<UUID, IEquipment> equipments, IEquipment equipment) {
if(equipment != null) {
- /* get equipment container */
- IEquipmentContainer equipmentContainer = equipment.getEquipmentContainer();
- /* insert equipment container to all equipment containers or get existing instance */
- equipmentContainer = insert(equipmentContainers, equipmentContainer);
-
- /* add references to each objects */
- addReferences(equipmentContainer, equipment);
+ insert(equipments, equipment);
}
}
@@ -173,52 +149,54 @@ public final class StaticTopologyUtilities {
* @param equipmentContainer
* the {@link IEquipmentContainer}; can be <code>null</code>
*/
- public static void add(Map<Key, IEntity> equipmentContainers, IEquipmentContainer equipmentContainer) {
+ public static void add(Map<UUID, IEquipmentContainer> equipmentContainers, IEquipmentContainer equipmentContainer) {
if(equipmentContainer != null) {
- /* get super equipment container */
+ /* get super equipment container if present */
IEquipmentContainer superEquipmentContainer = equipmentContainer.getSuperEquipmentContainer();
/* insert super equipment container to all equipment containers or get existing instance */
+
superEquipmentContainer = insert(equipmentContainers, superEquipmentContainer);
+ /* insert the equipment container to all equipment containers */
+ insert(equipmentContainers, equipmentContainer);
+
/* add references to each objects */
- addReferences(equipmentContainer, superEquipmentContainer);
+ // addReferences(equipmentContainer, superEquipmentContainer);
}
}
/**
* Insert a specified {@link IEntity} into a specified {@link IEntity} container. If the {@link IEntity}
* is already persist the result is the persist instance.
- *
+ *
* @param <T>
* the type of the container
- *
* @param <E>
- * the type of the entity
- *
+ * the type of the super entity
* @param entities
* the target; not <code>null</code>
- * @param entity
- * the entity; can be <code>null</code>
- *
- * @return the entity; not <code>null</code>
+ * @param superEntity
+ * the entities to insert; can be <code>null</code>
+ * @return the entity; can be <code>null</code>
*/
@SuppressWarnings("unchecked")
- private static <T, E> E insert(T entities, E entity) {
+ private static <T, E> E insert(T entities, E superEntity) {
E result = null;
- if(entity != null) {
- Key key = ((IEntity) entity).getKey();
- result = entity;
+ if(superEntity != null) {
+ UUID key = ((IEntity) superEntity).getKey().getId();
+ result = superEntity;
if(entities instanceof Map)
- if(!((Map<Key, E>) entities).containsKey(key))
- ((Map<Key, E>) entities).put(key, entity);
+ if(!((Map<UUID, E>) entities).containsKey(key))
+ ((Map<UUID, E>) entities).put(key, superEntity);
else
- result = ((Map<Key, E>) entities).get(key);
+ result = ((Map<UUID, E>) entities).get(key);
}
+
return result;
}
@@ -231,33 +209,82 @@ public final class StaticTopologyUtilities {
* the entities;
* can be <code>null</code>
*/
- public static void setBaseVoltageOrLineTypeOrSubstationType(Map<Key, IEntity> propertyEntities, List<IEntity> entities) {
+ public static void setBaseVoltageOrLineTypeOrSubstationType(Map<UUID, IEntity> propertyEntities, List<IEntity> entities) {
if((propertyEntities != null) && (entities != null) && (!propertyEntities.isEmpty()))
for(IEntity entity : entities) {
- Key key = null;
+ UUID key = null;
if(entity instanceof IConductingEquipment) {
if(entity instanceof PowerTransformer) {
List<PowerTransformerEnd> powerTransformerEnds = ((PowerTransformer) entity).getPowerTransformerEnds();
powerTransformerEnds.forEach(powerTransformerEnd -> {
- Key powerTransformerEndKey = powerTransformerEnd.getBaseVoltage().getKey();
- powerTransformerEnd.setBaseVoltage((BaseVoltage) propertyEntities.get(powerTransformerEndKey));
+ UUID powerTransformerEndBaseVoltageKey = powerTransformerEnd.getBaseVoltage().getKey().getId();
+ BaseVoltage baseVoltage = (BaseVoltage) propertyEntities.get(powerTransformerEndBaseVoltageKey);
+
+ powerTransformerEnd.setBaseVoltage(baseVoltage);
+ Map<Key, IConductingEquipment> conductingEquipments = baseVoltage.getConductingEquipments();
+ if(conductingEquipments == null)
+ conductingEquipments = new HashMap<>();
+ conductingEquipments.put(powerTransformerEnd.getKey(), (IConductingEquipment) entity);
});
}
- else {
- key = ((IConductingEquipment) entity).getBaseVoltage().getKey();
- ((IConductingEquipment) entity).setBaseVoltage((BaseVoltage) propertyEntities.get(key));
+ else
+ addReferences(insert(propertyEntities, ((IConductingEquipment) entity).getBaseVoltage()), ((IConductingEquipment) entity));
- }
}
else if(Substation.class.equals(entity.getClass())) {
- key = ((Substation) entity).getSubstationType().getKey();
+ key = ((Substation) entity).getSubstationType().getKey().getId();
((Substation) entity).setSubstationType((SubstationType) propertyEntities.get(key));
}
else if(Line.class.equals(entity.getClass())) {
- key = ((Line) entity).getLineType().getKey();
+ key = ((Line) entity).getLineType().getKey().getId();
((Line) entity).setLineType((LineType) propertyEntities.get(key));
}
}
}
+
+ /**
+ * Connect {@link IEquipment}'s with referenced {@link IEquipmentContainer}'s.
+ *
+ * @param equipmentContainers
+ * the equipment containers; can be <code>null</code> or empty
+ * @param conductingEquipments
+ * the conducting equipments; can be <code>null</code> or empty
+ */
+ public static void connectEquipmentsAndContainers(Map<UUID, IEquipmentContainer> equipmentContainers, Map<UUID, IEquipment> conductingEquipments) {
+
+ if((equipmentContainers != null) && !equipmentContainers.isEmpty()) {
+ if((conductingEquipments != null) && !conductingEquipments.isEmpty()) {
+
+ for(IEquipmentContainer equipmentContainer : equipmentContainers.values()) {
+ Map<Key, IEquipment> equipments = equipmentContainer.getEquipments();
+ Map<Key, IEquipment> referencedEquipments = new HashMap<>();
+
+ if((equipments != null) && !equipments.isEmpty()) {
+ for(IEquipment equipment : equipments.values()) {
+ IEquipment reference = conductingEquipments.get(equipment.getKey().getId());
+ if(reference != null) {
+ referencedEquipments.put(reference.getKey(), reference);
+ reference.setEquipmentContainer(equipmentContainer);
+ }
+ }
+ equipmentContainer.setEquipments(referencedEquipments);
+ }
+
+ List<IEquipmentContainer> subEquipmentContainers = equipmentContainer.getSubEquipmentContainers();
+ List<IEquipmentContainer> referencedEquipmentContainers = new ArrayList<>();
+
+ if((subEquipmentContainers != null) && !subEquipmentContainers.isEmpty()) {
+ for(IEquipmentContainer eContainer : subEquipmentContainers) {
+ IEquipmentContainer reference = equipmentContainers.get(eContainer.getKey().getId());
+ if(reference != null) {
+ referencedEquipmentContainers.add(reference);
+ }
+ }
+ equipmentContainer.setSubEquipmentContainers(referencedEquipmentContainers);
+ }
+ }
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/service/src/main/java/org/eclipse/openk/domain/statictopology/service/dataexchange/serializer/SerializerFactory.java b/cim-cache/org.eclipse.openk.domain.static-topology/service/src/main/java/org/eclipse/openk/domain/statictopology/service/dataexchange/serializer/SerializerFactory.java
index b23f00db..adf6fccc 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/service/src/main/java/org/eclipse/openk/domain/statictopology/service/dataexchange/serializer/SerializerFactory.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/service/src/main/java/org/eclipse/openk/domain/statictopology/service/dataexchange/serializer/SerializerFactory.java
@@ -51,12 +51,12 @@ public final class SerializerFactory extends AbstractSerializerFactory {
/* create elements serializer */
{
- key = AbstractSerializer.createKey(StaticTopologyDefaults.SCOPE_ELEMENTS, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ key = AbstractSerializer.createKey(StaticTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCES, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
result.put(key, CimXmlSerializer.class);
}
/* create element-types serializer */
{
- key = AbstractSerializer.createKey(StaticTopologyDefaults.SCOPE_ELEMENT_TYPES, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
+ key = AbstractSerializer.createKey(StaticTopologyDefaults.SCOPE_POWER_SYSTEM_RESOURCE_TYPES, new Version(1), Cim17v07.INSTANCE, DataExchangeFormat.FORMAT_XML_1_0_UTF_8);
result.put(key, CimXmlSerializer.class);
}
/* create topology serializer */
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/service/src/test/java/org/eclipse/openk/domain/statictopology/service/StaticTopologyServiceTest.java b/cim-cache/org.eclipse.openk.domain.static-topology/service/src/test/java/org/eclipse/openk/domain/statictopology/service/StaticTopologyServiceTest.java
index 7c67c9c5..d20dfe27 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/service/src/test/java/org/eclipse/openk/domain/statictopology/service/StaticTopologyServiceTest.java
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/service/src/test/java/org/eclipse/openk/domain/statictopology/service/StaticTopologyServiceTest.java
@@ -30,10 +30,10 @@ public class StaticTopologyServiceTest {
private TestRestTemplate restTemplate;
// call to MockUpStaticTopologyService
- private String restCallToMockup = "http://localhost:9518/source-system/topology/ac-line-segments?revision=3&message-id=16a80e49-1657-4e3d-9c03-23227f5c5329&user-id=asdf&timestamp=2016-11-30T20:06:00.123Z&source=abc";
+ private String restCallToMockup = "http://localhost:9518/source-system/electricity/static-topology/ac-line-segments?revision=3&message-id=16a80e49-1657-4e3d-9c03-23227f5c5329&user-id=asdf&timestamp=2016-11-30T20:06:00.123Z&source=abc";
// call to static topology
- private String restCallToStaticTopology = "http://localhost:9590/source-system/topology/ac-line-segments?revision=3";
+ private String restCallToStaticTopology = "http://localhost:9590/source-system/electricity/static-topology/ac-line-segments?revision=3";
String xml = restTemplate.getForObject(restCallToStaticTopology, String.class);
diff --git a/cim-cache/org.eclipse.openk.domain.static-topology/service/static-topology-service.config b/cim-cache/org.eclipse.openk.domain.static-topology/service/static-topology-service.config
index ae0c6135..10179fe9 100644
--- a/cim-cache/org.eclipse.openk.domain.static-topology/service/static-topology-service.config
+++ b/cim-cache/org.eclipse.openk.domain.static-topology/service/static-topology-service.config
@@ -2,126 +2,126 @@
DP|AcLineSegments|3|XML_1-0.scheme=http
DP|AcLineSegments|3|XML_1-0.host=localhost
DP|AcLineSegments|3|XML_1-0.port=9518
-DP|AcLineSegments|3|XML_1-0.base-path=source-system/topology
+DP|AcLineSegments|3|XML_1-0.base-path=source-system/electricity/static-topology
# BaseVoltages, V3
DP|BaseVoltages|3|XML_1-0.scheme=http
DP|BaseVoltages|3|XML_1-0.host=localhost
DP|BaseVoltages|3|XML_1-0.port=9518
-DP|BaseVoltages|3|XML_1-0.base-path=source-system/topology
+DP|BaseVoltages|3|XML_1-0.base-path=source-system/electricity/static-topology
# Bays, V2
DP|Bays|2|XML_1-0.scheme=http
DP|Bays|2|XML_1-0.host=localhost
DP|Bays|2|XML_1-0.port=9518
-DP|Bays|2|XML_1-0.base-path=source-system/topology
+DP|Bays|2|XML_1-0.base-path=source-system/electricity/static-topology
# Breakers, V3
DP|Breakers|3|XML_1-0.scheme=http
DP|Breakers|3|XML_1-0.host=localhost
DP|Breakers|3|XML_1-0.port=9518
-DP|Breakers|3|XML_1-0.base-path=source-system/topology
+DP|Breakers|3|XML_1-0.base-path=source-system/electricity/static-topology
# BusbarSections, V3
DP|BusbarSections|3|XML_1-0.scheme=http
DP|BusbarSections|3|XML_1-0.host=localhost
DP|BusbarSections|3|XML_1-0.port=9518
-DP|BusbarSections|3|XML_1-0.base-path=source-system/topology
+DP|BusbarSections|3|XML_1-0.base-path=source-system/electricity/static-topology
# Disconnectors, V3
DP|Disconnectors|3|XML_1-0.scheme=http
DP|Disconnectors|3|XML_1-0.host=localhost
DP|Disconnectors|3|XML_1-0.port=9518
-DP|Disconnectors|3|XML_1-0.base-path=source-system/topology
+DP|Disconnectors|3|XML_1-0.base-path=source-system/electricity/static-topology
# EarthFaultCompensators, V1
DP|EarthFaultCompensators|1|XML_1-0.scheme=http
DP|EarthFaultCompensators|1|XML_1-0.host=localhost
DP|EarthFaultCompensators|1|XML_1-0.port=9518
-DP|EarthFaultCompensators|1|XML_1-0.base-path=source-system/topology
+DP|EarthFaultCompensators|1|XML_1-0.base-path=source-system/electricity/static-topology
# EnergyConsumers, V3
DP|EnergyConsumers|3|XML_1-0.scheme=http
DP|EnergyConsumers|3|XML_1-0.host=localhost
DP|EnergyConsumers|3|XML_1-0.port=9518
-DP|EnergyConsumers|3|XML_1-0.base-path=source-system/topology
+DP|EnergyConsumers|3|XML_1-0.base-path=source-system/electricity/static-topology
# EnergySources, V3
DP|EnergySources|3|XML_1-0.scheme=http
DP|EnergySources|3|XML_1-0.host=localhost
DP|EnergySources|3|XML_1-0.port=9518
-DP|EnergySources|3|XML_1-0.base-path=source-system/topology
+DP|EnergySources|3|XML_1-0.base-path=source-system/electricity/static-topology
# GeographicalRegions, V3
DP|GeographicalRegions|3|XML_1-0.scheme=http
DP|GeographicalRegions|3|XML_1-0.host=localhost
DP|GeographicalRegions|3|XML_1-0.port=9518
-DP|GeographicalRegions|3|XML_1-0.base-path=source-system/topology
+DP|GeographicalRegions|3|XML_1-0.base-path=source-system/electricity/static-topology
# Grounds, V1
DP|Grounds|1|XML_1-0.scheme=http
DP|Grounds|1|XML_1-0.host=localhost
DP|Grounds|1|XML_1-0.port=9518
-DP|Grounds|1|XML_1-0.base-path=source-system/topology
+DP|Grounds|1|XML_1-0.base-path=source-system/electricity/static-topology
# GroundingImpedances, V1
DP|GroundingImpedances|1|XML_1-0.scheme=http
DP|GroundingImpedances|1|XML_1-0.host=localhost
DP|GroundingImpedances|1|XML_1-0.port=9518
-DP|GroundingImpedances|1|XML_1-0.base-path=source-system/topology
+DP|GroundingImpedances|1|XML_1-0.base-path=source-system/electricity/static-topology
# Junctions, V3
DP|Junctions|3|XML_1-0.scheme=http
DP|Junctions|3|XML_1-0.host=localhost
DP|Junctions|3|XML_1-0.port=9518
-DP|Junctions|3|XML_1-0.base-path=source-system/topology
+DP|Junctions|3|XML_1-0.base-path=source-system/electricity/static-topology
# Lines
DP|Lines|3|XML_1-0.scheme=http
DP|Lines|3|XML_1-0.host=localhost
DP|Lines|3|XML_1-0.port=9518
-DP|Lines|3|XML_1-0.base-path=source-system/topology
+DP|Lines|3|XML_1-0.base-path=source-system/electricity/static-topology
# LineTypes, V2
DP|LineTypes|2|XML_1-0.scheme=http
DP|LineTypes|2|XML_1-0.host=localhost
DP|LineTypes|2|XML_1-0.port=9518
-DP|LineTypes|2|XML_1-0.base-path=source-system/topology
+DP|LineTypes|2|XML_1-0.base-path=source-system/electricity/static-topology
# LoadBreakSwitches, V3
DP|LoadBreakSwitches|3|XML_1-0.scheme=http
DP|LoadBreakSwitches|3|XML_1-0.host=localhost
DP|LoadBreakSwitches|3|XML_1-0.port=9518
-DP|LoadBreakSwitches|3|XML_1-0.base-path=source-system/topology
+DP|LoadBreakSwitches|3|XML_1-0.base-path=source-system/electricity/static-topology
# PetersenCoils, V1
DP|PetersenCoils|1|XML_1-0.scheme=http
DP|PetersenCoils|1|XML_1-0.host=localhost
DP|PetersenCoils|1|XML_1-0.port=9518
-DP|PetersenCoils|1|XML_1-0.base-path=source-system/topology
+DP|PetersenCoils|1|XML_1-0.base-path=source-system/electricity/static-topology
# Plants, V2
DP|Plants|2|XML_1-0.scheme=http
DP|Plants|2|XML_1-0.host=localhost
DP|Plants|2|XML_1-0.port=9518
-DP|Plants|2|XML_1-0.base-path=source-system/topology
+DP|Plants|2|XML_1-0.base-path=source-system/electricity/static-topology
# PowerTransformers
DP|PowerTransformers|3|XML_1-0.scheme=http
DP|PowerTransformers|3|XML_1-0.host=localhost
DP|PowerTransformers|3|XML_1-0.port=9518
-DP|PowerTransformers|3|XML_1-0.base-path=source-system/topology
+DP|PowerTransformers|3|XML_1-0.base-path=source-system/electricity/static-topology
# SubGeographicalRegions, V2
DP|SubGeographicalRegions|2|XML_1-0.scheme=http
DP|SubGeographicalRegions|2|XML_1-0.host=localhost
DP|SubGeographicalRegions|2|XML_1-0.port=9518
-DP|SubGeographicalRegions|2|XML_1-0.base-path=source-system/topology
+DP|SubGeographicalRegions|2|XML_1-0.base-path=source-system/electricity/static-topology
# Substations, V3
DP|Substations|3|XML_1-0.scheme=http
DP|Substations|3|XML_1-0.host=localhost
DP|Substations|3|XML_1-0.port=9518
-DP|Substations|3|XML_1-0.base-path=source-system/topology
+DP|Substations|3|XML_1-0.base-path=source-system/electricity/static-topology
# SubstationTypes, V3
DP|SubstationTypes|3|XML_1-0.scheme=http
DP|SubstationTypes|3|XML_1-0.host=localhost
DP|SubstationTypes|3|XML_1-0.port=9518
-DP|SubstationTypes|3|XML_1-0.base-path=source-system/topology
+DP|SubstationTypes|3|XML_1-0.base-path=source-system/electricity/static-topology
# Switches, V2
DP|Switches|2|XML_1-0.scheme=http
DP|Switches|2|XML_1-0.host=localhost
DP|Switches|2|XML_1-0.port=9518
-DP|Switches|2|XML_1-0.base-path=source-system/topology
+DP|Switches|2|XML_1-0.base-path=source-system/electricity/static-topology
# TopologyId, V1
DP|TopologyId|1|XML_1-0.scheme=http
DP|TopologyId|1|XML_1-0.host=localhost
DP|TopologyId|1|XML_1-0.port=9518
-DP|TopologyId|1|XML_1-0.base-path=source-system/topology
+DP|TopologyId|1|XML_1-0.base-path=source-system/electricity/static-topology
# VoltageLevels, V3
DP|VoltageLevels|3|XML_1-0.scheme=http
DP|VoltageLevels|3|XML_1-0.host=localhost
DP|VoltageLevels|3|XML_1-0.port=9518
-DP|VoltageLevels|3|XML_1-0.base-path=source-system/topology
+DP|VoltageLevels|3|XML_1-0.base-path=source-system/electricity/static-topology
# ServiceController
SC|static-topology|1.configuration-type=OK
diff --git a/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/MeasurementPoints_Rest_EndPoint.java b/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/MeasurementPoints_Rest_EndPoint.java
index 99c84444..97617259 100644
--- a/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/MeasurementPoints_Rest_EndPoint.java
+++ b/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/MeasurementPoints_Rest_EndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author 2017-10-24 Frank Jäger
*/
@RestController
-@RequestMapping(path = "/domain/measurement")
+@RequestMapping(path = "/domain/electricity/topology-state")
public final class MeasurementPoints_Rest_EndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/Measurements_Rest_EndPoint.java b/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/Measurements_Rest_EndPoint.java
index 01cbb43e..3675d3b0 100644
--- a/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/Measurements_Rest_EndPoint.java
+++ b/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/Measurements_Rest_EndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author 2017-10-24 Frank Jäger
*/
@RestController
-@RequestMapping(path = "/domain/measurement")
+@RequestMapping(path = "/domain/electricity/topology-state")
public final class Measurements_Rest_EndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/SwitchStates_RestEnd_Point.java b/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/SwitchStates_RestEnd_Point.java
index c1714ec9..75118acd 100644
--- a/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/SwitchStates_RestEnd_Point.java
+++ b/cim-cache/org.eclipse.openk.domain.topology-state/infrastructure/src/main/java/org/eclipse/openk/domain/topologystate/infrastructure/dataexchange/rest/SwitchStates_RestEnd_Point.java
@@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author 2017-09-25 Christian Brunzendorf
*/
@RestController
-@RequestMapping(path = "/domain/measurement")
+@RequestMapping(path = "/domain/electricity/topology-state")
public final class SwitchStates_RestEnd_Point extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.domain.topology-state/service/topology-state-service.config b/cim-cache/org.eclipse.openk.domain.topology-state/service/topology-state-service.config
index f62b182a..695bab06 100644
--- a/cim-cache/org.eclipse.openk.domain.topology-state/service/topology-state-service.config
+++ b/cim-cache/org.eclipse.openk.domain.topology-state/service/topology-state-service.config
@@ -2,14 +2,14 @@
DP|Measurements|2|XML_1-0.scheme=http
DP|Measurements|2|XML_1-0.host=localhost
DP|Measurements|2|XML_1-0.port=9511
-DP|Measurements|2|XML_1-0.base-path=source-system/measurement
+DP|Measurements|2|XML_1-0.base-path=source-system/electricity/topology-state
# MeasurementPonts
DP|MeasurementPoints|1|XML_1-0.scheme=http
DP|MeasurementPoints|1|XML_1-0.host=localhost
DP|MeasurementPoints|1|XML_1-0.port=9511
-DP|MeasurementPoints|1|XML_1-0.base-path=source-system/measurement
+DP|MeasurementPoints|1|XML_1-0.base-path=source-system/electricity/topology-state
# SwitchStates
DP|SwitchStates|3|XML_1-0.scheme=http
DP|SwitchStates|3|XML_1-0.host=localhost
DP|SwitchStates|3|XML_1-0.port=9511
-DP|SwitchStates|3|XML_1-0.base-path=source-system/measurement \ No newline at end of file
+DP|SwitchStates|3|XML_1-0.base-path=source-system/electricity/topology-state \ No newline at end of file
diff --git a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/AbstractServiceAdapterController.java b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/AbstractServiceAdapterController.java
index a5addeb7..2e238d84 100644
--- a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/AbstractServiceAdapterController.java
+++ b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/AbstractServiceAdapterController.java
@@ -34,7 +34,6 @@ import org.eclipse.openk.service.adapter.date.RemoteTimer;
import org.eclipse.openk.service.core.IServiceCoreController;
import org.eclipse.openk.service.logic.AbstractServiceLogicController;
-// REMIND 2017-09-27 Christian Brunzendorf: Entwicklerreview Ok
/**
* The base of all service controllers.
*
diff --git a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporter.java b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporter.java
index f467e3b0..502db0d3 100644
--- a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporter.java
+++ b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporter.java
@@ -26,7 +26,6 @@ import org.eclipse.openk.service.core.AbstractServiceComponent;
import org.eclipse.openk.service.core.IServiceContext;
import org.eclipse.openk.service.model.repository.IModelMapper;
-// REMIND 2017-09-27 Christian Brunzendorf: Entwicklerreview Ok
/**
* The base of all {@link Deprecated_IImporter}s.
*
diff --git a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporterFactory.java b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporterFactory.java
index 2d385bb6..1489d86c 100644
--- a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporterFactory.java
+++ b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractImporterFactory.java
@@ -38,7 +38,6 @@ public abstract class Deprecated_AbstractImporterFactory implements Deprecated_I
@SuppressWarnings({ "checkstyle:cyclomaticcomplexity", "checkstyle:magicnumber", "unchecked" })
public <C extends ImporterConfiguration, I, P> Deprecated_IImporter<C, I, P> createImporter(String scope, IVersion version, CommunicationTechnology communicationTechnology, IDataExchangeFormat importFormat) {
- // REMIND 2017-09-27 Christian Brunzendorf: Für Vorführung -> Entscheidung
Class<?> type = findImporterType(Deprecated_AbstractImporter.createKey(scope, version, communicationTechnology, importFormat));
Deprecated_IImporter<C, I, P> result = null;
diff --git a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractRestImporter.java b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractRestImporter.java
index 8acc8351..29be5055 100644
--- a/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractRestImporter.java
+++ b/cim-cache/org.eclipse.openk.service/adapter/src/main/java/org/eclipse/openk/service/adapter/dataexchange/importer/Deprecated_AbstractRestImporter.java
@@ -30,7 +30,6 @@ import java.net.URL;
import com.google.common.io.ByteStreams;
-//REMIND 2017-09-27 Christian Brunzendorf: Entwicklerreview Ok
/**
* The base of all <i>REST</i> importers.
*
diff --git a/cim-cache/org.eclipse.openk.service/infrastructure/src/main/java/org/eclipse/openk/service/infrastructure/dataexchange/rest/AbstractHttpRestEndPoint.java b/cim-cache/org.eclipse.openk.service/infrastructure/src/main/java/org/eclipse/openk/service/infrastructure/dataexchange/rest/AbstractHttpRestEndPoint.java
index 0dfaf623..c585073e 100644
--- a/cim-cache/org.eclipse.openk.service/infrastructure/src/main/java/org/eclipse/openk/service/infrastructure/dataexchange/rest/AbstractHttpRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.service/infrastructure/src/main/java/org/eclipse/openk/service/infrastructure/dataexchange/rest/AbstractHttpRestEndPoint.java
@@ -13,7 +13,6 @@
*/
package org.eclipse.openk.service.infrastructure.dataexchange.rest;
-import java.io.IOException;
import java.net.HttpURLConnection;
import java.util.Map;
@@ -149,7 +148,14 @@ public abstract class AbstractHttpRestEndPoint {
try(HttpResponseWriter writerWrapper = new HttpResponseWriter(response)) {
P requestParameters = null;
- Version version = getVersion(requestProperties);
+ Version version = null;
+ try {
+ version = getVersion(requestProperties);
+ }
+ catch(InvalidParameterException | MissingParameterException exception) {
+ getLogger().warn(exception);
+ response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);
+ }
/* create suitable responder */
{
@@ -164,7 +170,13 @@ public abstract class AbstractHttpRestEndPoint {
/* create request parameters */
{
if(responder != null)
- requestParameters = ParameterUtilities.createParameters(responder.getRequestParametersObjectType(), requestProperties);
+ try {
+ requestParameters = ParameterUtilities.createParameters(responder.getRequestParametersObjectType(), requestProperties);
+ }
+ catch(InvalidParametersException exception) {
+ getLogger().warn(exception);
+ response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);
+ }
}
/* write response */
@@ -177,21 +189,18 @@ public abstract class AbstractHttpRestEndPoint {
responder.writeResponse(writerWrapper, requestParameters);
}
catch(InvalidParameterException exception) {
- getLogger().debug("http status 410");
+ getLogger().debug("http status 410; " + exception.getText());
writerWrapper.getResponse().setStatus(HttpURLConnection.HTTP_GONE);
}
+ catch(IllegalArgumentException exception) {
+ // REMIND 2017-11-07 Christian Brunzendorf: raus sobald die Schnittstelle komplett unterstützt wird
+ getLogger().debug("http status 400; " + exception.getMessage());
+ writerWrapper.getResponse().setStatus(HttpURLConnection.HTTP_BAD_REQUEST);
+ }
}
}
- catch(InvalidParametersException | MissingParameterException exception) {
- getLogger().warn(exception);
- response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);
- }
- catch(IOException exception) {
- getLogger().fatal(exception); // REMIND 2017-08-11 Felix: Logger für anderes Loglevel anpassen: Hier eher "warn"
- response.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR);
- }
catch(Throwable exception) {
- getLogger().fatal(exception);
+ getLogger().fatal(exception); // REMIND 2017-08-11 Felix: Logger für anderes Loglevel anpassen: Hier eher "warn"
response.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR);
}
}
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/adapter/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/adapter/dataexchange/mapper/MockUpModelToCimMapper.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/adapter/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/adapter/dataexchange/mapper/MockUpModelToCimMapper.java
index 9581bfa8..112dbdf9 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/adapter/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/adapter/dataexchange/mapper/MockUpModelToCimMapper.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/adapter/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/adapter/dataexchange/mapper/MockUpModelToCimMapper.java
@@ -29,6 +29,7 @@ import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.SubGeographical
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Substation;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.Terminal;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Core.VoltageLevel;
+import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Line;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.Plant;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.PowerTransformer;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.PowerTransformerEnd;
@@ -119,14 +120,17 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
if(PowerTransformer.class.isAssignableFrom(entity.getClass()))
result = createSeparatedPowerTransformer((PowerTransformer) entity);
else {
- if(entity.getTerminals() != null) {
- List<Terminal> terminals = new ArrayList<>(entity.getTerminals().size());
+ List<Terminal> terminals = entity.getTerminals();
+ if(terminals != null) {
+ List<Terminal> destinationTerminals = new ArrayList<>(terminals.size());
- for(Terminal terminal : entity.getTerminals())
- terminals.add(createSeparatedTerminal(terminal));
+ for(Terminal terminal : terminals)
+ destinationTerminals.add(createSeparatedTerminal(terminal));
- result.setTerminals(terminals);
+ result.setTerminals(destinationTerminals);
}
+ result.setBaseVoltage(createIdentifiedObject(entity.getBaseVoltage()));
+
if(result.getEquipmentContainer() != null)
result.setEquipmentContainer(null);
@@ -153,24 +157,18 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
C result = TypeUtilities.createCopy(entity);
/* separate included Equipments */
- if((entity.getEquipments() != null) && withEquipment) {
- ConductingEquipment conductingEquipment;
- List<Equipment> equipments = new ArrayList<>(entity.getEquipments().size());
-
- for(Equipment equipment : entity.getEquipments()) {
- conductingEquipment = new ConductingEquipment();
- conductingEquipment.setMRID(equipment.getMRID());
-
- equipments.add(conductingEquipment);
- }
+ result.setEquipments(separatedEquipment(entity.getEquipments()));
- result.setEquipments(equipments);
+ /* separate containing equipment container by line */
+ if(Line.class.equals(entity.getClass())) {
+ ((Line) result).setPSRType(createIdentifiedObject(((Line) entity).getPSRType()));
+ ((Line) result).setRegion(null);
}
- else
- result.setEquipments(null);
/* separate containing equipment container by substation */
if(Substation.class.equals(entity.getClass())) {
+ ((Substation) result).setPSRType(createIdentifiedObject(((Substation) entity).getPSRType()));
+ ((Substation) result).setRegion(null);
((Substation) result).setBays(separateEquipmentContainer(((Substation) entity).getBays()));
((Substation) result).setVoltageLevels(separateEquipmentContainer(((Substation) entity).getVoltageLevels()));
}
@@ -178,10 +176,11 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
/* separate containing equipment container by voltage level */
if(VoltageLevel.class.equals(entity.getClass())) {
((VoltageLevel) result).setEquipments(separatedEquipment(((VoltageLevel) entity).getEquipments()));
- ((VoltageLevel) result).setBays(null);
+ ((VoltageLevel) result).setBays(separateEquipmentContainer(((VoltageLevel) entity).getBays()));
((VoltageLevel) result).setBaseVoltage(createIdentifiedObject(((VoltageLevel) entity).getBaseVoltage()));
- ((VoltageLevel) result).setSubstation(createIdentifiedObject(((VoltageLevel) entity).getSubstation()));
+ ((VoltageLevel) result).setSubstation(null);
}
+
return result;
}
@@ -189,21 +188,16 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
* Creates the separated plant.
*
* @param entity
- *
* the entity; not <code>null</code>
* @return the i cim entity; not <code>null</code>
*/
private ICimEntity createSeparatedPlant(Plant entity) {
- List<Equipment> conductingEquipments = new ArrayList<>();
+ Plant result = TypeUtilities.createCopy(entity);
- for(Equipment equipment : entity.getEquipments())
- conductingEquipments.add(createIdentifiedObject(equipment));
+ result.setEquipments(separatedEquipment(entity.getEquipments()));
- Plant plant = TypeUtilities.createCopy(entity);
- plant.setEquipments(conductingEquipments);
-
- return plant;
+ return result;
}
/**
@@ -217,9 +211,27 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
SubGeographicalRegion separatedSubGeographicalRegion = TypeUtilities.createCopy(entity);
- separatedSubGeographicalRegion.setRegion(createIdentifiedObject(entity.getRegion()));
- separatedSubGeographicalRegion.setLines(null);
- separatedSubGeographicalRegion.setSubstations(null);
+ separatedSubGeographicalRegion.setRegion(null);
+
+ /* separate lines */
+ List<Line> lines = separatedSubGeographicalRegion.getLines();
+ if((lines != null) && !lines.isEmpty()) {
+ List<Line> separatedLines = new ArrayList<>(lines.size());
+ for(Line line : lines) {
+ separatedLines.add(createIdentifiedObject(line));
+ }
+ separatedSubGeographicalRegion.setLines(separatedLines);
+ }
+
+ /* separate substations */
+ List<Substation> substations = separatedSubGeographicalRegion.getSubstations();
+ if((substations != null) && !substations.isEmpty()) {
+ List<Substation> separatedSubstations = new ArrayList<>(substations.size());
+ for(Substation substation : substations) {
+ separatedSubstations.add(createIdentifiedObject(substation));
+ }
+ separatedSubGeographicalRegion.setSubstations(separatedSubstations);
+ }
return separatedSubGeographicalRegion;
}
@@ -235,14 +247,15 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
GeographicalRegion separatedGeographicalRegion = TypeUtilities.createCopy(entity);
- if(entity.getRegions() != null) {
- List<SubGeographicalRegion> separatedSubGeographicalRegions = new ArrayList<>(entity.getRegions().size());
-
- for(SubGeographicalRegion subGeographicalRegion : entity.getRegions()) {
- separatedSubGeographicalRegions.add(createIdentifiedObject(subGeographicalRegion));
+ List<SubGeographicalRegion> regions = separatedGeographicalRegion.getRegions();
+ if((regions != null) && !regions.isEmpty()) {
+ List<SubGeographicalRegion> separatedRegions = new ArrayList<>(regions.size());
+ for(SubGeographicalRegion subGeographicalRegion : regions) {
+ separatedRegions.add(createIdentifiedObject(subGeographicalRegion));
}
- separatedGeographicalRegion.setRegions(separatedSubGeographicalRegions);
+ separatedGeographicalRegion.setRegions(separatedRegions);
}
+
return separatedGeographicalRegion;
}
@@ -308,6 +321,9 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
/* Create a shallow copy of the given PowerTransformerEnd */
PowerTransformerEnd separatedEnd = TypeUtilities.createCopy(entity);
+ /* create BaseVoltage reference */
+ separatedEnd.setBaseVoltage(createIdentifiedObject(separatedEnd.getBaseVoltage()));
+
/* Remove the back reference to the enclosing PowerTransformer */
separatedEnd.setPowerTransformer(null);
@@ -359,14 +375,9 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
Terminal result = TypeUtilities.createCopy(terminal);
/* create separated connectivity node */
- if(terminal.getConnectivityNode() != null) {
- ConnectivityNode connectivityNode = new ConnectivityNode();
-
- connectivityNode.setMRID(terminal.getConnectivityNode().getMRID());
-
- result.setConnectivityNode(connectivityNode);
- }
-
+ String name = terminal.getConnectivityNode().getName();
+ result.setConnectivityNode(createIdentifiedObject(terminal.getConnectivityNode()));
+ result.getConnectivityNode().setName(name);
/* separate terminal from conducting equipment */
result.setConductingEquipment(null);
@@ -431,10 +442,10 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
if((equipments != null) && !equipments.isEmpty()) {
result = new ArrayList<>(equipments.size());
for(Equipment equipment : equipments) {
- C referenz = (C) new Equipment();
- referenz.setMRID(equipment.getMRID());
+ // C referenz = (C) new Equipment();
+ // referenz.setMRID(equipment.getMRID());
- result.add(referenz);
+ result.add((C) createIdentifiedObject(equipment));
}
}
return result;
@@ -455,10 +466,10 @@ public final class MockUpModelToCimMapper<E extends ICimEntity> extends Abstract
if((equipmentContainers != null) && !equipmentContainers.isEmpty()) {
result = new ArrayList<>(equipmentContainers.size());
for(EquipmentContainer equipmentContainer : equipmentContainers) {
- C referenz = (C) new EquipmentContainer();
- referenz.setMRID(equipmentContainer.getMRID());
+ // C referenz = (C) new EquipmentContainer();
+ // referenz.setMRID(equipmentContainer.getMRID());
- result.add(referenz);
+ result.add((C) createIdentifiedObject(equipmentContainer));
}
}
return result;
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/core/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/core/MockUpStaticTopologyDefaults.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/core/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/core/MockUpStaticTopologyDefaults.java
index 80fdfa4e..772ec89b 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/core/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/core/MockUpStaticTopologyDefaults.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/core/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/core/MockUpStaticTopologyDefaults.java
@@ -7,7 +7,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * http://www.eclipse.org/legal/epl-v10.html
*
* -----------------------------------------------------------------------------
*/
@@ -22,7 +22,7 @@ public final class MockUpStaticTopologyDefaults {
// Constants
/* repository-keys */
- public static final String REPOSITORY_KEY_TOPOLOGY = "topology";
+ public static final String REPOSITORY_KEY_TOPOLOGY = "static-topology";
/* scopes */
public static final String SCOPE_AC_LINE_SEGMENTS = "AcLineSegments";
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/AcLineSegmentsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/AcLineSegmentsRestEndPoint.java
index f71df936..60c771e7 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/AcLineSegmentsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/AcLineSegmentsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class AcLineSegmentsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaseVoltagesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaseVoltagesRestEndPoint.java
index b69ec69c..c282f8e3 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaseVoltagesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaseVoltagesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class BaseVoltagesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaysRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaysRestEndPoint.java
index 3c2c4b77..2ad31bc7 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaysRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BaysRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class BaysRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BreakersRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BreakersRestEndPoint.java
index 6a607aab..56273c9d 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BreakersRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BreakersRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class BreakersRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BusbarSectionsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BusbarSectionsRestEndPoint.java
index 5a3d1c4c..bbd1adab 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BusbarSectionsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/BusbarSectionsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class BusbarSectionsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/DisconnectorsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/DisconnectorsRestEndPoint.java
index 01040d29..11dd56e0 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/DisconnectorsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/DisconnectorsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class DisconnectorsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EarthFaultCompensatorsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EarthFaultCompensatorsRestEndPoint.java
index b6fa0274..3fac0133 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EarthFaultCompensatorsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EarthFaultCompensatorsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class EarthFaultCompensatorsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergyConsumersRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergyConsumersRestEndPoint.java
index 97cf0433..2126a20c 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergyConsumersRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergyConsumersRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class EnergyConsumersRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergySourcesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergySourcesRestEndPoint.java
index ae606712..badbe9dc 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergySourcesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/EnergySourcesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class EnergySourcesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GeographicalRegionsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GeographicalRegionsRestEndPoint.java
index b727dd7f..5b32fcd2 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GeographicalRegionsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GeographicalRegionsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class GeographicalRegionsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundingImpedancesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundingImpedancesRestEndPoint.java
index 0eac9b9b..84456e6c 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundingImpedancesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundingImpedancesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class GroundingImpedancesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundsRestEndPoint.java
index 436adb28..02f3ac4b 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/GroundsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class GroundsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/JunctionsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/JunctionsRestEndPoint.java
index 280f5d70..4a646d85 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/JunctionsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/JunctionsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class JunctionsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LineTypesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LineTypesRestEndPoint.java
index 8689fb4b..209ac20b 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LineTypesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LineTypesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class LineTypesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LinesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LinesRestEndPoint.java
index cbf07849..47a14b56 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LinesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LinesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class LinesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LoadBreakSwitchesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LoadBreakSwitchesRestEndPoint.java
index b19e7009..58eb5c4c 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LoadBreakSwitchesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/LoadBreakSwitchesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class LoadBreakSwitchesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PetersenCoilsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PetersenCoilsRestEndPoint.java
index ea10046b..af1711b5 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PetersenCoilsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PetersenCoilsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class PetersenCoilsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PlantsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PlantsRestEndPoint.java
index 616d73dd..94bd222e 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PlantsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PlantsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class PlantsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PowerTransformersRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PowerTransformersRestEndPoint.java
index 8551fba7..d7d0f193 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PowerTransformersRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/PowerTransformersRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class PowerTransformersRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubGeographicalRegionsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubGeographicalRegionsRestEndPoint.java
index c79a50db..af56ad51 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubGeographicalRegionsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubGeographicalRegionsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class SubGeographicalRegionsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationTypesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationTypesRestEndPoint.java
index ef7f5adb..4f28f3ed 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationTypesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationTypesRestEndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Felix Korb
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class SubstationTypesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationsRestEndPoint.java
index 56a24d93..27de6acc 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SubstationsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class SubstationsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SwitchesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SwitchesRestEndPoint.java
index 19f0ee5c..62e3a798 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SwitchesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/SwitchesRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class SwitchesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyIdRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyIdRestEndPoint.java
index 1175c3e9..333d2b18 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyIdRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyIdRestEndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class TopologyIdRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyRestEndPoint.java
index 76f4436f..5a5f8aa5 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/TopologyRestEndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class TopologyRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/VoltageLevelsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/VoltageLevelsRestEndPoint.java
index 66982f1c..05478f6b 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/VoltageLevelsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/infrastructure/dataexchange/rest/VoltageLevelsRestEndPoint.java
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/topology")
+@RequestMapping(path = "/source-system/electricity/static-topology")
public final class VoltageLevelsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/MockUpStaticTopologyUtilities.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/MockUpStaticTopologyUtilities.java
index 3459322b..861facbb 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/MockUpStaticTopologyUtilities.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/MockUpStaticTopologyUtilities.java
@@ -390,10 +390,14 @@ public final class MockUpStaticTopologyUtilities {
List<Substation> substations = new ArrayList<>();
for(EquipmentContainer equipmentContainer : equipmentContainers) {
- if(Substation.class.isAssignableFrom(equipmentContainer.getClass()))
+ if(Substation.class.isAssignableFrom(equipmentContainer.getClass())) {
substations.add((Substation) equipmentContainer);
- else if(Line.class.isAssignableFrom(equipmentContainer.getClass()))
+ ((Substation) equipmentContainer).setRegion(subGeographicalRegion);
+ }
+ else if(Line.class.isAssignableFrom(equipmentContainer.getClass())) {
lines.add((Line) equipmentContainer);
+ ((Line) equipmentContainer).setRegion(subGeographicalRegion);
+ }
else
throw new IllegalArgumentException("equipmentContainers");
}
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/PowerTransformerFactory.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/PowerTransformerFactory.java
index 87eeab9a..76ff1621 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/PowerTransformerFactory.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/PowerTransformerFactory.java
@@ -7,7 +7,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * http://www.eclipse.org/legal/epl-v10.html
*
* -----------------------------------------------------------------------------
*/
@@ -15,9 +15,9 @@ package org.eclipse.openk.sourcesystem.mockupstatictopology.logic.processor.topo
import java.util.ArrayList;
import java.util.List;
-import java.util.UUID;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Domain.ApparentPower;
+import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Domain.PerCent;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Domain.UnitMultiplier;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Domain.UnitSymbol;
import org.eclipse.openk.cim.cim17v07.TC57CIM.IEC61970.Base.Wires.PowerTransformer;
@@ -33,6 +33,11 @@ public final class PowerTransformerFactory extends AbstractConductingEquipmentFa
// Constants
public static final double DEFAULT_APPARENT_POWER = 20D;
+ public static final int DEFAULT_LOW_STEP = 5;
+ public static final int DEFAULT_NORMAL_STEP = 5;
+ public static final int DEFAULT_HIGH_STEP = 40;
+ public static final double DEFAULT_STEP = 20D;
+ public static final double DEFAULT_STEP_VOLTAGE_INCREMENT_VALUE = 30D;
public static final String DEFAULT_VECTOR_GROUP = "Dyn1";
// Constructors
@@ -61,6 +66,25 @@ public final class PowerTransformerFactory extends AbstractConductingEquipmentFa
}
/**
+ * Creates the instance of {@link PerCent}.
+ *
+ * @return the {@link PerCent}; not <code>null</code>
+ */
+ private PerCent createPerCent() {
+
+ PerCent result = new PerCent();
+
+ /* set triple of multiplier, unit and value */
+ result.setMultiplier(UnitMultiplier.none);
+
+ result.setUnit(UnitSymbol.none);
+
+ result.setValue(Double.valueOf(DEFAULT_STEP_VOLTAGE_INCREMENT_VALUE));
+
+ return result;
+ }
+
+ /**
* Creates the {@link PowerTransformerEnd}s.
*
* @param topologyElement
@@ -84,7 +108,7 @@ public final class PowerTransformerFactory extends AbstractConductingEquipmentFa
powerTransformerEnd = new PowerTransformerEnd();
/* MRID, name, description */
- setMridAndNameAndDescription(powerTransformerEnd, UUID.randomUUID(), PowerTransformerEnd.class.getSimpleName() + " " + (i + 1), null);
+ setMridAndNameAndDescription(powerTransformerEnd, null, PowerTransformerEnd.class.getSimpleName() + " " + (i + 1), null);
/* BaseVoltage */
powerTransformerEnd.setBaseVoltage(factoryParameters.getBaseVoltages()[i]);
@@ -118,7 +142,17 @@ public final class PowerTransformerFactory extends AbstractConductingEquipmentFa
RatioTapChanger result = new RatioTapChanger();
- setMridAndNameAndDescription(result, UUID.randomUUID(), RatioTapChanger.class.getSimpleName(), null);
+ setMridAndNameAndDescription(result, null, RatioTapChanger.class.getSimpleName(), null);
+
+ result.setLowStep(Integer.valueOf(DEFAULT_LOW_STEP));
+
+ result.setNormalStep(Integer.valueOf(DEFAULT_NORMAL_STEP));
+
+ result.setHighStep(Integer.valueOf(DEFAULT_HIGH_STEP));
+
+ result.setStep(Double.valueOf(DEFAULT_STEP));
+
+ result.setStepVoltageIncrement(createPerCent());
return result;
}
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/referencetopology/ReferenceTopologyFactory.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/referencetopology/ReferenceTopologyFactory.java
index 3076cf56..a8213101 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/referencetopology/ReferenceTopologyFactory.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/logic/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/logic/processor/topologyfactory/referencetopology/ReferenceTopologyFactory.java
@@ -7,7 +7,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * http://www.eclipse.org/legal/epl-v10.html
*
* -----------------------------------------------------------------------------
*/
@@ -192,8 +192,7 @@ public final class ReferenceTopologyFactory implements ITopologyFactory<NoParame
result.add(lowVoltageBaseVoltage);
BaseVoltage midVoltageBaseVoltage = create(BaseVoltage.class, new BaseVoltageFactoryParameters(MID_VOLTAGE_BASE_VOLTAGE_UUID, 10D));
result.add(midVoltageBaseVoltage);
-
-
+
/* Bays */
Bay lowVoltageBay = create(Bay.class, new TopologyElementFactoryParameters(LOW_VOLTAGE_BAY_UUID, "LowVoltage " + Bay.class.getSimpleName(), null));
result.add(lowVoltageBay);
@@ -303,51 +302,51 @@ public final class ReferenceTopologyFactory implements ITopologyFactory<NoParame
* group bays
*/
{
- MockUpStaticTopologyUtilities.group(midVoltageBay, breaker, disconnector);
- MockUpStaticTopologyUtilities.group(lowVoltageBay, loadBreakSwitch);
+ MockUpStaticTopologyUtilities.group(midVoltageBay, breaker, disconnector); // bay <-> equipments
+ MockUpStaticTopologyUtilities.group(lowVoltageBay, loadBreakSwitch); // bay <-> equipments
}
/*
* group voltage-levels
*/
{
- MockUpStaticTopologyUtilities.group(midVoltageVoltageLevel, midVoltageBay);
- MockUpStaticTopologyUtilities.group(lowVoltageVoltageLevel, lowVoltageBay);
+ MockUpStaticTopologyUtilities.group(midVoltageVoltageLevel, midVoltageBay); // voltagelevel -> bays
+ MockUpStaticTopologyUtilities.group(lowVoltageVoltageLevel, lowVoltageBay); // voltagelevel -> bays
}
/*
* group substation
*/
{
- MockUpStaticTopologyUtilities.group(substation, midVoltageVoltageLevel, busbarSection, powerTransformer, earthFaultCompensator, ground, groundingImpedance, petersenCoil, lowVoltageVoltageLevel);
+ MockUpStaticTopologyUtilities.group(substation, midVoltageVoltageLevel, busbarSection, powerTransformer, earthFaultCompensator, ground, groundingImpedance, petersenCoil, lowVoltageVoltageLevel); // substation -> powerSystemResources
}
/*
* group plant
*/
{
- MockUpStaticTopologyUtilities.group(plant, energySource);
+ MockUpStaticTopologyUtilities.group(plant, energySource); // plant <-> energySources
}
/*
* group line
*/
{
- MockUpStaticTopologyUtilities.group(line, northAcLineSegment, junction, southAcLineSegment);
+ MockUpStaticTopologyUtilities.group(line, northAcLineSegment, junction, southAcLineSegment); // line <-> equipments
}
/*
* group sub-geographical-region
*/
{
- MockUpStaticTopologyUtilities.group(subGeographicalRegion, substation, line);
+ MockUpStaticTopologyUtilities.group(subGeographicalRegion, substation, line); // sub-geo <-> equipmentContainers
}
/*
* group geographical-region
*/
{
- MockUpStaticTopologyUtilities.group(geographicalRegion, subGeographicalRegion);
+ MockUpStaticTopologyUtilities.group(geographicalRegion, subGeographicalRegion); // geo <-> sub-geo-regions
}
/*
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyService.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyService.java
index b6195702..5fc8ed34 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyService.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/main/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyService.java
@@ -7,7 +7,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * http://www.eclipse.org/legal/epl-v10.html
*
* -----------------------------------------------------------------------------
*/
@@ -55,6 +55,8 @@ public class MockUpStaticTopologyService extends AbstractServiceAdapterControlle
/* injected attributes */
@Autowired
private IMapperFactory mapperFactory;
+ // @Autowired
+ // private IReceiverFactory receiverFactory;
@Autowired
private IResponderFactory responderFactory;
@Autowired
@@ -68,6 +70,22 @@ public class MockUpStaticTopologyService extends AbstractServiceAdapterControlle
super(MockUpStaticTopologyService.class, DOMAIN, VERSION);
}
+ // CLEARING 2017-09-27 Renko => Felix: auskommentiertes löschen? => Nein, wird später wieder benötigt.
+
+ // Methods
+ // @Override
+ // protected Map<String, IReceiver<?, ?, ?>> createReceivers() {
+ //
+ // IReceiver<?, ?, ?> receiver;
+ // Map<String, IReceiver<?, ?, ?>> result = new HashMap<>();
+ //
+ // /* topology */
+ // receiver = receiverFactory.createReceiver(MockUpStaticTopologyDefaults.SCOPE_TOPOLOGY, new Version(2), CommunicationTechnology.File, DataExchangeFormat.FORMAT_XML_1_0_UTF_8_RDF_1_1);
+ // result.put(receiver.getKey(), receiver);
+ //
+ // return result;
+ // }
+
@Override
protected final void initializeRepositories(Map<String, IRepository<?, ?>> repositories) {
@@ -83,9 +101,41 @@ public class MockUpStaticTopologyService extends AbstractServiceAdapterControlle
repository.saveAll(ReferenceTopologyFactory.INSTANCE.create(null));
repositories.put(MockUpStaticTopologyDefaults.REPOSITORY_KEY_TOPOLOGY, repository);
+
}
}
+ // /**
+ // * Recursively stores all objects that are part of the provided topology in the provided repository.
+ // *
+ // * @param repository
+ // * the repository
+ // * @param subtopology
+ // * an object from the topology to save
+ // */
+ // private void saveAll(IRepository<String, ICimIdentifiedObject> repository, ICimIdentifiedObject subtopology) {
+ //
+ // if(subtopology != null && repository.find(subtopology.getKey()) == null) {
+ // repository.save(subtopology);
+ // if(subtopology instanceof EquipmentContainer) {
+ // EquipmentContainer container = (EquipmentContainer) subtopology;
+ // if(container.getEquipments() != null)
+ // container.getEquipments().forEach(e -> saveAll(repository, e));
+ // }
+ // else if(subtopology instanceof ConductingEquipment) {
+ // ConductingEquipment equipment = (ConductingEquipment) subtopology;
+ // saveAll(repository, equipment.getEquipmentContainer());
+ // if(equipment.getTerminals() != null)
+ // equipment.getTerminals() //
+ // .stream() //
+ // .map(t -> t.getConnectivityNode()) //
+ // .flatMap(c -> c.getTerminals() != null ? c.getTerminals().stream() : Stream.empty()) //
+ // .map(Terminal::getConductingEquipment) //
+ // .forEach(e -> saveAll(repository, e));
+ // }
+ // }
+ // }
+
@Override
@PostConstruct
public final void initializeService() {
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AbstractMockUpStaticTopologyResponderTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AbstractMockUpStaticTopologyResponderTest.java
index 7e823e82..4eed3cc7 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AbstractMockUpStaticTopologyResponderTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AbstractMockUpStaticTopologyResponderTest.java
@@ -130,7 +130,7 @@ public class AbstractMockUpStaticTopologyResponderTest implements IIntegrationTe
public void getRequest_IfAcLineSegments_V3IsInvalidTopologyId_ThenGetHttpResponseCode410() {
/* when */
- ResponseEntity<String> result = exchange("/source-system/topology/ac-line-segments?revision=3&topology-id=8a92e570-ed5d-4518-8b66-5c441519644");
+ ResponseEntity<String> result = exchange("/source-system/electricity/static-topology/ac-line-segments?revision=3&topology-id=8a92e570-ed5d-4518-8b66-5c441519644");
/* then */
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.GONE);
@@ -147,7 +147,7 @@ public class AbstractMockUpStaticTopologyResponderTest implements IIntegrationTe
LOGGER.debug("originRepositoryId: " + originRepositoryId);
/* when */
- ResponseEntity<String> result = exchange("/source-system/topology/ac-line-segments?revision=3&topology-id=" + originRepositoryId);
+ ResponseEntity<String> result = exchange("/source-system/electricity/static-topology/ac-line-segments?revision=3&topology-id=" + originRepositoryId);
/* then */
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
@@ -157,7 +157,7 @@ public class AbstractMockUpStaticTopologyResponderTest implements IIntegrationTe
public void getRequest_IfAcLineSegments_V3IsValidWithoutTopologyId_ThenGetHttpResponseCode200() {
/* when */
- ResponseEntity<String> result = exchange("/source-system/topology/ac-line-segments?revision=3");
+ ResponseEntity<String> result = exchange("/source-system/electricity/static-topology/ac-line-segments?revision=3");
/* then */
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
@@ -177,7 +177,7 @@ public class AbstractMockUpStaticTopologyResponderTest implements IIntegrationTe
repository.save(new CimIdentifiedObjectMock("CimIdentifiedObjectMockKeyAdded"));
LOGGER.debug("RepositoryId after saving: " + repository.getRepositoryId());
- ResponseEntity<String> result = exchange("/source-system/topology/ac-line-segments?revision=3&topology-id=" + repository.getRepositoryId());
+ ResponseEntity<String> result = exchange("/source-system/electricity/static-topology/ac-line-segments?revision=3&topology-id=" + repository.getRepositoryId());
/* then */
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
@@ -197,7 +197,7 @@ public class AbstractMockUpStaticTopologyResponderTest implements IIntegrationTe
repository.save(new CimIdentifiedObjectMock("CimIdentifiedObjectMockKeyAdded"));
LOGGER.debug("RepositoryId after saving: " + repository.getRepositoryId());
- ResponseEntity<String> result = exchange("/source-system/topology/ac-line-segments?revision=3&topology-id=" + originRepositoryId);
+ ResponseEntity<String> result = exchange("/source-system/electricity/static-topology/ac-line-segments?revision=3&topology-id=" + originRepositoryId);
/* then */
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.GONE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AcLineSegmentsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AcLineSegmentsIntegrationTest.java
index 0bb9f76a..0c0c00f4 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AcLineSegmentsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/AcLineSegmentsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class AcLineSegmentsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/ac-line-segments";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/ac-line-segments";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class AcLineSegmentsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaseVoltagesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaseVoltagesIntegrationTest.java
index 88e059a7..878b1181 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaseVoltagesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaseVoltagesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class BaseVoltagesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/base-voltages";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/base-voltages";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class BaseVoltagesIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaysIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaysIntegrationTest.java
index ad0b1220..106bbc19 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaysIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BaysIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class BaysIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/bays";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/bays";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -53,7 +53,7 @@ public class BaysIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BreakersIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BreakersIntegrationTest.java
index 2fbfdf53..969f2fb9 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BreakersIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BreakersIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class BreakersIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/breakers";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/breakers";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class BreakersIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BusbarSectionsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BusbarSectionsIntegrationTest.java
index 1005b56e..3af8cfcc 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BusbarSectionsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/BusbarSectionsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class BusbarSectionsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/busbar-sections";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/busbar-sections";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class BusbarSectionsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/DisconnectorsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/DisconnectorsIntegrationTest.java
index 9589095f..d706c0c7 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/DisconnectorsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/DisconnectorsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class DisconnectorsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/disconnectors";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/disconnectors";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class DisconnectorsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EarthFaultCompensatorsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EarthFaultCompensatorsIntegrationTest.java
index c01ddf44..0f1ab390 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EarthFaultCompensatorsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EarthFaultCompensatorsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class EarthFaultCompensatorsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/earth-fault-compensators";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/earth-fault-compensators";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "1";
@@ -53,7 +53,7 @@ public class EarthFaultCompensatorsIntegrationTest extends AbstractRestIntegrati
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergyConsumersIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergyConsumersIntegrationTest.java
index 7e29f188..1e2e4772 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergyConsumersIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergyConsumersIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class EnergyConsumersIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/energy-consumers";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/energy-consumers";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class EnergyConsumersIntegrationTest extends AbstractRestIntegrationTest
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergySourcesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergySourcesIntegrationTest.java
index b470cce5..9e3008ff 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergySourcesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/EnergySourcesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class EnergySourcesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/energy-sources";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/energy-sources";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class EnergySourcesIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GeographicalRegionsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GeographicalRegionsIntegrationTest.java
index 1de3cd92..384f1649 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GeographicalRegionsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GeographicalRegionsIntegrationTest.java
@@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class GeographicalRegionsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/geographical-regions";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/geographical-regions";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -54,7 +54,7 @@ public class GeographicalRegionsIntegrationTest extends AbstractRestIntegrationT
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundingImpedancesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundingImpedancesIntegrationTest.java
index b65cbf1c..27ada356 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundingImpedancesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundingImpedancesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class GroundingImpedancesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/grounding-impedances";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/grounding-impedances";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "1";
@@ -53,7 +53,7 @@ public class GroundingImpedancesIntegrationTest extends AbstractRestIntegrationT
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundsIntegrationTest.java
index dcb6f823..b3471b06 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/GroundsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class GroundsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/grounds";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/grounds";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "1";
@@ -53,7 +53,7 @@ public class GroundsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/IntegrationTestTemplate.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/IntegrationTestTemplate.java
index 15e8c7a7..9135194a 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/IntegrationTestTemplate.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/IntegrationTestTemplate.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class IntegrationTestTemplate extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/base-voltages";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/base-voltages";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class IntegrationTestTemplate extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/JunctionsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/JunctionsIntegrationTest.java
index c350603c..08dc6746 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/JunctionsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/JunctionsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class JunctionsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/junctions";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/junctions";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class JunctionsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LineTypesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LineTypesIntegrationTest.java
index ea75b4e7..876dc308 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LineTypesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LineTypesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class LineTypesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/line-types";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/line-types";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -53,7 +53,7 @@ public class LineTypesIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LinesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LinesIntegrationTest.java
index cd9dbcb7..eecb736f 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LinesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LinesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class LinesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/lines";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/lines";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class LinesIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LoadBreakSwitchesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LoadBreakSwitchesIntegrationTest.java
index 9932039b..49640bef 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LoadBreakSwitchesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/LoadBreakSwitchesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class LoadBreakSwitchesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/load-break-switches";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/load-break-switches";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class LoadBreakSwitchesIntegrationTest extends AbstractRestIntegrationTes
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyServiceTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyServiceTest.java
index 7787f857..5fae43e9 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyServiceTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/MockUpStaticTopologyServiceTest.java
@@ -68,7 +68,7 @@ public class MockUpStaticTopologyServiceTest implements IIntegrationTest {
private String createUrl(String base) {
- String url = "/source-system/topology/%s?message-id=%s" + //
+ String url = "/source-system/electricity/static-topology/%s?message-id=%s" + //
"&revision=1&source=test&user-id=btc&timestamp=2017-04-26T12:04:41.003Z";
return String.format(url, base, UUID.randomUUID());
}
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PetersenCoilsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PetersenCoilsIntegrationTest.java
index eacfaf66..0c16ce08 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PetersenCoilsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PetersenCoilsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class PetersenCoilsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/petersen-coils";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/petersen-coils";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "1";
@@ -53,7 +53,7 @@ public class PetersenCoilsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PlantsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PlantsIntegrationTest.java
index 55b9c2a0..ab4adec0 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PlantsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PlantsIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class PlantsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/plants";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/plants";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -53,7 +53,7 @@ public class PlantsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PowerTransformersIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PowerTransformersIntegrationTest.java
index 15a284bf..5ecbab16 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PowerTransformersIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/PowerTransformersIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class PowerTransformersIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/power-transformers";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/power-transformers";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class PowerTransformersIntegrationTest extends AbstractRestIntegrationTes
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubGeographicalRegionsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubGeographicalRegionsIntegrationTest.java
index 49e03bcf..50fb6ccf 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubGeographicalRegionsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubGeographicalRegionsIntegrationTest.java
@@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class SubGeographicalRegionsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/sub-geographical-regions";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/sub-geographical-regions";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -54,7 +54,7 @@ public class SubGeographicalRegionsIntegrationTest extends AbstractRestIntegrati
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationTypesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationTypesIntegrationTest.java
index 241d511b..14005c12 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationTypesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationTypesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class SubstationTypesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/substation-types";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/substation-types";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -53,7 +53,7 @@ public class SubstationTypesIntegrationTest extends AbstractRestIntegrationTest
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationsIntegrationTest.java
index fb0e4f83..d3d62838 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SubstationsIntegrationTest.java
@@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class SubstationsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/substations";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/substations";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -54,7 +54,7 @@ public class SubstationsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SwitchesIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SwitchesIntegrationTest.java
index 4007c15e..36da0d87 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SwitchesIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/SwitchesIntegrationTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class SwitchesIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/switches";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/switches";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -53,7 +53,7 @@ public class SwitchesIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/TopologyIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/TopologyIntegrationTest.java
index 017c036b..0ba34383 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/TopologyIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/TopologyIntegrationTest.java
@@ -7,7 +7,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * http://www.eclipse.org/legal/epl-v10.html
*
* -----------------------------------------------------------------------------
*/
@@ -42,7 +42,7 @@ import org.xmlunit.diff.DefaultNodeMatcher;
public class TopologyIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/topology";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/topology";
private static final String REVISION = "?revision=";
private static final String PARAMETERS_POSTFIX = "&message-id=16a80e49-1657-4e3d-9c03-23227f5c5329&correlation-id=68b887ce-be3e-46c0-9d72-9ba50c9ba468&user-id=asdf&timestamp=2016-11-30T20:06:00.123Z&source=abc";
private static final String VERSION_FALSE = "0";
@@ -62,7 +62,7 @@ public class TopologyIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE + PARAMETERS_POSTFIX);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/VoltageLevelsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/VoltageLevelsIntegrationTest.java
index 1acd4b25..6a52bc8e 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/VoltageLevelsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-static-topology/service/src/test/java/org/eclipse/openk/sourcesystem/mockupstatictopology/service/VoltageLevelsIntegrationTest.java
@@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner;
public class VoltageLevelsIntegrationTest extends AbstractRestIntegrationTest {
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/topology/voltage-levels";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/static-topology/voltage-levels";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "3";
@@ -54,7 +54,7 @@ public class VoltageLevelsIntegrationTest extends AbstractRestIntegrationTest {
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/core/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/core/MockUpTopologyStateDefaults.java b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/core/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/core/MockUpTopologyStateDefaults.java
index f0085d88..daedb469 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/core/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/core/MockUpTopologyStateDefaults.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/core/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/core/MockUpTopologyStateDefaults.java
@@ -23,7 +23,7 @@ public final class MockUpTopologyStateDefaults {
// Constants
/* repository */
- public static final String REPOSITORY_KEY_TOPOLOGY_STATE = "mock-up-topology-state";
+ public static final String REPOSITORY_KEY_TOPOLOGY_STATE = "topology-state";
/* scopes */
public static final String SCOPE_MEASUREMENT_POINTS = "MeasurementPoints";
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementPointsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementPointsRestEndPoint.java
index 316d98e1..d849e914 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementPointsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementPointsRestEndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/measurement")
+@RequestMapping(path = "/source-system/electricity/topology-state")
public final class MeasurementPointsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementsRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementsRestEndPoint.java
index 705d71a6..ac150719 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementsRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/MeasurementsRestEndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/measurement")
+@RequestMapping(path = "/source-system/electricity/topology-state")
public final class MeasurementsRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/SwitchStatesRestEndPoint.java b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/SwitchStatesRestEndPoint.java
index cbdc979f..acb0115a 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/SwitchStatesRestEndPoint.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/infrastructure/src/main/java/org/eclipse/openk/sourcesystem/mockuptopologystate/infrastructure/dataexchange/rest/SwitchStatesRestEndPoint.java
@@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Frank Jäger
*/
@RestController
-@RequestMapping(path = "/source-system/measurement")
+@RequestMapping(path = "/source-system/electricity/topology-state")
public final class SwitchStatesRestEndPoint extends AbstractHttpRestEndPoint {
// Constants
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementPointsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementPointsIntegrationTest.java
index e9be4b17..615c0a34 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementPointsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementPointsIntegrationTest.java
@@ -36,7 +36,7 @@ public final class MeasurementPointsIntegrationTest extends AbstractRestIntegrat
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/measurement/measurement-points";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/topology-state/measurement-points";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "1";
@@ -56,7 +56,7 @@ public final class MeasurementPointsIntegrationTest extends AbstractRestIntegrat
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);
diff --git a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementsIntegrationTest.java b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementsIntegrationTest.java
index 81f44094..d7c0f893 100644
--- a/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementsIntegrationTest.java
+++ b/cim-cache/org.eclipse.openk.source-system.mock-up-topology-state/service/src/test/java/org/eclipse/openk/sourcesystem/mockuptopologystate/service/MeasurementsIntegrationTest.java
@@ -36,7 +36,7 @@ public final class MeasurementsIntegrationTest extends AbstractRestIntegrationTe
// Constants
- private static final String REST_END_POINT_PATH = "/source-system/measurement/measurements";
+ private static final String REST_END_POINT_PATH = "/source-system/electricity/topology-state/measurements";
private static final String REVISION = "?revision=";
private static final String VERSION_FALSE = "0";
private static final String VERSION_OK = "2";
@@ -56,7 +56,7 @@ public final class MeasurementsIntegrationTest extends AbstractRestIntegrationTe
ResponseEntity<String> result = exchange(REST_END_POINT_PATH);
/* then */
- assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(result.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST);
/* when */
result = exchange(REST_END_POINT_PATH + REVISION + VERSION_FALSE);

Back to the top