Versions Compared

Key

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

...

Code Block
byte[] getModuleDataSet(String clientIdin0, String idin1, String ensembleIdin2, int ensembleMemberIndexin3)

Get a module data set.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Reference to the ID of a ModuleDataSet element in the service configuration file.
  • in2 - ensembleId: <currently not supported>
  • in3 - ensembleMemberIndex: <currently not supported>
  • returns: Binary content of the ModuleDataSet file for requested ModuleState.
Code Block
byte[] getModuleParameterSet(String clientIdin0, String idin1, String ensembleIdin2, int ensembleMemberIndexin3)

Get a module parameter set.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Reference to the ID of a ModuleParameterSet element in the service configuration file.
  • in2 - ensembleId: <currently not supported>
  • in3 - ensembleMemberIndex: <currently not supported>
  • returns: String content of the ModuleParameterSet file for requested ModuleState.
Code Block
byte[] getModuleStateBinary(String clientIdin0, String idin1, Date stateTimein2, String ensembleIdin3, int ensembleMemberIndexin4);

Get a cold state file.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Reference to the ID of a ModuleState element in the service configuration file.
  • in2 - stateTime: Time for which to retrieve warm state file. Time values can be obtained from method #getAvailableStateTimes
  • in3 - ensembleId: <currently not supported>
  • in4 - ensembleMemberIndex: <currently not supported>

...

Code Block
String getTimeSeriesHeaders(String clientIdin0, String idin1, String taskIdin2, Date startTimein3,
		Date timeZeroin4, Date endTimein5, String[] parameterIdsin6, String[] locationIdsin7, String ensembleIdin8, int ensembleMemberIndexin9,
		boolean thresholdsVisiblein10);

Get the header information for requested timeseries.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Reference to the ID of a TimeSeries element in the service configuration file.
  • in2 - taskId: <id not required however can not be null>
  • in3 - startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • in4 - timeZero: Forecast time zero.
  • in5 - endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • in6 - parameterIds: Subset of parameter IDs for which to retrieve timeseries.
  • in7 - locationIds: Subset of location IDs for which to retrieve timeseries.
  • in8 - ensembleId: Id of the ensemble, can be null.
  • in9 - ensembleMemberIndex Ensemble member index for this time series. (Only if configured)
  • in10 - thresholdsVisible: (Optional) Option to add threshold values in the header if set to TRUE. Default is FALSE
  • returns: String content of a PiTimeseries XML file only containing header information.
Code Block
String getTimeSeries(String clientIdin0, String idin1, String taskIdin2, Date startTimein3,
		Date timeZeroin4, Date endTimein5, String[] parameterIdsin6, String[] locationIdsin7, String ensembleIdin8, int ensembleMemberIndexin9,
		boolean thresholdsVisiblein10);

Get header and data for requested timeseries.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Reference to the ID of a TimeSeries element in the service configuration file.
  • in2 - taskId: <id not required however can not be null>
  • in3 - startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • in4 - timeZero: Forecast time zero.
  • in5 - endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • in6 - parameterIds: Subset of parmater IDs for which to retrieve timeseries.
  • in7 - locationIds: Subset of location IDs for which to retrieve timeseries.
  • in8 - ensembleId: Id of the ensemble, can be null.
  • in9 - ensembleMemberIndex Ensemble member index for this time series. (Only if configured)
  • in10 - thresholdsVisible: (Optional) Option to add threshold values in the header if set to TRUE. Default is FALSE
  • returns: String content of a PiTimeseries XML file.
Code Block
byte[] getTimeSeriesBytes(String clientIdin0, String idin1, String taskIdin2, Date startTimein3,
		Date timeZeroin4, Date endTimein5,&nbsp; String[] parameterIdsin6, String[] locationIdsin7,
                String ensembleIdin8, int ensembleMemberIndexin9);

Get binary data for requested timeseries.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Reference to the ID of a TimeSeries element in the service configuration file.
  • in2 - taskId: <id not required however can not be null>
  • in3 - startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • in4 - timeZero: Forecast time zero.
  • in5 - endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • in6 - parameterIds: Subset of parameter IDs for which to retrieve timeseries.
  • in7 - locationIds: Subset of location IDs for which to retrieve timeseries.
  • in8 - ensembleId: Id of the ensemble, can be null.
  • in9 - ensembleMemberIndex Ensemble member index for this time series. (Only if configured)
  • returns: Content of the binary file that can be exported together with the PITimeseries XML files.
Code Block
String getTimeSeriesHeadersForFilter(String clientIdin0, Date startTimein1, Date timeZeroin2, Date endTimein3, String filterIdin4, String[] locationIdsin5, String[] parameterIdsin6, boolean useDisplayUnitsin7, String piVersionin8);

Get the header information for requested timeseries using a filter id.

  • in0 - 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.
  • in1 - startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • in2 - timeZero: Forecast time zero.
  • in3 - endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • in4 - filterId: Filter Id. Can be retrieved using the String getFilters(String piVersion) method.
  • in5 - locationIds: Subset of location IDs for which to retrieve timeseries.
  • in6 - parameterIds: Subset of parameter IDs for which to retrieve timeseries.
  • in7 - useDisplayUnits: (Optional) Option to export values using display units (TRUE) instead of database units (FALSE).
  • in8 - piVersion: (Optional) Pi Version for the return file. Defaults to the latest PI version.
  • returns: String content of a Pi_Timeseries XML file only containing header information.
Code Block
String getTimeSeriesForFilter(String clientIdin0, Date startTimein1, Date timeZeroin2, Date endTimein3, String filterIdin4, String[] locationIdsin5, String[] parameterIdsin6, boolean convertDatumin7, boolean useDisplayUnitsin8, String piVersionin9);

Get the timeseries data for requested timeseries using a filter id.

  • in0 - 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.
  • in1 - startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • in2 - timeZero: Forecast time zero.
  • in3 - endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • in4 - filterId: Filter Id. Can be retrieved using the String getFilters(String piVersion) method.
  • in5 - locationIds: Subset of location IDs for which to retrieve timeseries.
  • in6 - parameterIds: Subset of parameter IDs for which to retrieve timeseries.
  • in7 - convertDatum: Option to convert values from relative to location height to absolute values (TRUE). If FALSE values remain relative.
  • in8 - useDisplayUnits: Option to export values using display units (TRUE) instead of database units (FALSE).
  • in9 - piVersion: (Optional) Pi Version for the return file. Defaults to the latest PI version.
  • returns: String content of a Pi_Timeseries XML file only containing header information.
Code Block
String getTimeSeriesForSegment(String segmentIdin0, String clientIdin1, Date timeZeroin2, Date startTimein3, Date endTimein4, boolean thresholdsVisiblein5);

Get the timeseries data for requested timeseries using a filter id.

  • in0 - segmentId: identifier of the segment node
  • in1 - 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.
  • in2 - timeZero: Forecast time zero.
  • segmentId: identifier of the segment node
  • in3 - startTime: Start date/time of run - Long.MAXVALUE if the configured default is to be used
  • in4 - endTime: End date/time of run - Long.MAXVALUE if the configured default is to be used
  • in5 - threhsoldsVisisble: Option to include (TRUE) or exclude (FALSE) thresholds in the time series headers. Default is FALSE
  • returns: String content of a Pi_Timeseries XML file containing all timeseries including headers for this segemnt

...

Code Block
String[] getAllDataSetsIdsForNode(String nodeIdin0, String clientIdin1);

Retrieves all identifiers to client datasets available for this segement node

  • in0 - clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - nodeId: Segment node identifier
  • returns: Array of string identifiers referring to client datasets
Code Block
String getDescription(String idin0, String clientIdin1)

Retrieves description of a specific client dataset from the local datastore

  • in0 - clientId: (Optional) File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - id: Identifier of client dataset
  • returns: String description of dataset content
Code Block
byte[] getDataSet(String idin0, String clientIdin1)

Retrieves client dataset from the local datastore

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

...

Code Block
void setSystemTime(Date systemTimein0);

Sets system time (Time zero)

  • in0 - systemTime: new SystemTime
Code Block
void putLogMessage(String clientIdin0, String piDiagnosticsXmlContentin1);

Insert log messages

  • in0 - clientId: <id only used as description>
  • in1 - piDiagnosticsXmlContent: String containing the log messages in the format defined by the PI Diag XSD
Code Block
void putModuleDataSet(String clientIdin0, String taskIdin1, String idin2, byte[] byteModuleDataSetContentin3,
               Date validityStartTimein4, Date validityEndTimein5, String ensembleIdin6, int ensembleMemberIndexin7);

Insert a module data set.

...

Code Block
void putModuleParameterSet(String clientIdin0, String idin1, String taskIdin2, String piParameterSetXmlContentin3,
               Date validityStartTimein4, Date validityEndTimein5, String ensembleIdin6, int ensembleMemberIndexin7);

Insert a module parameter set.

...

Code Block
void putState(String clientIdin0, String taskIdin1, String piStateXmlContentin2, String byteStateFileNamein3,
                byte[] byteStateContentin4, String ensembleIdin5, int ensembleMemberIndexin6);
  • <not implemented>
Code Block
void putTimeSeries(String clientIdin0, String taskIdin1, String idin2, String piTimeSeriesXmlContentin3,
                String ensembleIdin4, int ensembleMemberIndexin5);

Insert a timeseries.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - taskId: <id not required>
  • in2 - id: Reference to the ID of a TimeSeries element in the service configuration file.
  • in3 - piTimeSeriesXmlContent: Time Series content in the form of a Pi timeseries xml file.
  • in4 - ensembleId: Id of the ensemble
  • in5 - ensembleMemberIndex: Ensemble member index for this time series. NULL if this is not an ensemble.
Code Block
void putTimeSeriesBinary(String clientIdin0, String taskIdin1, String idin2, String piTimeSeriesXmlContentin3,
                 byte[] byteTimeSeriesContentin4, String ensembleIdin5, int ensembleMemberIndexin6);

Insert a timeseries using the binary format.

  • in0 - clientId: File name of service configuration file located in the OC configuration directory 'PiServiceConfigFiles'. This file is an instance of the FewsPiServiceConfig XSD.
  • in1 - taskId: <id not required>
  • in2 - id: Reference to the ID of a TimeSeries element in the service configuration file.
  • in3 - piTimeSeriesXmlContent: Time Series content in the form of a Pi timeseries xml file.
  • in4 - byteTimeSeriesContent: TimeSeries data content in the form of a byte array.
  • in5 - ensembleId: Id of the ensemble
  • in6 - ensembleMemberIndex: Ensemble member index for this time series. NULL if this is not an ensemble.
Code Block
void putTimeSeriesForFilters(String clientIdin0, String piTimeSeriesXmlContentin1, byte[] byteTimeSeriesContentin2, boolean convertDatumin3);

Insert a timeseries using the Filters configuration.

  • in0 - 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.
  • in1 - piTimeSeriesXmlContent: Time Series content in the form of a Pi timeseries xml file. Timeseries must be
    available in the FEWS Filters configuration file.
  • in2 - byteTimeSeriesContent: (Optional) TimeSeries data content in the form of a byte array.
  • in3 - convertDatum Option to convert the values to values that are relative to location height (TRUE). If FALSE then no conversion is performed.

...

Code Block
String createTask(String clientIdin0);

Create a new task.

  • in0 - clientId: <not required>
  • returns: Unique task id.

...

Code Block
String runTask(String clientIdin0, String taskIdin1, String workflowIdin2, Date startTimein3, Date timeZeroin4,
          Date endTimein4, String coldStateIdin5, String scenarioIdin6, String userIdin7, String descriptionin8);

Run a newly created task.

  • in0 - clientId: <not required>
  • in1 - taskId: Id obtained by calling method #createTask
  • in2 - workflowId: Id of workflow to run by task.
  • in3 - startTime: <not required>
  • in4 - timeZero: <not required>
  • in5 - endTime: <not required>
  • in6 - coldStateId: <not implemented>
  • in7 - userId: Id of user running task.
  • in8 - scenarioId: Id of what-if scenario.
  • in9 - description: Description
  • returns: TaskRun id
Code Block
void cancelTask(String clientIdin0, String taskIdin1);

Cancel a running task.

  • <not implemented>
Code Block
boolean waitForTask(String clientIdin0, String taskIdin1, int waitMillisin2);

Wait for a running task to finish.

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

...

Code Block
float[] convertToDisplayUnitValue(String parameterIdin0, float[] valuein1);

Converts parameter values from base unit to display unit

  • in0 - parameterId: Parameter identifier, used to trace down the associated base unit as well as the display unit
  • in1- value: array of values to be converted
  • returns: Array of converted values (floats)
Code Block
float []inverseConvertToDisplayUnitValue(String parameterIdin0, float[] valuein1);

Converts parameter values from display unit to base unit

  • in0 - parameterId: Parameter identifier, used to trace down the associated base unit as well as the display unit
  • in1 - value: array of values to be converted
  • returns: Array of converted values (floats)
Code Block
float[] convertStageToDischarge(float[] stagesin0, String locationIdin1, long timein2);

Converts stage value to discharge using a rating curve at a specific location valid for a particular moment in time

  • in0 - locationId: Identifier of the rating cruve location
  • in1 - time: time for which the rating curve should be valid
  • in2 - stages: array of stages to be converted to discharge
  • returns: array of values respresenting discharges

...