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 ofTransformer2WInputinstances.get2WTransformers(Set<NodeInput> nodes, Set<Transformer2WTypeInput> transformer2WTypes, Set<OperatorInput> operators) Returns a set ofTransformer2WInputinstances.Returns a unique set ofTransformer3WInputinstances.get3WTransformers(Set<NodeInput> nodes, Set<Transformer3WTypeInput> transformer3WTypeInputs, Set<OperatorInput> operators) Returns a set ofTransformer3WInputinstances.Should return either a consistent instance ofRawGridElementswrapped inOptionalor an emptyOptional.getLines()Returns a unique set ofLineInputinstances.getLines(Set<NodeInput> nodes, Set<LineTypeInput> lineTypeInputs, Set<OperatorInput> operators) Returns a set ofLineInputinstances.Returns a unique set ofMeasurementUnitInputinstances.getMeasurementUnits(Set<NodeInput> nodes, Set<OperatorInput> operators) Returns a set ofMeasurementUnitInputinstances.getNodes()Returns a unique set ofNodeInputinstances.getNodes(Set<OperatorInput> operators) Returns a set ofNodeInputinstances.Returns a unique set ofSwitchInputinstances.getSwitches(Set<NodeInput> nodes, Set<OperatorInput> operators) Returns a set ofSwitchInputinstances.
-
Method Details
-
getGridData
Optional<RawGridElements> getGridData()Should return either a consistent instance ofRawGridElementswrapped inOptionalor an emptyOptional. The decision to useOptionalinstead of returning theRawGridElementsinstance directly is motivated by the fact, that aRawGridElementsis a container instance that depends on several other entities. Without being complete, it is useless for further processing.Hence, whenever at least one entity
RawGridElementsdepends 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
RawGridElementsinstance, 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
RawGridElementsoptional orOptional.empty()
-
getNodes
Returns a unique set ofNodeInputinstances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUIDuniqueness of the providedNodeInputwhich has to be checked manually, asNodeInput.equals(Object)is NOT restricted on the uuid ofNodeInput.- Returns:
- a set of object and uuid unique
NodeInputentities
-
getNodes
Returns a set ofNodeInputinstances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUIDuniqueness of the providedNodeInputwhich 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 ofOperatorInputentities, theNodeInputinstances 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 uniqueOperatorInputthat should be used for the returning instances- Returns:
- a set of object and uuid unique
NodeInputentities
-
getLines
Returns a unique set ofLineInputinstances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUIDuniqueness of the providedLineInputwhich has to be checked manually, asLineInput.equals(Object)is NOT restricted on the uuid ofLineInput.- Returns:
- a set of object and uuid unique
LineInputentities
-
getLines
Set<LineInput> getLines(Set<NodeInput> nodes, Set<LineTypeInput> lineTypeInputs, Set<OperatorInput> operators) Returns a set ofLineInputinstances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUIDuniqueness of the providedLineInputwhich 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,LineTypeInputandOperatorInputentities, theLineInputinstances 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 uniqueOperatorInputthat should be used for the returning instancesnodes- a set of object and uuid uniqueNodeInputentitieslineTypeInputs- a set of object and uuid uniqueLineTypeInputentities- Returns:
- a set of object and uuid unique
LineInputentities
-
get2WTransformers
Set<Transformer2WInput> get2WTransformers()Returns a unique set ofTransformer2WInputinstances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUIDuniqueness of the providedTransformer2WInputwhich has to be checked manually, asTransformer2WInput.equals(Object)is NOT restricted on the uuid ofTransformer2WInput.- Returns:
- a set of object and uuid unique
Transformer2WInputentities
-
get2WTransformers
Set<Transformer2WInput> get2WTransformers(Set<NodeInput> nodes, Set<Transformer2WTypeInput> transformer2WTypes, Set<OperatorInput> operators) Returns a set ofTransformer2WInputinstances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUIDuniqueness of the providedTransformer2WInputwhich 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,Transformer2WTypeInputandOperatorInputentities, theTransformer2WInputinstances 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 uniqueOperatorInputthat should be used for the returning instancesnodes- a set of object and uuid uniqueNodeInputentitiestransformer2WTypes- a set of object and uuid uniqueTransformer2WTypeInputentities- Returns:
- a set of object and uuid unique
Transformer2WInputentities
-
get3WTransformers
Set<Transformer3WInput> get3WTransformers()Returns a unique set ofTransformer3WInputinstances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUIDuniqueness of the providedTransformer3WInputwhich has to be checked manually, asTransformer3WInput.equals(Object)is NOT restricted on the uuid ofTransformer3WInput.- Returns:
- a set of object and uuid unique
Transformer3WInputentities
-
get3WTransformers
Set<Transformer3WInput> get3WTransformers(Set<NodeInput> nodes, Set<Transformer3WTypeInput> transformer3WTypeInputs, Set<OperatorInput> operators) Returns a set ofTransformer3WInputinstances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUIDuniqueness of the providedTransformer3WInputwhich 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,Transformer3WTypeInputandOperatorInputentities, theTransformer3WInputinstances 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 uniqueOperatorInputthat should be used for the returning instancesnodes- a set of object and uuid uniqueNodeInputentitiestransformer3WTypeInputs- a set of object and uuid uniqueTransformer3WTypeInputentities- Returns:
- a set of object and uuid unique
Transformer3WInputentities
-
getSwitches
Set<SwitchInput> getSwitches()Returns a unique set ofSwitchInputinstances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUIDuniqueness of the providedSwitchInputwhich has to be checked manually, asSwitchInput.equals(Object)is NOT restricted on the uuid ofSwitchInput.- Returns:
- a set of object and uuid unique
SwitchInputentities
-
getSwitches
Returns a set ofSwitchInputinstances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUIDuniqueness of the providedSwitchInputwhich 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 ofNodeInputandOperatorInputentities, theSwitchInputinstances 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 uniqueOperatorInputthat should be used for the returning instancesnodes- a set of object and uuid uniqueNodeInputentities- Returns:
- a set of object and uuid unique
SwitchInputentities
-
getMeasurementUnits
Set<MeasurementUnitInput> getMeasurementUnits()Returns a unique set ofMeasurementUnitInputinstances.This set has to be unique in the sense of object uniqueness but also in the sense of
UUIDuniqueness of the providedMeasurementUnitInputwhich has to be checked manually, asMeasurementUnitInput.equals(Object)is NOT restricted on the uuid ofMeasurementUnitInput.- Returns:
- a set of object and uuid unique
MeasurementUnitInputentities
-
getMeasurementUnits
Returns a set ofMeasurementUnitInputinstances. This set has to be unique in the sense of object uniqueness but also in the sense ofUUIDuniqueness of the providedMeasurementUnitInputwhich 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 ofNodeInputandOperatorInputentities, theMeasurementUnitInputinstances 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 uniqueOperatorInputthat should be used for the returning instancesnodes- a set of object and uuid uniqueNodeInputentities- Returns:
- a set of object and uuid unique
MeasurementUnitInputentities
-