Package com.seeq.link.sdk.services
Class TransformableCapsule
java.lang.Object
com.seeq.link.sdk.services.TransformableCapsule
- All Implemented Interfaces:
Transformable<Capsule>
Transformer for Capsules.
To ensure consistency with the datasource the Capsule's properties cannot be mutated, but new properties can
be created using any Capsule property as input.
-
Constructor Summary
ConstructorsConstructorDescriptionTransformableCapsule
(Capsule input, String conditionDataId) TransformableCapsule
(TimeInstant start, TimeInstant end, List<Capsule.Property> properties, String conditionDataId) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Return a copy of this Transformable object.Get the underlying API input object that backs this Transformable.getProperty
(String propertyName) Returns the value for the given property.void
removeProperty
(String propertyName) Removes a property.void
setProperty
(String propertyName, Object propertyValue) Sets the value for the given property.void
setProperty
(String propertyName, Object propertyValue, String unitOfMeasure) Sets the value for the given property.toString()
-
Constructor Details
-
TransformableCapsule
-
TransformableCapsule
public TransformableCapsule(TimeInstant start, TimeInstant end, List<Capsule.Property> properties, String conditionDataId)
-
-
Method Details
-
copy
Description copied from interface:Transformable
Return a copy of this Transformable object.- Specified by:
copy
in interfaceTransformable<Capsule>
- Returns:
- A copy of this object.
-
getInputObject
Description copied from interface:Transformable
Get the underlying API input object that backs this Transformable.- Specified by:
getInputObject
in interfaceTransformable<Capsule>
- Returns:
- A Seeq API input object.
-
getProperty
Description copied from interface:Transformable
Returns the value for the given property.- Specified by:
getProperty
in interfaceTransformable<Capsule>
- Parameters:
propertyName
- The property to get.- Returns:
- The value, as a string, boolean, int or double.
-
setProperty
Description copied from interface:Transformable
Sets the value for the given property.- Specified by:
setProperty
in interfaceTransformable<Capsule>
- Parameters:
propertyName
- The property to set.propertyValue
- The value to set. Many properties are restricted to certain value types (e.g. 'Name' will almost always have to be a string).
-
setProperty
Description copied from interface:Transformable
Sets the value for the given property.- Specified by:
setProperty
in interfaceTransformable<Capsule>
- Parameters:
propertyName
- The property to set.propertyValue
- The value to set. Many properties are restricted to certain value types (e.g. 'Name' will almost always have to be a string).unitOfMeasure
- The unit of measure to set on the property. Optional, and may be ignored for certain properties.
-
removeProperty
Description copied from interface:Transformable
Removes a property.- Specified by:
removeProperty
in interfaceTransformable<Capsule>
- Parameters:
propertyName
- The property to remove.
-
toString
-