public class InsertSymbolRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.insertSymbol(InsertSymbolRequest)
.
Adds a symbol or icon (i.e. an image) to represent data points when data is rendered visually. Users must provide the symbol identifier (string), a format (currently supported: 'svg' and 'svg_path'), the data for the symbol, and any additional optional parameter (e.g. color). To have a symbol used for rendering create a table with a string column named 'SYMBOLCODE' (along with 'x' or 'y' for example). Then when the table is rendered (via WMS) if the 'dosymbology' parameter is 'true' then the value of the 'SYMBOLCODE' column is used to pick the symbol displayed for each point.
Modifier and Type | Class and Description |
---|---|
static class |
InsertSymbolRequest.Options
Optional parameters.
|
static class |
InsertSymbolRequest.SymbolFormat
Specifies the symbol format.
|
Constructor and Description |
---|
InsertSymbolRequest()
Constructs an InsertSymbolRequest object with default parameters.
|
InsertSymbolRequest(String symbolId,
String symbolFormat,
ByteBuffer symbolData,
Map<String,String> options)
Constructs an InsertSymbolRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
ByteBuffer |
getSymbolData() |
String |
getSymbolFormat() |
String |
getSymbolId() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
InsertSymbolRequest |
setOptions(Map<String,String> options) |
InsertSymbolRequest |
setSymbolData(ByteBuffer symbolData) |
InsertSymbolRequest |
setSymbolFormat(String symbolFormat) |
InsertSymbolRequest |
setSymbolId(String symbolId) |
String |
toString() |
public InsertSymbolRequest()
public InsertSymbolRequest(String symbolId, String symbolFormat, ByteBuffer symbolData, Map<String,String> options)
symbolId
- The id of the symbol being added. This is the same id
that should be in the 'SYMBOLCODE' column for objects
using this symbolsymbolFormat
- Specifies the symbol format. Must be either 'svg'
or 'svg_path'.
Supported values:
symbolData
- The actual symbol data. If symbolFormat
is
'svg' then this should be the raw bytes representing
an svg file. If symbolFormat
is svg path then
this should be an svg path string, for example:
'M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z'options
- Optional parameters.
COLOR
: If symbolFormat
is 'svg' this is
ignored. If symbolFormat
is 'svg_path' then this
option specifies the color (in RRGGBB hex format) of the
path. For example, to have the path rendered in red,
used 'FF0000'. If 'color' is not provided then '00FF00'
(i.e. green) is used by default.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getSymbolId()
public InsertSymbolRequest setSymbolId(String symbolId)
symbolId
- The id of the symbol being added. This is the same id
that should be in the 'SYMBOLCODE' column for objects
using this symbolthis
to mimic the builder pattern.public String getSymbolFormat()
public InsertSymbolRequest setSymbolFormat(String symbolFormat)
public ByteBuffer getSymbolData()
symbolFormat
is 'svg' then
this should be the raw bytes representing an svg file. If symbolFormat
is svg path then this should be an svg path
string, for example:
'M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z'public InsertSymbolRequest setSymbolData(ByteBuffer symbolData)
symbolData
- The actual symbol data. If symbolFormat
is
'svg' then this should be the raw bytes representing
an svg file. If symbolFormat
is svg path then
this should be an svg path string, for example:
'M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z'this
to mimic the builder pattern.public Map<String,String> getOptions()
COLOR
: If
symbolFormat
is 'svg' this is ignored. If symbolFormat
is 'svg_path' then this option specifies the color
(in RRGGBB hex format) of the path. For example, to have the
path rendered in red, used 'FF0000'. If 'color' is not provided
then '00FF00' (i.e. green) is used by default.
Map
.public InsertSymbolRequest setOptions(Map<String,String> options)
options
- Optional parameters.
COLOR
: If symbolFormat
is 'svg' this is
ignored. If symbolFormat
is 'svg_path' then this
option specifies the color (in RRGGBB hex format) of the
path. For example, to have the path rendered in red,
used 'FF0000'. If 'color' is not provided then '00FF00'
(i.e. green) is used by default.
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2020. All rights reserved.