Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • id: Reference to the ID of a TimeSeries element in the service configuration file.
  • taskId: <id not required however can not be null>
  • startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • timeZero: Forecast time zero.
  • endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • parameterIds: Subset of parameter IDs for which to retrieve timeseries.
  • locationIds: Subset of location IDs for which to retrieve timeseries.
  • ensembleId: Id of the ensemble, can be null.
  • ensembleMemberIndex Ensemble member index for this time series. (Only if configured)
  • thresholdsVisible: (Optional) Option to add threshold values in the header if set to trueTRUE. Default is FALSE
  • returns: String content of a PiTimeseries XML file only containing header information.

...

  • clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • id: Reference to the ID of a TimeSeries element in the service configuration file.
  • taskId: <id not required however can not be null>
  • startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • timeZero: Forecast time zero.
  • endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • parameterIds: Subset of parmater IDs for which to retrieve timeseries.
  • locationIds: Subset of location IDs for which to retrieve timeseries.
  • ensembleId: Id of the ensemble, can be null.
  • ensembleMemberIndex Ensemble member index for this time series. (Only if configured)
  • thresholdsVisible: (Optional) Option to add threshold values in the header if set to trueTRUE. Default is FALSE
  • returns: String content of a PiTimeseries XML file.

...

  • clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD. If not
    provided then no id mapping will be done.
  • filterId: Filter Id. Can be retrieved using the String getFilters(String piVersion) method.
  • piVersion: (Optional) Pi Version for the return file. Defaults to the latest PI version.
  • returns: String content of a Pi_TimeSeriesParameters XML file containing the parameters available for passed filter id.

Setter methods

Code Block
voidbyte[] putLogMessagegetDataSet(String clientIdid, String piDiagnosticsXmlContentclientId);

Insert log messages

  • clientId: <id only used as description>
  • piDiagnosticsXmlContent: String containing the log messages in the format defined by the PI Diag XSD

Retrieves client dataset from the local datastore

  • clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • id: Identifier of client dataset
  • returns: Byte content of the requested client dataset
Code Block

long getLastModificationTimeDataSets();

Retrieves latest time when a client dataset has been modified

  • returns: Long

Setter methods

Code Block

void setSystemTime(Date systemTime);

Sets system time (Time zero)

  • systemTime: new SystemTime
Code Block

void putLogMessage(String clientId, String piDiagnosticsXmlContent);

Insert log messages

  • clientId: <id only used as description>
  • piDiagnosticsXmlContent: String containing the log messages in the format defined by the PI Diag XSD
Code Block

void putModuleDataSet(String clientId, String taskId, String id, byte[] byteModuleDataSetContent,
Code Block

void putModuleDataSet(String clientId, String taskId, String id, byte[] byteModuleDataSetContent,
                Date validityStartTime, Date validityEndTime, String ensembleId, int ensembleMemberIndex);

...

  • clientId: <not required>
  • taskId: Id of task run. Returned by callingmethod #runTask.
  • waitMillis: Wait time in milli seconds.
  • returns: TRUE if task run completes successfully, else FALSE

Conversion methods

float[] convertToDisplayUnitValue(String parameterId, float[] value);

float []inverseConvertToDisplayUnitValue(String parameterId, float[] value);

float[] convertStageToDischarge(float[] stages, String locationId, long time);

float[] convertDischargeToStage(float[] discharges, String locationId, long time);

Data management methods for client data sets

Code Block

void saveDataSet(String id, String description, byte[] dataSet, String nodeId, String clientId);

Saves client data set to local datastore

  • clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • id: Identifier of client data set
  • description: (Optional) description of the client dataset content
  • dataSet: Byte object holding the client dataset
  • nodeId: Segment/nodeId which is associated to this client dataset
Code Block

void updateDataSet(String id, String description, byte[] dataSet, String nodeId, String clientId);

Updates existing client data set in local datastore

  • clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • id: Identifier of client data set
  • description: (Optional) description of the client dataset content
  • dataSet: Byte object holding the client dataset
  • nodeId: Segment/nodeId which is associated to this client dataset
Code Block

void deleteDataSet(String id, String clientId);

Removes existing client data set from local datastore

  • clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • id: Identifier of client data set
Code Block

void uploadDataSets();

Initiates a database synchronization to upload the client data set to the Master Controller

Installing a PI Service Client

...