Class CreateVideoRequest

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class CreateVideoRequest
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of parameters for GPUdb.createVideo.

    Creates a job to generate a sequence of raster images that visualize data over a specified time.

    • Constructor Detail

      • CreateVideoRequest

        public CreateVideoRequest()
        Constructs a CreateVideoRequest object with default parameters.
      • CreateVideoRequest

        public CreateVideoRequest​(String attribute,
                                  String begin,
                                  double durationSeconds,
                                  String end,
                                  double framesPerSecond,
                                  String style,
                                  String path,
                                  String styleParameters,
                                  Map<String,​String> options)
        Constructs a CreateVideoRequest object with the specified parameters.
        Parameters:
        attribute - The animated attribute to map to the video's frames. Must be present in the LAYERS specified for the visualization. This is often a time-related field but may be any numeric type.
        begin - The start point for the video. Accepts an expression evaluable over the attribute.
        durationSeconds - Seconds of video to produce
        end - The end point for the video. Accepts an expression evaluable over the attribute.
        framesPerSecond - The presentation frame rate of the encoded video in frames per second.
        style - The name of the visualize mode; should correspond to the schema used for the styleParameters field. Supported values:
        path - Fully-qualified KiFS path. Write access is required. A file must not exist at that path, unless REPLACE_IF_EXISTS is TRUE.
        styleParameters - A string containing the JSON-encoded visualize request. Must correspond to the visualize mode specified in the style field.
        options - Optional parameters.
        • TTL: Sets the TTL of the video.
        • WINDOW: Specified using the data-type corresponding to the attribute. For a window of size W, a video frame rendered for time t will visualize data in the interval [t-W,t]. The minimum window size is the interval between successive frames. The minimum value is the default. If a value less than the minimum value is specified, it is replaced with the minimum window size. Larger values will make changes throughout the video appear more smooth while smaller values will capture fast variations in the data.
        • NO_ERROR_IF_EXISTS: If TRUE, does not return an error if the video already exists. Ignored if REPLACE_IF_EXISTS is TRUE. Supported values: The default value is FALSE.
        • REPLACE_IF_EXISTS: If TRUE, deletes any existing video with the same path before creating a new video. Supported values: The default value is FALSE.
        The default value is an empty Map.
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Returns:
        The schema for the class.
      • getAttribute

        public String getAttribute()
        The animated attribute to map to the video's frames. Must be present in the LAYERS specified for the visualization. This is often a time-related field but may be any numeric type.
        Returns:
        The current value of attribute.
      • setAttribute

        public CreateVideoRequest setAttribute​(String attribute)
        The animated attribute to map to the video's frames. Must be present in the LAYERS specified for the visualization. This is often a time-related field but may be any numeric type.
        Parameters:
        attribute - The new value for attribute.
        Returns:
        this to mimic the builder pattern.
      • getBegin

        public String getBegin()
        The start point for the video. Accepts an expression evaluable over the attribute.
        Returns:
        The current value of begin.
      • setBegin

        public CreateVideoRequest setBegin​(String begin)
        The start point for the video. Accepts an expression evaluable over the attribute.
        Parameters:
        begin - The new value for begin.
        Returns:
        this to mimic the builder pattern.
      • getDurationSeconds

        public double getDurationSeconds()
        Seconds of video to produce
        Returns:
        The current value of durationSeconds.
      • setDurationSeconds

        public CreateVideoRequest setDurationSeconds​(double durationSeconds)
        Seconds of video to produce
        Parameters:
        durationSeconds - The new value for durationSeconds.
        Returns:
        this to mimic the builder pattern.
      • getEnd

        public String getEnd()
        The end point for the video. Accepts an expression evaluable over the attribute.
        Returns:
        The current value of end.
      • setEnd

        public CreateVideoRequest setEnd​(String end)
        The end point for the video. Accepts an expression evaluable over the attribute.
        Parameters:
        end - The new value for end.
        Returns:
        this to mimic the builder pattern.
      • getFramesPerSecond

        public double getFramesPerSecond()
        The presentation frame rate of the encoded video in frames per second.
        Returns:
        The current value of framesPerSecond.
      • setFramesPerSecond

        public CreateVideoRequest setFramesPerSecond​(double framesPerSecond)
        The presentation frame rate of the encoded video in frames per second.
        Parameters:
        framesPerSecond - The new value for framesPerSecond.
        Returns:
        this to mimic the builder pattern.
      • getPath

        public String getPath()
        Fully-qualified KiFS path. Write access is required. A file must not exist at that path, unless REPLACE_IF_EXISTS is TRUE.
        Returns:
        The current value of path.
      • setPath

        public CreateVideoRequest setPath​(String path)
        Fully-qualified KiFS path. Write access is required. A file must not exist at that path, unless REPLACE_IF_EXISTS is TRUE.
        Parameters:
        path - The new value for path.
        Returns:
        this to mimic the builder pattern.
      • getStyleParameters

        public String getStyleParameters()
        A string containing the JSON-encoded visualize request. Must correspond to the visualize mode specified in the style field.
        Returns:
        The current value of styleParameters.
      • setStyleParameters

        public CreateVideoRequest setStyleParameters​(String styleParameters)
        A string containing the JSON-encoded visualize request. Must correspond to the visualize mode specified in the style field.
        Parameters:
        styleParameters - The new value for styleParameters.
        Returns:
        this to mimic the builder pattern.
      • getOptions

        public Map<String,​String> getOptions()
        Optional parameters.
        • TTL: Sets the TTL of the video.
        • WINDOW: Specified using the data-type corresponding to the attribute. For a window of size W, a video frame rendered for time t will visualize data in the interval [t-W,t]. The minimum window size is the interval between successive frames. The minimum value is the default. If a value less than the minimum value is specified, it is replaced with the minimum window size. Larger values will make changes throughout the video appear more smooth while smaller values will capture fast variations in the data.
        • NO_ERROR_IF_EXISTS: If TRUE, does not return an error if the video already exists. Ignored if REPLACE_IF_EXISTS is TRUE. Supported values: The default value is FALSE.
        • REPLACE_IF_EXISTS: If TRUE, deletes any existing video with the same path before creating a new video. Supported values: The default value is FALSE.
        The default value is an empty Map.
        Returns:
        The current value of options.
      • setOptions

        public CreateVideoRequest setOptions​(Map<String,​String> options)
        Optional parameters.
        • TTL: Sets the TTL of the video.
        • WINDOW: Specified using the data-type corresponding to the attribute. For a window of size W, a video frame rendered for time t will visualize data in the interval [t-W,t]. The minimum window size is the interval between successive frames. The minimum value is the default. If a value less than the minimum value is specified, it is replaced with the minimum window size. Larger values will make changes throughout the video appear more smooth while smaller values will capture fast variations in the data.
        • NO_ERROR_IF_EXISTS: If TRUE, does not return an error if the video already exists. Ignored if REPLACE_IF_EXISTS is TRUE. Supported values: The default value is FALSE.
        • REPLACE_IF_EXISTS: If TRUE, deletes any existing video with the same path before creating a new video. Supported values: The default value is FALSE.
        The default value is an empty Map.
        Parameters:
        options - The new value for options.
        Returns:
        this to mimic the builder pattern.
      • getSchema

        public org.apache.avro.Schema getSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Returns:
        The schema object describing this class.
      • get

        public Object get​(int index)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to get
        Returns:
        value of the field with the given index.
        Throws:
        IndexOutOfBoundsException
      • put

        public void put​(int index,
                        Object value)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object