Class ResultEntityProcessor
java.lang.Object
edu.ie3.datamodel.io.processor.Processor<T>
edu.ie3.datamodel.io.processor.EntityProcessor<ResultEntity>
edu.ie3.datamodel.io.processor.result.ResultEntityProcessor
'Serializer' for
ResultEntity
s into a fieldName to value representation to allow for an
easy processing into a database or file sink e.g. .csv It is important that the units used in
this class are equal to the units used SystemParticipantResultFactory
to prevent invalid
interpretation of unit prefixes!- Since:
- 31.01.20
-
Field Summary
Modifier and TypeFieldDescriptionstatic final List<Class<? extends ResultEntity>>
The entities that can be used within this processorFields inherited from class edu.ie3.datamodel.io.processor.EntityProcessor
headerElements, log
Fields inherited from class edu.ie3.datamodel.io.processor.Processor
logger, registeredClass
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<Class<? extends ResultEntity>>
Returns a (unmodifiable)List
of classes that this Processors is capable of processinghandleProcessorSpecificQuantity
(javax.measure.Quantity<?> quantity, String fieldName) This method should handle all quantities that are model processor specific e.g.Methods inherited from class edu.ie3.datamodel.io.processor.EntityProcessor
getHeaderElements, handleEntity
Methods inherited from class edu.ie3.datamodel.io.processor.Processor
getRegisteredClass, handleQuantity, mapFieldNameToGetter, mapFieldNameToGetter, processMethodResult, processObject, processOperationTime, processUUIDArray, processVoltageLevel, processZonedDateTime, putUuidFirst, quantityValToOptionalString
-
Field Details
-
eligibleEntityClasses
The entities that can be used within this processor
-
-
Constructor Details
-
ResultEntityProcessor
-
-
Method Details
-
handleProcessorSpecificQuantity
protected Optional<String> handleProcessorSpecificQuantity(javax.measure.Quantity<?> quantity, String fieldName) Description copied from class:Processor
This method should handle all quantities that are model processor specific e.g. we need to handle active power p different forResultEntity
s andSystemParticipantInput
s Hence from the generalized methodProcessor.handleQuantity(Quantity, String)
, this allows for the specific handling of child implementations. See the implementation @ResultEntityProcessor
for details.- Overrides:
handleProcessorSpecificQuantity
in classEntityProcessor<ResultEntity>
- Parameters:
quantity
- the quantity that should be processedfieldName
- the field name the quantity is set to- Returns:
- an optional string with the normalized to
StandardUnits
value of the quantity or empty if an error occurred during processing
-
getEligibleEntityClasses
Description copied from class:Processor
Returns a (unmodifiable)List
of classes that this Processors is capable of processing- Specified by:
getEligibleEntityClasses
in classProcessor<ResultEntity>
- Returns:
- The unmodifiable
List
of eligible classes
-