Interface RawGridSource
- All Superinterfaces:
DataSource
- All Known Implementing Classes:
CsvRawGridSource
RawGridElements
as well as the RawGridElements
container as well from different data
sources e.g. .csv files or databases.- Since:
- 08.04.20
-
Method Summary
Modifier and TypeMethodDescriptionReturns a unique set ofTransformer2WInput
instances.get2WTransformers
(Set<NodeInput> nodes, Set<Transformer2WTypeInput> transformer2WTypes, Set<OperatorInput> operators) Returns a set ofTransformer2WInput
instances.Returns a unique set ofTransformer3WInput
instances.get3WTransformers
(Set<NodeInput> nodes, Set<Transformer3WTypeInput> transformer3WTypeInputs, Set<OperatorInput> operators) Returns a set ofTransformer3WInput
instances.Should return either a consistent instance ofRawGridElements
wrapped inOptional
or an emptyOptional
.getLines()
Returns a unique set ofLineInput
instances.getLines
(Set<NodeInput> nodes, Set<LineTypeInput> lineTypeInputs, Set<OperatorInput> operators) Returns a set ofLineInput
instances.Returns a unique set ofMeasurementUnitInput
instances.getMeasurementUnits
(Set<NodeInput> nodes, Set<OperatorInput> operators) Returns a set ofMeasurementUnitInput
instances.getNodes()
Returns a unique set ofNodeInput
instances.getNodes
(Set<OperatorInput> operators) Returns a set ofNodeInput
instances.Returns a unique set ofSwitchInput
instances.getSwitches
(Set<NodeInput> nodes, Set<OperatorInput> operators) Returns a set ofSwitchInput
instances.
-
Method Details
-
getGridData
Optional<RawGridElements> getGridData()Should return either a consistent instance ofRawGridElements
wrapped inOptional
or an emptyOptional
. The decision to useOptional
instead of returning theRawGridElements
instance directly is motivated by the fact, that aRawGridElements
is a container instance that depends on several other entities. Without being complete, it is useless for further processing.Hence, whenever at least one entity
RawGridElements
depends on cannot be provided,Optional.empty()
should be returned and extensive logging should provide enough information to debug the error and fix the persistent data that has been failed to processed.Furthermore, it is expected, that the specific implementation of this method ensures not only the completeness of the resulting
RawGridElements
instance, but also its validity e.g. in the sense that not duplicate UUIDs exist within all entities contained in the returning instance.- Returns:
- either a valid, complete
RawGridElements
optional orOptional.empty()
-
getNodes
Returns a unique set ofNodeInput
instances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUID
uniqueness of the providedNodeInput
which has to be checked manually, asNodeInput.equals(Object)
is NOT restricted on the uuid ofNodeInput
.- Returns:
- a set of object and uuid unique
NodeInput
entities
-
getNodes
Returns a set ofNodeInput
instances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUID
uniqueness of the providedNodeInput
which has to be checked manually, asNodeInput.equals(Object)
is NOT restricted on the uuid ofNodeInput
.In contrast to
getNodes()
this interface provides the ability to pass in an already existing set ofOperatorInput
entities, theNodeInput
instances depend on. Doing so, already loaded nodes can be recycled to improve performance and prevent unnecessary loading operations.If something fails during the creation process it's up to the concrete implementation of an empty set or a set with all entities that has been able to be build is returned.
- Parameters:
operators
- a set of object and uuid uniqueOperatorInput
that should be used for the returning instances- Returns:
- a set of object and uuid unique
NodeInput
entities
-
getLines
Returns a unique set ofLineInput
instances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUID
uniqueness of the providedLineInput
which has to be checked manually, asLineInput.equals(Object)
is NOT restricted on the uuid ofLineInput
.- Returns:
- a set of object and uuid unique
LineInput
entities
-
getLines
Set<LineInput> getLines(Set<NodeInput> nodes, Set<LineTypeInput> lineTypeInputs, Set<OperatorInput> operators) Returns a set ofLineInput
instances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUID
uniqueness of the providedLineInput
which has to be checked manually, asLineInput.equals(Object)
is NOT restricted on the uuid ofLineInput
.In contrast to
getNodes()
this interface provides the ability to pass in an already existing set ofNodeInput
,LineTypeInput
andOperatorInput
entities, theLineInput
instances depend on. Doing so, already loaded nodes, line types and operators can be recycled to improve performance and prevent unnecessary loading operations.If something fails during the creation process it's up to the concrete implementation of an empty set or a set with all entities that has been able to be build is returned.
- Parameters:
operators
- a set of object and uuid uniqueOperatorInput
that should be used for the returning instancesnodes
- a set of object and uuid uniqueNodeInput
entitieslineTypeInputs
- a set of object and uuid uniqueLineTypeInput
entities- Returns:
- a set of object and uuid unique
LineInput
entities
-
get2WTransformers
Set<Transformer2WInput> get2WTransformers()Returns a unique set ofTransformer2WInput
instances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUID
uniqueness of the providedTransformer2WInput
which has to be checked manually, asTransformer2WInput.equals(Object)
is NOT restricted on the uuid ofTransformer2WInput
.- Returns:
- a set of object and uuid unique
Transformer2WInput
entities
-
get2WTransformers
Set<Transformer2WInput> get2WTransformers(Set<NodeInput> nodes, Set<Transformer2WTypeInput> transformer2WTypes, Set<OperatorInput> operators) Returns a set ofTransformer2WInput
instances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUID
uniqueness of the providedTransformer2WInput
which has to be checked manually, asTransformer2WInput.equals(Object)
is NOT restricted on the uuid ofTransformer2WInput
.In contrast to
getNodes()
this interface provides the ability to pass in an already existing set ofNodeInput
,Transformer2WTypeInput
andOperatorInput
entities, theTransformer2WInput
instances depend on. Doing so, already loaded nodes, line types and operators can be recycled to improve performance and prevent unnecessary loading operations.If something fails during the creation process it's up to the concrete implementation of an empty set or a set with all entities that has been able to be build is returned.
- Parameters:
operators
- a set of object and uuid uniqueOperatorInput
that should be used for the returning instancesnodes
- a set of object and uuid uniqueNodeInput
entitiestransformer2WTypes
- a set of object and uuid uniqueTransformer2WTypeInput
entities- Returns:
- a set of object and uuid unique
Transformer2WInput
entities
-
get3WTransformers
Set<Transformer3WInput> get3WTransformers()Returns a unique set ofTransformer3WInput
instances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUID
uniqueness of the providedTransformer3WInput
which has to be checked manually, asTransformer3WInput.equals(Object)
is NOT restricted on the uuid ofTransformer3WInput
.- Returns:
- a set of object and uuid unique
Transformer3WInput
entities
-
get3WTransformers
Set<Transformer3WInput> get3WTransformers(Set<NodeInput> nodes, Set<Transformer3WTypeInput> transformer3WTypeInputs, Set<OperatorInput> operators) Returns a set ofTransformer3WInput
instances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUID
uniqueness of the providedTransformer3WInput
which has to be checked manually, asTransformer3WInput.equals(Object)
is NOT restricted on the uuid ofTransformer3WInput
.In contrast to
getNodes()
this interface provides the ability to pass in an already existing set ofNodeInput
,Transformer3WTypeInput
andOperatorInput
entities, theTransformer3WInput
instances depend on. Doing so, already loaded nodes, line types and operators can be recycled to improve performance and prevent unnecessary loading operations.If something fails during the creation process it's up to the concrete implementation of an empty set or a set with all entities that has been able to be build is returned.
- Parameters:
operators
- a set of object and uuid uniqueOperatorInput
that should be used for the returning instancesnodes
- a set of object and uuid uniqueNodeInput
entitiestransformer3WTypeInputs
- a set of object and uuid uniqueTransformer3WTypeInput
entities- Returns:
- a set of object and uuid unique
Transformer3WInput
entities
-
getSwitches
Set<SwitchInput> getSwitches()Returns a unique set ofSwitchInput
instances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUID
uniqueness of the providedSwitchInput
which has to be checked manually, asSwitchInput.equals(Object)
is NOT restricted on the uuid ofSwitchInput
.- Returns:
- a set of object and uuid unique
SwitchInput
entities
-
getSwitches
Returns a set ofSwitchInput
instances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUID
uniqueness of the providedSwitchInput
which has to be checked manually, asSwitchInput.equals(Object)
is NOT restricted on the uuid ofSwitchInput
.In contrast to
getNodes()
this interface provides the ability to pass in an already existing set ofNodeInput
andOperatorInput
entities, theSwitchInput
instances depend on. Doing so, already loaded nodes, line types and operators can be recycled to improve performance and prevent unnecessary loading operations.If something fails during the creation process it's up to the concrete implementation of an empty set or a set with all entities that has been able to be build is returned.
- Parameters:
operators
- a set of object and uuid uniqueOperatorInput
that should be used for the returning instancesnodes
- a set of object and uuid uniqueNodeInput
entities- Returns:
- a set of object and uuid unique
SwitchInput
entities
-
getMeasurementUnits
Set<MeasurementUnitInput> getMeasurementUnits()Returns a unique set ofMeasurementUnitInput
instances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUID
uniqueness of the providedMeasurementUnitInput
which has to be checked manually, asMeasurementUnitInput.equals(Object)
is NOT restricted on the uuid ofMeasurementUnitInput
.- Returns:
- a set of object and uuid unique
MeasurementUnitInput
entities
-
getMeasurementUnits
Returns a set ofMeasurementUnitInput
instances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUID
uniqueness of the providedMeasurementUnitInput
which has to be checked manually, asMeasurementUnitInput.equals(Object)
is NOT restricted on the uuid ofMeasurementUnitInput
.In contrast to
getNodes()
this interface provides the ability to pass in an already existing set ofNodeInput
andOperatorInput
entities, theMeasurementUnitInput
instances depend on. Doing so, already loaded nodes, line types and operators can be recycled to improve performance and prevent unnecessary loading operations.If something fails during the creation process it's up to the concrete implementation of an empty set or a set with all entities that has been able to be build is returned.
- Parameters:
operators
- a set of object and uuid uniqueOperatorInput
that should be used for the returning instancesnodes
- a set of object and uuid uniqueNodeInput
entities- Returns:
- a set of object and uuid unique
MeasurementUnitInput
entities
-