Package com.gpudb.protocol
Class InsertSymbolRequest
- java.lang.Object
-
- com.gpudb.protocol.InsertSymbolRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class InsertSymbolRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.insertSymbol.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInsertSymbolRequest.OptionsA set of string constants for theInsertSymbolRequestparameteroptions.static classInsertSymbolRequest.SymbolFormatA set of string constants for theInsertSymbolRequestparametersymbolFormat.
-
Constructor Summary
Constructors Constructor 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.
-
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.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.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.ByteBuffergetSymbolData()The actual symbol data.StringgetSymbolFormat()Specifies the symbol format.StringgetSymbolId()The id of the symbol being added.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.InsertSymbolRequestsetOptions(Map<String,String> options)Optional parameters.InsertSymbolRequestsetSymbolData(ByteBuffer symbolData)The actual symbol data.InsertSymbolRequestsetSymbolFormat(String symbolFormat)Specifies the symbol format.InsertSymbolRequestsetSymbolId(String symbolId)The id of the symbol being added.StringtoString()
-
-
-
Constructor Detail
-
InsertSymbolRequest
public InsertSymbolRequest()
Constructs an InsertSymbolRequest object with default parameters.
-
InsertSymbolRequest
public InsertSymbolRequest(String symbolId, String symbolFormat, ByteBuffer symbolData, Map<String,String> options)
Constructs an InsertSymbolRequest object with the specified parameters.- Parameters:
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. IfsymbolFormatis 'svg' then this should be the raw bytes representing an svg file. IfsymbolFormatis 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: IfsymbolFormatis 'svg' this is ignored. IfsymbolFormatis '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.
-
-
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.
-
getSymbolId
public String getSymbolId()
The id of the symbol being added. This is the same id that should be in the 'SYMBOLCODE' column for objects using this symbol- Returns:
- The current value of
symbolId.
-
setSymbolId
public InsertSymbolRequest setSymbolId(String symbolId)
The id of the symbol being added. This is the same id that should be in the 'SYMBOLCODE' column for objects using this symbol- Parameters:
symbolId- The new value forsymbolId.- Returns:
thisto mimic the builder pattern.
-
getSymbolFormat
public String getSymbolFormat()
- Returns:
- The current value of
symbolFormat.
-
setSymbolFormat
public InsertSymbolRequest setSymbolFormat(String symbolFormat)
- Parameters:
symbolFormat- The new value forsymbolFormat.- Returns:
thisto mimic the builder pattern.
-
getSymbolData
public ByteBuffer getSymbolData()
The actual symbol data. IfsymbolFormatis 'svg' then this should be the raw bytes representing an svg file. IfsymbolFormatis 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'- Returns:
- The current value of
symbolData.
-
setSymbolData
public InsertSymbolRequest setSymbolData(ByteBuffer symbolData)
The actual symbol data. IfsymbolFormatis 'svg' then this should be the raw bytes representing an svg file. IfsymbolFormatis 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'- Parameters:
symbolData- The new value forsymbolData.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.COLOR: IfsymbolFormatis 'svg' this is ignored. IfsymbolFormatis '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.- Returns:
- The current value of
options.
-
setOptions
public InsertSymbolRequest setOptions(Map<String,String> options)
Optional parameters.COLOR: IfsymbolFormatis 'svg' this is ignored. IfsymbolFormatis '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.- 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
-
-