Mixin: NodeDatumUrlHelperMixin

net~ NodeDatumUrlHelperMixin

A mixin class that adds SolarNode datum query support to module:net~UrlHelper.

Methods


availableSourcesUrl( [nodeId] [, metadataFilter])

Generate a URL for finding the available source IDs for a node or metadata filter.

Parameters:
Name Type Argument Description
nodeId number | Array.<number> <optional>

a specific node ID, or array of node IDs, to use; if not provided the nodeIds property of this class will be used, unless null is passed in which case no node IDs will be added to the URL

metadataFilter string <optional>

the LDAP-style metadata filter

Returns:

the URL

Type
string

datumFilter()

Get a new module:domain~DatumFilter configured with properties of this instance.

This will configure the following properties:

  • nodeIds
  • sourceIds
Returns:

the filter

Type
module:domain~DatumFilter

listDatumUrl(datumFilter [, sorts] [, pagination])

Generate a URL for querying for datum, in either raw or aggregate form.

If the datumFilter has an aggregate value set, then aggregate results will be returned by SolarNet.

Parameters:
Name Type Argument Description
datumFilter module:domain~DatumFilter

the search criteria

sorts Array.<module:domain~SortDescriptor> <optional>

optional sort settings to use

pagination module:domain~Pagination <optional>

optional pagination settings to use

Returns:

the URL

Type
string

mostRecentDatumUrl(datumFilter [, sorts] [, pagination])

Generate a URL for querying for the most recent datum.

Parameters:
Name Type Argument Description
datumFilter module:domain~DatumFilter

the search criteria

sorts Array.<module:domain~SortDescriptor> <optional>

optional sort settings to use

pagination module:domain~Pagination <optional>

optional pagination settings to use

Returns:

the URL

Type
string

reportableIntervalUrl( [nodeId] [, sourceIds])

Generate a URL for the "reportable interval" for a node, optionally limited to a specific set of source IDs.

If no source IDs are provided, then the reportable interval query will return an interval for all available sources.

Parameters:
Name Type Argument Description
nodeId number <optional>

a specific node ID to use; if not provided the nodeId property of this class will be used

sourceIds Array.<string> <optional>

an array of source IDs to limit query to; if not provided the sourceIds property of this class will be used

Returns:

the URL

Type
string