Package com.gpudb.protocol
Class VisualizeImageChartRequest
- java.lang.Object
-
- com.gpudb.protocol.VisualizeImageChartRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class VisualizeImageChartRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.visualizeImageChart.Scatter plot is the only plot type currently supported. A non-numeric column can be specified as x or y column and jitters can be added to them to avoid excessive overlapping. All color values must be in the format RRGGBB or AARRGGBB (to specify the alpha value). The image is contained in the
imageDatafield.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVisualizeImageChartRequest.OptionsA set of string constants for theVisualizeImageChartRequestparameteroptions.static classVisualizeImageChartRequest.StyleOptionsA set of string constants for theVisualizeImageChartRequestparameterstyleOptions.
-
Constructor Summary
Constructors Constructor Description VisualizeImageChartRequest()Constructs a VisualizeImageChartRequest object with default parameters.VisualizeImageChartRequest(String tableName, List<String> xColumnNames, List<String> yColumnNames, double minX, double maxX, double minY, double maxY, int width, int height, String bgColor, Map<String,List<String>> styleOptions, Map<String,String> options)Constructs a VisualizeImageChartRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.StringgetBgColor()Background color of the generated image.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.intgetHeight()Height of the generated image in pixels.doublegetMaxX()Upper bound for the x column values.doublegetMaxY()Upper bound for the y column values.doublegetMinX()Lower bound for the x column values.doublegetMinY()Lower bound for the y column values.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.Map<String,List<String>>getStyleOptions()Rendering style options for a chart.StringgetTableName()Name of the table containing the data to be drawn as a chart, in [schema_name.]table_name format, using standard name resolution rules.intgetWidth()Width of the generated image in pixels.List<String>getXColumnNames()Names of the columns containing the data mapped to the x axis of a chart.List<String>getYColumnNames()Names of the columns containing the data mapped to the y axis of a chart.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.VisualizeImageChartRequestsetBgColor(String bgColor)Background color of the generated image.VisualizeImageChartRequestsetHeight(int height)Height of the generated image in pixels.VisualizeImageChartRequestsetMaxX(double maxX)Upper bound for the x column values.VisualizeImageChartRequestsetMaxY(double maxY)Upper bound for the y column values.VisualizeImageChartRequestsetMinX(double minX)Lower bound for the x column values.VisualizeImageChartRequestsetMinY(double minY)Lower bound for the y column values.VisualizeImageChartRequestsetOptions(Map<String,String> options)Optional parameters.VisualizeImageChartRequestsetStyleOptions(Map<String,List<String>> styleOptions)Rendering style options for a chart.VisualizeImageChartRequestsetTableName(String tableName)Name of the table containing the data to be drawn as a chart, in [schema_name.]table_name format, using standard name resolution rules.VisualizeImageChartRequestsetWidth(int width)Width of the generated image in pixels.VisualizeImageChartRequestsetXColumnNames(List<String> xColumnNames)Names of the columns containing the data mapped to the x axis of a chart.VisualizeImageChartRequestsetYColumnNames(List<String> yColumnNames)Names of the columns containing the data mapped to the y axis of a chart.StringtoString()
-
-
-
Constructor Detail
-
VisualizeImageChartRequest
public VisualizeImageChartRequest()
Constructs a VisualizeImageChartRequest object with default parameters.
-
VisualizeImageChartRequest
public VisualizeImageChartRequest(String tableName, List<String> xColumnNames, List<String> yColumnNames, double minX, double maxX, double minY, double maxY, int width, int height, String bgColor, Map<String,List<String>> styleOptions, Map<String,String> options)
Constructs a VisualizeImageChartRequest object with the specified parameters.- Parameters:
tableName- Name of the table containing the data to be drawn as a chart, in [schema_name.]table_name format, using standard name resolution rules.xColumnNames- Names of the columns containing the data mapped to the x axis of a chart.yColumnNames- Names of the columns containing the data mapped to the y axis of a chart.minX- Lower bound for the x column values. For non-numeric x column, each x column item is mapped to an integral value starting from 0.maxX- Upper bound for the x column values. For non-numeric x column, each x column item is mapped to an integral value starting from 0.minY- Lower bound for the y column values. For non-numeric y column, each y column item is mapped to an integral value starting from 0.maxY- Upper bound for the y column values. For non-numeric y column, each y column item is mapped to an integral value starting from 0.width- Width of the generated image in pixels.height- Height of the generated image in pixels.bgColor- Background color of the generated image.styleOptions- Rendering style options for a chart.POINTCOLOR: The color of points in the plot represented as a hexadecimal number. The default value is '0000FF'.POINTSIZE: The size of points in the plot represented as number of pixels. The default value is '3'.POINTSHAPE: The shape of points in the plot. Supported values: The default value isSQUARE.CB_POINTCOLORS: Point color class break information consisting of three entries: class-break attribute, class-break values/ranges, and point color values. This option overrides the pointcolor option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point color values are separated by cb_delimiter, e.g. {"price", "20:30;30:40;40:50", "0xFF0000;0x00FF00;0x0000FF"}.CB_POINTSIZES: Point size class break information consisting of three entries: class-break attribute, class-break values/ranges, and point size values. This option overrides the pointsize option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point size values are separated by cb_delimiter, e.g. {"states", "NY;TX;CA", "3;5;7"}.CB_POINTSHAPES: Point shape class break information consisting of three entries: class-break attribute, class-break values/ranges, and point shape names. This option overrides the pointshape option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point shape names are separated by cb_delimiter, e.g. {"states", "NY;TX;CA", "circle;square;diamond"}.CB_DELIMITER: A character or string which separates per-class values in a class-break style option string. The default value is ';'.X_ORDER_BY: An expression or aggregate expression by which non-numeric x column values are sorted, e.g. "avg(price) descending".Y_ORDER_BY: An expression or aggregate expression by which non-numeric y column values are sorted, e.g. "avg(price)", which defaults to "avg(price) ascending".SCALE_TYPE_X: Type of x axis scale. Supported values: The default value isNONE.SCALE_TYPE_Y: Type of y axis scale. Supported values: The default value isNONE.MIN_MAX_SCALED: If this options is set to "false", this endpoint expects request's min/max values are not yet scaled. They will be scaled according to scale_type_x or scale_type_y for response. If this options is set to "true", this endpoint expects request's min/max values are already scaled according to scale_type_x/scale_type_y. Response's min/max values will be equal to request's min/max values. The default value is 'false'.JITTER_X: Amplitude of horizontal jitter applied to non-numeric x column values. The default value is '0.0'.JITTER_Y: Amplitude of vertical jitter applied to non-numeric y column values. The default value is '0.0'.PLOT_ALL: If this options is set to "true", all non-numeric column values are plotted ignoring min_x, max_x, min_y and max_y parameters. The default value is 'false'.
options- Optional parameters.IMAGE_ENCODING: Encoding to be applied to the output image. When using JSON serialization it is recommended to specify this asBASE64. Supported values:BASE64: Apply base64 encoding to the output image.NONE: Do not apply any additional encoding to the output image.
NONE.
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.
-
getTableName
public String getTableName()
Name of the table containing the data to be drawn as a chart, in [schema_name.]table_name format, using standard name resolution rules.- Returns:
- The current value of
tableName.
-
setTableName
public VisualizeImageChartRequest setTableName(String tableName)
Name of the table containing the data to be drawn as a chart, in [schema_name.]table_name format, using standard name resolution rules.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getXColumnNames
public List<String> getXColumnNames()
Names of the columns containing the data mapped to the x axis of a chart.- Returns:
- The current value of
xColumnNames.
-
setXColumnNames
public VisualizeImageChartRequest setXColumnNames(List<String> xColumnNames)
Names of the columns containing the data mapped to the x axis of a chart.- Parameters:
xColumnNames- The new value forxColumnNames.- Returns:
thisto mimic the builder pattern.
-
getYColumnNames
public List<String> getYColumnNames()
Names of the columns containing the data mapped to the y axis of a chart.- Returns:
- The current value of
yColumnNames.
-
setYColumnNames
public VisualizeImageChartRequest setYColumnNames(List<String> yColumnNames)
Names of the columns containing the data mapped to the y axis of a chart.- Parameters:
yColumnNames- The new value foryColumnNames.- Returns:
thisto mimic the builder pattern.
-
getMinX
public double getMinX()
Lower bound for the x column values. For non-numeric x column, each x column item is mapped to an integral value starting from 0.- Returns:
- The current value of
minX.
-
setMinX
public VisualizeImageChartRequest setMinX(double minX)
Lower bound for the x column values. For non-numeric x column, each x column item is mapped to an integral value starting from 0.- Parameters:
minX- The new value forminX.- Returns:
thisto mimic the builder pattern.
-
getMaxX
public double getMaxX()
Upper bound for the x column values. For non-numeric x column, each x column item is mapped to an integral value starting from 0.- Returns:
- The current value of
maxX.
-
setMaxX
public VisualizeImageChartRequest setMaxX(double maxX)
Upper bound for the x column values. For non-numeric x column, each x column item is mapped to an integral value starting from 0.- Parameters:
maxX- The new value formaxX.- Returns:
thisto mimic the builder pattern.
-
getMinY
public double getMinY()
Lower bound for the y column values. For non-numeric y column, each y column item is mapped to an integral value starting from 0.- Returns:
- The current value of
minY.
-
setMinY
public VisualizeImageChartRequest setMinY(double minY)
Lower bound for the y column values. For non-numeric y column, each y column item is mapped to an integral value starting from 0.- Parameters:
minY- The new value forminY.- Returns:
thisto mimic the builder pattern.
-
getMaxY
public double getMaxY()
Upper bound for the y column values. For non-numeric y column, each y column item is mapped to an integral value starting from 0.- Returns:
- The current value of
maxY.
-
setMaxY
public VisualizeImageChartRequest setMaxY(double maxY)
Upper bound for the y column values. For non-numeric y column, each y column item is mapped to an integral value starting from 0.- Parameters:
maxY- The new value formaxY.- Returns:
thisto mimic the builder pattern.
-
getWidth
public int getWidth()
Width of the generated image in pixels.- Returns:
- The current value of
width.
-
setWidth
public VisualizeImageChartRequest setWidth(int width)
Width of the generated image in pixels.- Parameters:
width- The new value forwidth.- Returns:
thisto mimic the builder pattern.
-
getHeight
public int getHeight()
Height of the generated image in pixels.- Returns:
- The current value of
height.
-
setHeight
public VisualizeImageChartRequest setHeight(int height)
Height of the generated image in pixels.- Parameters:
height- The new value forheight.- Returns:
thisto mimic the builder pattern.
-
getBgColor
public String getBgColor()
Background color of the generated image.- Returns:
- The current value of
bgColor.
-
setBgColor
public VisualizeImageChartRequest setBgColor(String bgColor)
Background color of the generated image.- Parameters:
bgColor- The new value forbgColor.- Returns:
thisto mimic the builder pattern.
-
getStyleOptions
public Map<String,List<String>> getStyleOptions()
Rendering style options for a chart.POINTCOLOR: The color of points in the plot represented as a hexadecimal number. The default value is '0000FF'.POINTSIZE: The size of points in the plot represented as number of pixels. The default value is '3'.POINTSHAPE: The shape of points in the plot. Supported values: The default value isSQUARE.CB_POINTCOLORS: Point color class break information consisting of three entries: class-break attribute, class-break values/ranges, and point color values. This option overrides the pointcolor option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point color values are separated by cb_delimiter, e.g. {"price", "20:30;30:40;40:50", "0xFF0000;0x00FF00;0x0000FF"}.CB_POINTSIZES: Point size class break information consisting of three entries: class-break attribute, class-break values/ranges, and point size values. This option overrides the pointsize option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point size values are separated by cb_delimiter, e.g. {"states", "NY;TX;CA", "3;5;7"}.CB_POINTSHAPES: Point shape class break information consisting of three entries: class-break attribute, class-break values/ranges, and point shape names. This option overrides the pointshape option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point shape names are separated by cb_delimiter, e.g. {"states", "NY;TX;CA", "circle;square;diamond"}.CB_DELIMITER: A character or string which separates per-class values in a class-break style option string. The default value is ';'.X_ORDER_BY: An expression or aggregate expression by which non-numeric x column values are sorted, e.g. "avg(price) descending".Y_ORDER_BY: An expression or aggregate expression by which non-numeric y column values are sorted, e.g. "avg(price)", which defaults to "avg(price) ascending".SCALE_TYPE_X: Type of x axis scale. Supported values: The default value isNONE.SCALE_TYPE_Y: Type of y axis scale. Supported values: The default value isNONE.MIN_MAX_SCALED: If this options is set to "false", this endpoint expects request's min/max values are not yet scaled. They will be scaled according to scale_type_x or scale_type_y for response. If this options is set to "true", this endpoint expects request's min/max values are already scaled according to scale_type_x/scale_type_y. Response's min/max values will be equal to request's min/max values. The default value is 'false'.JITTER_X: Amplitude of horizontal jitter applied to non-numeric x column values. The default value is '0.0'.JITTER_Y: Amplitude of vertical jitter applied to non-numeric y column values. The default value is '0.0'.PLOT_ALL: If this options is set to "true", all non-numeric column values are plotted ignoring min_x, max_x, min_y and max_y parameters. The default value is 'false'.
- Returns:
- The current value of
styleOptions.
-
setStyleOptions
public VisualizeImageChartRequest setStyleOptions(Map<String,List<String>> styleOptions)
Rendering style options for a chart.POINTCOLOR: The color of points in the plot represented as a hexadecimal number. The default value is '0000FF'.POINTSIZE: The size of points in the plot represented as number of pixels. The default value is '3'.POINTSHAPE: The shape of points in the plot. Supported values: The default value isSQUARE.CB_POINTCOLORS: Point color class break information consisting of three entries: class-break attribute, class-break values/ranges, and point color values. This option overrides the pointcolor option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point color values are separated by cb_delimiter, e.g. {"price", "20:30;30:40;40:50", "0xFF0000;0x00FF00;0x0000FF"}.CB_POINTSIZES: Point size class break information consisting of three entries: class-break attribute, class-break values/ranges, and point size values. This option overrides the pointsize option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point size values are separated by cb_delimiter, e.g. {"states", "NY;TX;CA", "3;5;7"}.CB_POINTSHAPES: Point shape class break information consisting of three entries: class-break attribute, class-break values/ranges, and point shape names. This option overrides the pointshape option if both are provided. Class-break ranges are represented in the form of "min:max". Class-break values/ranges and point shape names are separated by cb_delimiter, e.g. {"states", "NY;TX;CA", "circle;square;diamond"}.CB_DELIMITER: A character or string which separates per-class values in a class-break style option string. The default value is ';'.X_ORDER_BY: An expression or aggregate expression by which non-numeric x column values are sorted, e.g. "avg(price) descending".Y_ORDER_BY: An expression or aggregate expression by which non-numeric y column values are sorted, e.g. "avg(price)", which defaults to "avg(price) ascending".SCALE_TYPE_X: Type of x axis scale. Supported values: The default value isNONE.SCALE_TYPE_Y: Type of y axis scale. Supported values: The default value isNONE.MIN_MAX_SCALED: If this options is set to "false", this endpoint expects request's min/max values are not yet scaled. They will be scaled according to scale_type_x or scale_type_y for response. If this options is set to "true", this endpoint expects request's min/max values are already scaled according to scale_type_x/scale_type_y. Response's min/max values will be equal to request's min/max values. The default value is 'false'.JITTER_X: Amplitude of horizontal jitter applied to non-numeric x column values. The default value is '0.0'.JITTER_Y: Amplitude of vertical jitter applied to non-numeric y column values. The default value is '0.0'.PLOT_ALL: If this options is set to "true", all non-numeric column values are plotted ignoring min_x, max_x, min_y and max_y parameters. The default value is 'false'.
- Parameters:
styleOptions- The new value forstyleOptions.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.IMAGE_ENCODING: Encoding to be applied to the output image. When using JSON serialization it is recommended to specify this asBASE64. Supported values:BASE64: Apply base64 encoding to the output image.NONE: Do not apply any additional encoding to the output image.
NONE.
Map.- Returns:
- The current value of
options.
-
setOptions
public VisualizeImageChartRequest setOptions(Map<String,String> options)
Optional parameters.IMAGE_ENCODING: Encoding to be applied to the output image. When using JSON serialization it is recommended to specify this asBASE64. Supported values:BASE64: Apply base64 encoding to the output image.NONE: Do not apply any additional encoding to the output image.
NONE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto 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:
getSchemain interfaceorg.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:
getin interfaceorg.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:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-