Package org.sensorhub.api.command
Class CommandResult
java.lang.Object
org.sensorhub.api.command.CommandResult
- All Implemented Interfaces:
 ICommandResult
Immutable class used to describe the result of a command
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigIdprotected Collection<BigId>protected Collection<IObsData> - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiontoString()static ICommandResultAdd data to a command resultstatic ICommandResultwithEntireDatastream(BigId dataStreamID) Declare an entire datastream as resultstatic ICommandResultwithObs(Collection<IObsData> obsList) Add observations to a command resultstatic ICommandResultwithObsInDatastream(BigId dataStreamID, Collection<BigId> obsIDs) Declare certain obs from an existing datastream as resultstatic ICommandResultwithSingleObs(IObsData obs) Add observations to a command result 
- 
Field Details
- 
dataStreamID
 - 
obsIDs
 - 
obsList
 
 - 
 - 
Constructor Details
- 
CommandResult
protected CommandResult() 
 - 
 - 
Method Details
- 
withEntireDatastream
Declare an entire datastream as result- Parameters:
 dataStreamID- The ID of the datastream that contains the result- Returns:
 - The result object
 
 - 
withObsInDatastream
Declare certain obs from an existing datastream as result- Parameters:
 dataStreamID- The ID of the datastream that contains the resultobsIDs- IDs of observations that constitute the result- Returns:
 - The result object
 
 - 
withObs
Add observations to a command result- Parameters:
 obsList- List of observations to be added to the datastream of the result- Returns:
 - The result object
 
 - 
withSingleObs
Add observations to a command result- Parameters:
 obs- A single observation to return as the result- Returns:
 - The result object
 
 - 
withData
Add data to a command result- Parameters:
 data- A single observation result to return as the command result- Returns:
 - The result object
 
 - 
getObservations
- Specified by:
 getObservationsin interfaceICommandResult- Returns:
 - inline result data, as a list of observations matching the
 result schema defined by 
ICommandStreamInfo 
 - 
getObservationRefs
- Specified by:
 getObservationRefsin interfaceICommandResult- Returns:
 - reference to observations (when not provided inline) generated during the execution of the command and added to one or more existing datastream(s).
 
 - 
getDataStreamID
- Specified by:
 getDataStreamIDin interfaceICommandResult- Returns:
 - reference to an entire datastream that contains one or more observations (but usually many) generated during the execution of the command.
 
 - 
toString
 
 -