From 302e3335a51bef436dbf33331ffa8260d35f2946 Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Sun, 1 Dec 2024 18:15:50 +0100 Subject: [PATCH 1/4] riemann_sum Signed-off-by: Mark Herwege --- README.md | 23 ++++--- src/items/item-persistence.js | 94 ++++++++++++++++++++++++--- types/items/item-persistence.d.ts | 92 ++++++++++++++++++++++---- types/items/item-persistence.d.ts.map | 2 +- 4 files changed, 179 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 1dc7de66..c42d43a6 100644 --- a/README.md +++ b/README.md @@ -496,9 +496,9 @@ See [openhab-js : ItemConfig](https://openhab.github.io/openhab-js/global.html#I Calling `Item.persistence` returns an `ItemPersistence` object with the following functions: - ItemPersistence :`object` - - .averageSince(timestamp, serviceId) ⇒ `PersistedState | null` - - .averageUntil(timestamp, serviceId) ⇒ `PersistedState | null` - - .averageBetween(begin, end, serviceId) ⇒ `PersistedState | null` + - .averageSince(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` + - .averageUntil(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` + - .averageBetween(begin, end, riemannType, serviceId) ⇒ `PersistedState | null` - .changedSince(timestamp, serviceId) ⇒ `boolean` - .changedUntil(timestamp, serviceId) ⇒ `boolean` - .changedBetween(begin, end, serviceId) ⇒ `boolean` @@ -511,12 +511,12 @@ Calling `Item.persistence` returns an `ItemPersistence` object with the followin - .deltaSince(timestamp, serviceId) ⇒ `PersistedState | null` - .deltaUntil(timestamp, serviceId) ⇒ `PersistedState | null` - .deltaBetween(begin, end, serviceId) ⇒ `PersistedState | null` - - .deviationSince(timestamp, serviceId) ⇒ `PersistedState | null` - - .deviationUntil(timestamp, serviceId) ⇒ `PersistedState | null` - - .deviationBetween(begin, end, serviceId) ⇒ `PersistedState | null` - - .evolutionRateSince(timestamp, serviceId) ⇒ `number | null` - - .evolutionRateUntil(timestamp, serviceId) ⇒ `number | null` - - .evolutionRateBetween(begin, end, serviceId) ⇒ `number | null` + - .deviationSince(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` + - .deviationUntil(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` + - .deviationBetween(begin, end, riemannType, serviceId) ⇒ `PersistedState | null` + - .evolutionRateSince(timestamp, riemannType, serviceId) ⇒ `number | null` + - .evolutionRateUntil(timestamp, riemannType, serviceId) ⇒ `number | null` + - .evolutionRateBetween(begin, end, riemannType, serviceId) ⇒ `number | null` - .getAllStatesSince(timestamp, serviceId) ⇒ `Array[PersistedItem]` - .getAllStatesUntil(timestamp, serviceId) ⇒ `Array[PersistedItem]` - .getAllStatesBetween(begin, end, serviceId) ⇒ `Array[PersistedItem]` @@ -540,6 +540,9 @@ Calling `Item.persistence` returns an `ItemPersistence` object with the followin - .persistedState(timestamp, serviceId) ⇒ `PersistedItem | null` - .previousState(skipEqual, serviceId) ⇒ `PersistedItem | null` - .nextState(skipEqual, serviceId) ⇒ `PersistedItem | null` + - .riemannSumSince(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` + - .riemannSumUntil(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` + - .riemannSumBetween(begin, end, riemannType, serviceId) ⇒ `PersistedState | null` - .sumSince(timestamp, serviceId) ⇒ `PersistedState | null` - .sumUntil(timestamp, serviceId) ⇒ `PersistedState | null` - .sumBetween(begin, end, serviceId) ⇒ `PersistedState | null` @@ -550,6 +553,8 @@ Calling `Item.persistence` returns an `ItemPersistence` object with the followin - .varianceUntil(timestamp, serviceId) ⇒ `PersistedState | null` - .varianceBetween(begin, end, serviceId) ⇒ `PersistedState | null` +`riemannType` is an optional argument for methods that require calculating an approximation of the integral value. The approximation is calculated using a Riemann sum, with left, right, trapezoidal or midpoint value approximations. The argument is a Java RiemannType enum with possible values: `RiemannType.LEFT`, `RiemannType.RIGHT`, `RiemannType.TRAPEZOIDAL` or `RiemannType.MIDPOINT`. If ommitted, `RiemannType.LEFT` is used. + Note: `serviceId` is optional, if omitted, the default persistence service will be used. ```javascript diff --git a/src/items/item-persistence.js b/src/items/item-persistence.js index 96c2474f..4be36ef7 100644 --- a/src/items/item-persistence.js +++ b/src/items/item-persistence.js @@ -6,6 +6,7 @@ const { _toOpenhabPrimitiveType, _isTimeSeries } = require('../helpers'); const PersistenceExtensions = Java.type('org.openhab.core.persistence.extensions.PersistenceExtensions'); const TimeSeries = Java.type('org.openhab.core.types.TimeSeries'); const TypeParser = Java.type('org.openhab.core.types.TypeParser'); +const RiemannType = Java.type('org.openhab..core.persistence.extensions.PersistenceExtensions.RiemannType') /** * @typedef {import('@js-joda/core').ZonedDateTime} time.ZonedDateTime @@ -509,12 +510,15 @@ class ItemPersistence { * Gets the variance of the state of the given Item since a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to compute the variance + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the variance between then and now as {@link items.PersistedState}, or null if * timestamp is in the future, or if there is no persisted state for the given * Item at the given timestamp */ - varianceSince (timestamp, serviceId) { + varianceSince (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.varianceSince(this.rawItem, ...arguments)); } @@ -522,12 +526,15 @@ class ItemPersistence { * Gets the variance of the state of the given Item until a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to compute the variance + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the variance between now and then as {@link items.PersistedState}, or null if * timestamp is in the past, or if there is no persisted state for the given * Item at the given timestamp */ - varianceUntil (timestamp, serviceId) { + varianceUntil (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.varianceUntil(this.rawItem, ...arguments)); } @@ -536,12 +543,15 @@ class ItemPersistence { * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to compute the variance * @param {(time.ZonedDateTime | Date)} end the end time for the computation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the variance between both points of time as {@link items.PersistedState}, or null if * begin is after end, or if there is no persisted state for the given * Item between begin and end */ - varianceBetween (begin, end, serviceId) { + varianceBetween (begin, end, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.varianceBetween(this.rawItem, ...arguments)); } @@ -549,12 +559,15 @@ class ItemPersistence { * Gets the standard deviation of the state of the given Item since a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to compute the standard deviation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the standard deviation between then and now as {@link items.PersistedState}, or null * if timestamp is in the future, or if there is no persisted state for the given Item * at the given timestamp */ - deviationSince (timestamp, serviceId) { + deviationSince (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.deviationSince(this.rawItem, ...arguments)); } @@ -562,12 +575,15 @@ class ItemPersistence { * Gets the standard deviation of the state of the given Item until a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to compute the standard deviation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the standard deviation between now and then as {@link items.PersistedState}, or null * if timestamp is in the past, or if there is no persisted state for the given Item * at the given timestamp */ - deviationUntil (timestamp, serviceId) { + deviationUntil (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.deviationUntil(this.rawItem, ...arguments)); } @@ -576,12 +592,15 @@ class ItemPersistence { * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to compute * @param {(time.ZonedDateTime | Date)} end the end time for the computation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the standard deviation between both points of time as {@link items.PersistedState}, or null * if begin is after end, or if there is no persisted state for the given Item * between begin and end */ - deviationBetween (begin, end, serviceId) { + deviationBetween (begin, end, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.deviationBetween(this.rawItem, ...arguments)); } @@ -594,10 +613,13 @@ class ItemPersistence { * console.log('KitchenDimmer average since yesterday', item.persistence.averageSince(yesterday)); * * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the average value + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the average value since timestamp as {@link items.PersistedState} or null if no previous states could be found */ - averageSince (timestamp, serviceId) { + averageSince (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.averageSince(this.rawItem, ...arguments)); } @@ -605,10 +627,13 @@ class ItemPersistence { * Gets the average value of the state of a given Item until a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to search for the average value + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the average value until timestamp as {@link items.PersistedState} or null if no future states could be found */ - averageUntil (timestamp, serviceId) { + averageUntil (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.averageUntil(this.rawItem, ...arguments)); } @@ -617,14 +642,65 @@ class ItemPersistence { * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the average * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the average + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the average value between begin and end as {@link items.PersistedState} or null if no states could be found */ - averageBetween (begin, end, serviceId) { + averageBetween (begin, end, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.averageBetween(this.rawItem, ...arguments)); } /** + * Gets the RiemannSum of the states of a given Item since a certain point in time. + * + * @example + * var yesterday = time.toZDT().minusDays(1); + * var item = items.getItem('KitchenDimmer'); + * console.log('KitchenDimmer Riemann sum since yesterday', item.persistence.riemannSumSince(yesterday)); + * + * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the Riemann sum since timestamp as {@link items.PersistedState} or null if no previous states could be found + */ + riemannSumSince (timestamp, riemannType, serviceId) { + return _persistedStateOrNull(PersistenceExtensions.riemannSumSince(this.rawItem, ...arguments)); + } + + /** + * Gets the RiemannSum of the states of a given Item until a certain point in time. + * + * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to search for the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found + */ + riemannSumUntil (timestamp, riemannType, serviceId) { + return _persistedStateOrNull(PersistenceExtensions.riemannSumUntil(this.rawItem, ...arguments)); + } + + /** + * Gets the RiemannSum of the states of the state of a given Item between two certain points in time. + * + * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the Riemann sum + * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found + */ + riemannSumBetween (begin, end, riemannType, serviceId) { + return _persistedStateOrNull(PersistenceExtensions.riemannSumBetween(this.rawItem, ...arguments)); + } + + /** * Gets the median value of the state of a given Item since a certain point in time. * * @example diff --git a/types/items/item-persistence.d.ts b/types/items/item-persistence.d.ts index 2d01e372..a4c153ae 100644 --- a/types/items/item-persistence.d.ts +++ b/types/items/item-persistence.d.ts @@ -217,64 +217,82 @@ declare class ItemPersistence { * Gets the variance of the state of the given Item since a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to compute the variance + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the variance between then and now as {@link items.PersistedState}, or null if * timestamp is in the future, or if there is no persisted state for the given * Item at the given timestamp */ - varianceSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + varianceSince(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the variance of the state of the given Item until a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to compute the variance + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the variance between now and then as {@link items.PersistedState}, or null if * timestamp is in the past, or if there is no persisted state for the given * Item at the given timestamp */ - varianceUntil(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + varianceUntil(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the variance of the state of the given Item between two certain points in time. * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to compute the variance * @param {(time.ZonedDateTime | Date)} end the end time for the computation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the variance between both points of time as {@link items.PersistedState}, or null if * begin is after end, or if there is no persisted state for the given * Item between begin and end */ - varianceBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + varianceBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the standard deviation of the state of the given Item since a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to compute the standard deviation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the standard deviation between then and now as {@link items.PersistedState}, or null * if timestamp is in the future, or if there is no persisted state for the given Item * at the given timestamp */ - deviationSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + deviationSince(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the standard deviation of the state of the given Item until a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to compute the standard deviation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the standard deviation between now and then as {@link items.PersistedState}, or null * if timestamp is in the past, or if there is no persisted state for the given Item * at the given timestamp */ - deviationUntil(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + deviationUntil(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the standard deviation of the state of the given Item between two certain points in time. * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to compute * @param {(time.ZonedDateTime | Date)} end the end time for the computation + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the standard deviation between both points of time as {@link items.PersistedState}, or null * if begin is after end, or if there is no persisted state for the given Item * between begin and end */ - deviationBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + deviationBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the average value of the state of a given Item since a certain point in time. * @@ -284,39 +302,87 @@ declare class ItemPersistence { * console.log('KitchenDimmer average since yesterday', item.persistence.averageSince(yesterday)); * * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the average value + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the average value since timestamp as {@link items.PersistedState} or null if no previous states could be found */ - averageSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + averageSince(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the average value of the state of a given Item until a certain point in time. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to search for the average value + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the average value until timestamp as {@link items.PersistedState} or null if no future states could be found */ - averageUntil(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + averageUntil(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the average value of the state of a given Item between two certain points in time. * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the average * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the average + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the average value between begin and end as {@link items.PersistedState} or null if no states could be found */ - averageBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); + averageBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** - * Gets the median value of the state of a given Item since a certain point in time. + * Gets the RiemannSum of the states of a given Item since a certain point in time. * * @example * var yesterday = time.toZDT().minusDays(1); * var item = items.getItem('KitchenDimmer'); - * console.log('KitchenDimmer median since yesterday', item.persistence.medianSince(yesterday)); + * console.log('KitchenDimmer Riemann sum since yesterday', item.persistence.riemannSumSince(yesterday)); * - * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the median value + * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the median value since timestamp as {@link items.PersistedState} or null if no previous states could be found + * @returns {(PersistedState | null)} the Riemann sum since timestamp as {@link items.PersistedState} or null if no previous states could be found */ + riemannSumSince(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); + /** + * Gets the RiemannSum of the states of a given Item until a certain point in time. + * + * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to search for the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found + */ + riemannSumUntil(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); + /** + * Gets the RiemannSum of the states of the state of a given Item between two certain points in time. + * + * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the Riemann sum + * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found + */ + riemannSumBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); + /** + * Gets the median value of the state of a given Item since a certain point in time. + * + * @example + * var yesterday = time.toZDT().minusDays(1); + * var item = items.getItem('KitchenDimmer'); + * console.log('KitchenDimmer median since yesterday', item.persistence.medianSince(yesterday)); + * + * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the median value + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the median value since timestamp as {@link items.PersistedState} or null if no previous states could be found + */ medianSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the median value of the state of a given Item until a certain point in time. diff --git a/types/items/item-persistence.d.ts.map b/types/items/item-persistence.d.ts.map index f8b37633..be567bda 100644 --- a/types/items/item-persistence.d.ts.map +++ b/types/items/item-persistence.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item-persistence.d.ts","sourceRoot":"","sources":["../../src/items/item-persistence.js"],"names":[],"mappings":";AAuJA;;;;;;;;;;;GAWG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,oBALW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,UAC3B,MAAM,GAAC,MAAM,GAAC,KAAK,aAAa,GAAC,QAAQ,YAAU,eACnD,gBAAgB,cAChB,MAAM,wBAiChB;IAqDD;;;;;;OAMG;IACH,0BAJW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,aAAa,GAAG,IAAI,CAAC,CAIlC;IAED;;;;;;MAME;IACF,uBAJW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAKvC;IAED;;;;;OAKG;IACH,uBAHW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAIvC;IAED;;;;;;OAMG;IACH,uBAJW,MAAM,mBACJ,CA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AQ;;;;AAZ3C,8BAAkE;AA2ElE;;;;;;;GAOG;AACH;IAQI,qBAAsC;IAGxC;;;;;OAKG;IACH,sCAEC;IAED;;;OAGG;IACH,8BAEC;CAKF;AAhHD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,mCAEC;IADC,cAAgC;IAGlC;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,2BAGC;IAED;;;OAGG;IACH,oDAWC;IAED,mBAEC;CACF"} \ No newline at end of file +{"version":3,"file":"item-persistence.d.ts","sourceRoot":"","sources":["../../src/items/item-persistence.js"],"names":[],"mappings":";AAwJA;;;;;;;;;;;GAWG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,oBALW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,UAC3B,MAAM,GAAC,MAAM,GAAC,KAAK,aAAa,GAAC,QAAQ,YAAU,eACnD,gBAAgB,cAChB,MAAM,wBAiChB;IAqDD;;;;;;OAMG;IACH,0BAJW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,aAAa,GAAG,IAAI,CAAC,CAIlC;IAED;;;;;;MAME;IACF,uBAJW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAKvC;IAED;;;;;OAKG;IACH,uBAHW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAIvC;IAED;;;;;;OAMG;IACH,uBAJW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAKvC;IAED;;;;;OAKG;IACH,uBAHW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAIvC;IAED;;;;;;OAMG;IACH,0BAJW,OAAO,cACP,MAAM,mBACJ,CAAC,aAAa,GAAG,IAAI,CAAC,CAIlC;IAED;;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M,uBAIhB;IAED;;;;;;;OAOG;IACH,8BAJW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,OAC3B,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,cAC3B,MAAM,uBAIhB;;CACF;;;;;yBAj9BY,OAAO,eAAe,EAAE,aAAa;mBAIrC,OAAO,eAAe,EAAE,OAAO;;;gBAI/B,OAAO,aAAa,EAAE,QAAQ;;;;AAb3C,8BAAkE;AA4ElE;;;;;;;GAOG;AACH;IAQI,qBAAsC;IAGxC;;;;;OAKG;IACH,sCAEC;IAED;;;OAGG;IACH,8BAEC;CAKF;AAhHD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,mCAEC;IADC,cAAgC;IAGlC;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,2BAGC;IAED;;;OAGG;IACH,oDAWC;IAED,mBAEC;CACF"} \ No newline at end of file From d45cd3aace2ec6c9afa660398572c5b046cf3eb5 Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Sun, 1 Dec 2024 21:29:17 +0100 Subject: [PATCH 2/4] linter fixes Signed-off-by: Mark Herwege --- src/items/item-persistence.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/items/item-persistence.js b/src/items/item-persistence.js index 4be36ef7..039a045f 100644 --- a/src/items/item-persistence.js +++ b/src/items/item-persistence.js @@ -6,7 +6,7 @@ const { _toOpenhabPrimitiveType, _isTimeSeries } = require('../helpers'); const PersistenceExtensions = Java.type('org.openhab.core.persistence.extensions.PersistenceExtensions'); const TimeSeries = Java.type('org.openhab.core.types.TimeSeries'); const TypeParser = Java.type('org.openhab.core.types.TypeParser'); -const RiemannType = Java.type('org.openhab..core.persistence.extensions.PersistenceExtensions.RiemannType') +const RiemannType = Java.type('org.openhab..core.persistence.extensions.PersistenceExtensions.RiemannType'); /** * @typedef {import('@js-joda/core').ZonedDateTime} time.ZonedDateTime @@ -681,11 +681,11 @@ class ItemPersistence { * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found */ - riemannSumUntil (timestamp, riemannType, serviceId) { - return _persistedStateOrNull(PersistenceExtensions.riemannSumUntil(this.rawItem, ...arguments)); - } + riemannSumUntil (timestamp, riemannType, serviceId) { + return _persistedStateOrNull(PersistenceExtensions.riemannSumUntil(this.rawItem, ...arguments)); + } - /** + /** * Gets the RiemannSum of the states of the state of a given Item between two certain points in time. * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the Riemann sum @@ -696,11 +696,11 @@ class ItemPersistence { * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found */ - riemannSumBetween (begin, end, riemannType, serviceId) { - return _persistedStateOrNull(PersistenceExtensions.riemannSumBetween(this.rawItem, ...arguments)); - } + riemannSumBetween (begin, end, riemannType, serviceId) { + return _persistedStateOrNull(PersistenceExtensions.riemannSumBetween(this.rawItem, ...arguments)); + } - /** + /** * Gets the median value of the state of a given Item since a certain point in time. * * @example From db544b3a75deb5944bb7c460d539744976d379fe Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Mon, 2 Dec 2024 09:21:23 +0100 Subject: [PATCH 3/4] clarify time Signed-off-by: Mark Herwege --- README.md | 6 ++-- src/items/item-persistence.js | 12 +++---- types/items/item-persistence.d.ts | 48 +++++++++++++-------------- types/items/item-persistence.d.ts.map | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index c42d43a6..4b9ef47f 100644 --- a/README.md +++ b/README.md @@ -540,9 +540,9 @@ Calling `Item.persistence` returns an `ItemPersistence` object with the followin - .persistedState(timestamp, serviceId) ⇒ `PersistedItem | null` - .previousState(skipEqual, serviceId) ⇒ `PersistedItem | null` - .nextState(skipEqual, serviceId) ⇒ `PersistedItem | null` - - .riemannSumSince(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` - - .riemannSumUntil(timestamp, riemannType, serviceId) ⇒ `PersistedState | null` - - .riemannSumBetween(begin, end, riemannType, serviceId) ⇒ `PersistedState | null` + - .riemannSumSince(timestamp, riemannType, serviceId) ⇒ `PersistedState | null`: Time is considered in seconds. + - .riemannSumUntil(timestamp, riemannType, serviceId) ⇒ `PersistedState | null`: Time is considered in seconds. + - .riemannSumBetween(begin, end, riemannType, serviceId) ⇒ `PersistedState | null`: Time is considered in seconds. - .sumSince(timestamp, serviceId) ⇒ `PersistedState | null` - .sumUntil(timestamp, serviceId) ⇒ `PersistedState | null` - .sumBetween(begin, end, serviceId) ⇒ `PersistedState | null` diff --git a/src/items/item-persistence.js b/src/items/item-persistence.js index 039a045f..040b907f 100644 --- a/src/items/item-persistence.js +++ b/src/items/item-persistence.js @@ -653,7 +653,7 @@ class ItemPersistence { } /** - * Gets the RiemannSum of the states of a given Item since a certain point in time. + * Gets the RiemannSum of the states of a given Item since a certain point in time, time is calculated in seconds. * * @example * var yesterday = time.toZDT().minusDays(1); @@ -665,28 +665,28 @@ class ItemPersistence { * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the Riemann sum since timestamp as {@link items.PersistedState} or null if no previous states could be found + * @returns {(PersistedState | null)} the Riemann sum since timestamp as {@link items.PersistedState} or null if no previous states could be found, time is calculated in seconds */ riemannSumSince (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.riemannSumSince(this.rawItem, ...arguments)); } /** - * Gets the RiemannSum of the states of a given Item until a certain point in time. + * Gets the RiemannSum of the states of a given Item until a certain point in time, time is calculated in seconds. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to search for the Riemann sum * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found + * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found, time is calculated in seconds */ riemannSumUntil (timestamp, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.riemannSumUntil(this.rawItem, ...arguments)); } /** - * Gets the RiemannSum of the states of the state of a given Item between two certain points in time. + * Gets the RiemannSum of the states of a given Item between two certain points in time, time is calculated in seconds. * * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the Riemann sum * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the Riemann sum @@ -694,7 +694,7 @@ class ItemPersistence { * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found + * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found, time is calculated in seconds */ riemannSumBetween (begin, end, riemannType, serviceId) { return _persistedStateOrNull(PersistenceExtensions.riemannSumBetween(this.rawItem, ...arguments)); diff --git a/types/items/item-persistence.d.ts b/types/items/item-persistence.d.ts index a4c153ae..78ff9ffc 100644 --- a/types/items/item-persistence.d.ts +++ b/types/items/item-persistence.d.ts @@ -333,7 +333,7 @@ declare class ItemPersistence { */ averageBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** - * Gets the RiemannSum of the states of a given Item since a certain point in time. + * Gets the RiemannSum of the states of a given Item since a certain point in time, time is calculated in seconds. * * @example * var yesterday = time.toZDT().minusDays(1); @@ -345,44 +345,44 @@ declare class ItemPersistence { * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the Riemann sum since timestamp as {@link items.PersistedState} or null if no previous states could be found + * @returns {(PersistedState | null)} the Riemann sum since timestamp as {@link items.PersistedState} or null if no previous states could be found, time is calculated in seconds */ riemannSumSince(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** - * Gets the RiemannSum of the states of a given Item until a certain point in time. + * Gets the RiemannSum of the states of a given Item until a certain point in time, time is calculated in seconds. * * @param {(time.ZonedDateTime | Date)} timestamp the point in time to which to search for the Riemann sum * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), * default LEFT * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found + * @returns {(PersistedState | null)} the Riemann sum until timestamp as {@link items.PersistedState} or null if no future states could be found, time is calculated in seconds */ riemannSumUntil(timestamp: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); /** - * Gets the RiemannSum of the states of the state of a given Item between two certain points in time. + * Gets the RiemannSum of the states of a given Item between two certain points in time, time is calculated in seconds. + * + * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the Riemann sum + * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the Riemann sum + * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation + * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), + * default LEFT + * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used + * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found, time is calculated in seconds + */ + riemannSumBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); + /** + * Gets the median value of the state of a given Item since a certain point in time. * - * @param {(time.ZonedDateTime | Date)} begin the point in time from which to start the Riemann sum - * @param {(time.ZonedDateTime | Date)} end the point in time to which to start the Riemann sum - * @param {RiemannType} [riemannType] optional Riemann approximation type to calculate the integral approximation - * (LEFT, RIGHT, TRAPEZOIDAL, MIDPOINT), - * default LEFT + * @example + * var yesterday = time.toZDT().minusDays(1); + * var item = items.getItem('KitchenDimmer'); + * console.log('KitchenDimmer median since yesterday', item.persistence.medianSince(yesterday)); + * + * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the median value * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the Riemann sum between begin and end as {@link items.PersistedState} or null if no states could be found + * @returns {(PersistedState | null)} the median value since timestamp as {@link items.PersistedState} or null if no previous states could be found */ - riemannSumBetween(begin: (time.ZonedDateTime | Date), end: (time.ZonedDateTime | Date), riemannType?: any, serviceId?: string, ...args: any[]): (PersistedState | null); - /** - * Gets the median value of the state of a given Item since a certain point in time. - * - * @example - * var yesterday = time.toZDT().minusDays(1); - * var item = items.getItem('KitchenDimmer'); - * console.log('KitchenDimmer median since yesterday', item.persistence.medianSince(yesterday)); - * - * @param {(time.ZonedDateTime | Date)} timestamp the point in time from which to search for the median value - * @param {string} [serviceId] optional persistence service ID, if omitted, the default persistence service will be used - * @returns {(PersistedState | null)} the median value since timestamp as {@link items.PersistedState} or null if no previous states could be found - */ medianSince(timestamp: (time.ZonedDateTime | Date), serviceId?: string, ...args: any[]): (PersistedState | null); /** * Gets the median value of the state of a given Item until a certain point in time. diff --git a/types/items/item-persistence.d.ts.map b/types/items/item-persistence.d.ts.map index be567bda..194a7e31 100644 --- a/types/items/item-persistence.d.ts.map +++ b/types/items/item-persistence.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item-persistence.d.ts","sourceRoot":"","sources":["../../src/items/item-persistence.js"],"names":[],"mappings":";AAwJA;;;;;;;;;;;GAWG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;;;;;;;;;;;;;;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IACH,oBAEC;IAED;;;OAGG;IACH,2BAGC;IAED;;;OAGG;IACH,oDAWC;IAED,mBAEC;CACF"} \ No newline at end of file +{"version":3,"file":"item-persistence.d.ts","sourceRoot":"","sources":["../../src/items/item-persistence.js"],"names":[],"mappings":";AAwJA;;;;;;;;;;;GAWG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,oBALW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,UAC3B,MAAM,GAAC,MAAM,GAAC,KAAK,aAAa,GAAC,QAAQ,YAAU,eACnD,gBAAgB,cAChB,MAAM,wBAiChB;IAqDD;;;;;;OAMG;IACH,0BAJW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,cAC3B,MAAM,mBACJ,CAAC,aAAa,GAAG,IAAI,CAAC,CAIlC;IAED;;;;;;MAME;IACF,uBAJW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAKvC;IAED;;;;;OAKG;IACH,uBAHW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAIvC;IAED;;;;;;OAMG;IACH,uBAJW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAKvC;IAED;;;;;OAKG;IACH,uBAHW,MAAM,mBACJ,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,CAIvC;IAED;;;;;;OAMG;IACH,0BAJW,OAAO,cACP,MAAM,mBACJ,CAAC,aAAa,GAAG,IAAI,CAAC,CAIlC;IAED;;;;;;OAMG;IACH,sBAJW,OAAO,cACP,MAAM,mBACJ,CAAC,aAAa,GAAG,IAAI,CAAC,CAIlC;IAED;;;;;;;OAOG;IACH,wBALW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,cAC3B,MAAM,mBACJ,OAAO,CAKnB;IAED;;;;;;;OAOG;IACH,wBALW,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC,cAC3B,MAA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;;AAb3C,8BAAkE;AA4ElE;;;;;;;GAOG;AACH;IAQI,qBAAsC;IAGxC;;;;;OAKG;IACH,sCAEC;IAED;;;OAGG;IACH,8BAEC;CAKF;AAhHD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,mCAEC;IADC,cAAgC;IAGlC;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,2BAGC;IAED;;;OAGG;IACH,oDAWC;IAED,mBAEC;CACF"} \ No newline at end of file From e76f643d6792c299959d643013613b24f44d10f9 Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Mon, 2 Dec 2024 09:48:40 +0100 Subject: [PATCH 4/4] add RiemannType static member Signed-off-by: Mark Herwege --- src/items/item-persistence.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/items/item-persistence.js b/src/items/item-persistence.js index 040b907f..74a35816 100644 --- a/src/items/item-persistence.js +++ b/src/items/item-persistence.js @@ -167,6 +167,8 @@ class ItemPersistence { this.rawItem = rawItem; } + static RiemannType = RiemannType; + /** * Persists a state of a given Item. *