solarnetwork-api-core
    Preparing search index...

    Class DatumFilter

    A filter criteria object for datum.

    This filter is used to query both node datum and location datum. Not all properties are applicable to both types. Be sure to consult the SolarNet API documentation on the supported properties for each type.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    props: Map<string, any>

    The object that all properties are stored on.

    Accessors

    • get accumulatingPropertyName(): undefined | string

      An accumulating property name.

      This manages the first available value from the accumulatingPropertyNames property. Set to null to remove.

      Returns undefined | string

    • set accumulatingPropertyName(name: null | string): void

      Parameters

      • name: null | string

      Returns void

    • get accumulatingPropertyNames(): undefined | string[]

      An array of accumulating property names. Set to null to remove.

      Returns undefined | string[]

    • set accumulatingPropertyNames(names: null | string[]): void

      Parameters

      • names: null | string[]

      Returns void

    • get dataPath(): undefined | string

      A data path, in dot-delimited notation like i.watts. Set to null to remove.

      Returns undefined | string

    • set dataPath(path: null | string): void

      Parameters

      • path: null | string

      Returns void

    • get endDate(): undefined | Date

      A maximum date. Set to null to remove.

      Returns undefined | Date

    • set endDate(date: null | Date): void

      Parameters

      • date: null | Date

      Returns void

    • get instantaneousPropertyName(): undefined | string

      An instantaneous property name.

      This manages the first available value from the instantaneousPropertyNames property. Set to null to remove.

      Returns undefined | string

    • set instantaneousPropertyName(name: null | string): void

      Parameters

      • name: null | string

      Returns void

    • get instantaneousPropertyNames(): undefined | string[]

      An array of instantaneous property names. Set to null to remove.

      Returns undefined | string[]

    • set instantaneousPropertyNames(names: null | string[]): void

      Parameters

      • names: null | string[]

      Returns void

    • get localEndDate(): undefined | Date

      A local maximum date. Set to null to remove.

      Returns undefined | Date

    • set localEndDate(date: null | Date): void

      Parameters

      • date: null | Date

      Returns void

    • get localStartDate(): undefined | Date

      Alocal minimumin date. Set to null to remove.

      Returns undefined | Date

    • set localStartDate(date: null | Date): void

      Parameters

      • date: null | Date

      Returns void

    • get locationId(): undefined | number

      A location ID.

      This manages the first available location ID from the locationIds property. Set to null to remove.

      Returns undefined | number

    • set locationId(locationId: null | number): void

      Parameters

      • locationId: null | number

      Returns void

    • get locationIds(): undefined | number[]

      An array of location IDs. Set to null to remove.

      Returns undefined | number[]

    • set locationIds(locationIds: null | number[]): void

      Parameters

      • locationIds: null | number[]

      Returns void

    • get metadataFilter(): undefined | string

      A metadata filter (LDAP style search criteria). Set to null to remove.

      Returns undefined | string

    • set metadataFilter(val: null | string): void

      Parameters

      • val: null | string

      Returns void

    • get mostRecent(): undefined | boolean

      The "most recent" flag. Set to null to remove.

      Returns undefined | boolean

    • set mostRecent(value: null | boolean): void

      Parameters

      • value: null | boolean

      Returns void

    • get nodeId(): undefined | number

      A node ID.

      This manages the first available node ID from the nodeIds property. Set to null to remove.

      Returns undefined | number

    • set nodeId(nodeId: null | number): void

      Parameters

      • nodeId: null | number

      Returns void

    • get nodeIdMaps(): undefined | Map<number, Set<number>>

      A mapping of virtual node IDs to sets of real node IDs to combine. Set to null to remove.

      Returns undefined | Map<number, Set<number>>

    • set nodeIdMaps(map: null | Map<number, Set<number>>): void

      Parameters

      • map: null | Map<number, Set<number>>

      Returns void

    • get nodeIds(): undefined | number[]

      An array of node IDs. Set to null to remove.

      Returns undefined | number[]

    • set nodeIds(nodeIds: null | number[]): void

      Parameters

      • nodeIds: null | number[]

      Returns void

    • get partialAggregation(): undefined | Aggregation

      A partial aggregation.

      Including this in a filter along with aggregation will cause SolarNet to return aggregated results that include partial results of this granularity. For example if aggregation == 'Month' and partialAggregation == 'Day' and a date range of 15 Jan - 15 Mar was requested, 3 month results would be returned for the date ranges 15 Jan - 31 Jan, 1 Feb - 28 Feb, and 1 Mar - 14 Mar.

      Set to null to remove.

      Returns undefined | Aggregation

    • set partialAggregation(agg: null | Aggregation): void

      Parameters

      Returns void

    • get propertyName(): undefined | string

      A property name.

      This manages the first available value from the propertyNames property. Set to null to remove.

      Returns undefined | string

    • set propertyName(name: null | string): void

      Parameters

      • name: null | string

      Returns void

    • get propertyNames(): undefined | string[]

      An array of property names. Set to null to remove.

      Returns undefined | string[]

    • set propertyNames(names: null | string[]): void

      Parameters

      • names: null | string[]

      Returns void

    • get query(): undefined | string

      A general full-text style query string. Set to null to remove.

      Returns undefined | string

    • set query(val: null | string): void

      Parameters

      • val: null | string

      Returns void

    • get size(): number

      Get the number of properties configured.

      Returns number

    • get sourceId(): undefined | string

      A source ID.

      This manages the first available source ID from the sourceIds property. Set to null to remove.

      Returns undefined | string

    • set sourceId(sourceId: null | string): void

      Parameters

      • sourceId: null | string

      Returns void

    • get sourceIdMaps(): undefined | Map<string, Set<string>>

      A mapping of virtual source IDs to sets of real source IDs to combine. Set to null to remove.

      Returns undefined | Map<string, Set<string>>

    • set sourceIdMaps(map: null | Map<string, Set<string>>): void

      Parameters

      • map: null | Map<string, Set<string>>

      Returns void

    • get sourceIds(): undefined | string[]

      An array of source IDs. Set to null to remove.

      Returns undefined | string[]

    • set sourceIds(sourceIds: null | string[]): void

      Parameters

      • sourceIds: null | string[]

      Returns void

    • get startDate(): undefined | Date

      A minimumin date. Set to null to remove.

      Returns undefined | Date

    • set startDate(date: null | Date): void

      Parameters

      • date: null | Date

      Returns void

    • get statusPropertyName(): undefined | string

      A property name.

      This manages the first available value from the statusPropertyNames property. Set to null to remove.

      Returns undefined | string

    • set statusPropertyName(name: null | string): void

      Parameters

      • name: null | string

      Returns void

    • get statusPropertyNames(): undefined | string[]

      An array of property names. Set to null to remove.

      Returns undefined | string[]

    • set statusPropertyNames(names: null | string[]): void

      Parameters

      • names: null | string[]

      Returns void

    • get streamId(): undefined | string

      A stream ID.

      This manages the first available stream ID from the streamIds property. Set to null to remove.

      Returns undefined | string

    • set streamId(streamId: null | string): void

      Parameters

      • streamId: null | string

      Returns void

    • get streamIds(): undefined | string[]

      An array of stream IDs. Set to null to remove.

      Returns undefined | string[]

    • set streamIds(streamIds: null | string[]): void

      Parameters

      • streamIds: null | string[]

      Returns void

    • get tags(): undefined | string[]

      An array of tags. Set to null to remove.

      Returns undefined | string[]

    • set tags(val: null | string[]): void

      Parameters

      • val: null | string[]

      Returns void

    • get userId(): undefined | number

      A user ID.

      This manages the first available location ID from the userIds property. Set to null to remove.

      Returns undefined | number

    • set userId(userId: null | number): void

      Parameters

      • userId: null | number

      Returns void

    • get userIds(): undefined | number[]

      An array of user IDs. Set to null to remove.

      Returns undefined | number[]

    • set userIds(userIds: null | number[]): void

      Parameters

      • userIds: null | number[]

      Returns void

    • get withoutTotalResultsCount(): undefined | boolean

      Get the without total results flag. Set to null to remove.

      Returns undefined | boolean

    • set withoutTotalResultsCount(val: null | boolean): void

      Parameters

      • val: null | boolean

      Returns void

    Methods

    • Get a property value.

      Parameters

      • key: string

        the key to get

      Returns any

      the associated value for the given key

    • Set or remove a property value.

      Parameters

      • key: string

        the key to set the value for

      • newValue: any

        the new value to set for the given key; if null then the key property will be removed

      Returns this

      this object

    • Get all properties.

      Returns Record<string, any>

      all properties of this object copied into a simple object

    • Set or remove multiple properties.

      Parameters

      • newProps: object | Map<string, any>

        the new values to set; if any value is null that property will be deleted

      Returns this

      this object

    • Get this object as a standard URI encoded (query parameters) string value.

      All enumerable properties of the props property will be added to the result. If any property value is an array, the values of the array will be joined by a comma. Any Util.Enum values will have their name property used.

      Parameters

      • OptionalpropertyName: string

        an optional object property prefix to add to all properties

      • OptionalcallbackFn: PropMapUriEncodingCallbackFn

        An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either undefined to skip the property, a 2 or 3-element array with the property name and value to use, and an optional boolean to force array values to use mutliple parameter keys. Any other return value causes the property to be used as-is.

      Returns string

      the URI encoded string

    • Get this object as a standard URI encoded (query parameters) string value with sorting and pagination parameters.

      This calls Util.PropMap.toUriEncoding first, then encodes the sorts and pagination parameters, if provided.

      Parameters

      • Optionalsorts: SortDescriptor[]

        optional sort settings to use

      • Optionalpagination: Pagination

        optional pagination settings to use

      • OptionalpropertyName: string

        an optional object property prefix to add to all properties

      • OptionalcallbackFn: PropMapUriEncodingCallbackFn

        An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either undefined to skip the property, a 2-element array with the property name and value to use, or anything else to use the property as-is.

      Returns string

      the URI encoded string