Class EtaPlusVhdMappings
java.lang.Object
energy.eddie.regionconnector.de.eta.providers.EtaPlusVhdMappings
Shared wire-string-to-CIM mappings used by both v0.82 and v1.04 intermediate VHD documents.
Holds only logic that is identical across CIM versions; version-specific enum lookups stay in the intermediate docs themselves so each one keeps its own type signatures.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EnergyTypeenergyTypeFromUnit(String unit) Returns theEnergyTypethat corresponds to the wireunitstring, ornullif the unit is not recognised.static GranularityinferGranularity(List<EtaPlusMeteredData.MeterReading> sortedReadings) Infers the dataGranularityfrom the interval between the first two entries of an already-sorted reading list, ornullif fewer than two readings are present or the interval does not match any knownGranularityvalue.static booleanisProduction(String direction) trueif the wiredirectionis"Generation"(prosumer feed-in).static booleanisValidatedStatus(String wireStatus) trueif the wirestatusis"VALIDATED"— the only value the /meters/historical endpoint emits per contract.static List<EtaPlusMeteredData.MeterReading> sortByTimestamp(List<EtaPlusMeteredData.MeterReading> readings) Returns readings ordered by ascending timestamp.
-
Method Details
-
isProduction
trueif the wiredirectionis"Generation"(prosumer feed-in). -
isValidatedStatus
trueif the wirestatusis"VALIDATED"— the only value the /meters/historical endpoint emits per contract. -
sortByTimestamp
public static List<EtaPlusMeteredData.MeterReading> sortByTimestamp(List<EtaPlusMeteredData.MeterReading> readings) Returns readings ordered by ascending timestamp. -
energyTypeFromUnit
Returns theEnergyTypethat corresponds to the wireunitstring, ornullif the unit is not recognised.Per ETA Plus contract, the unit is constant within a historical-readings response, so checking the first reading's unit is sufficient to determine the energy type.
-
inferGranularity
@Nullable public static Granularity inferGranularity(List<EtaPlusMeteredData.MeterReading> sortedReadings) Infers the dataGranularityfrom the interval between the first two entries of an already-sorted reading list, ornullif fewer than two readings are present or the interval does not match any knownGranularityvalue.
-