public class ColorTableRmfSerializer extends ClassSerializer
Clase para convertir a XML una tabla de color y obtener la tabla desde XML. Esta clase implementa el interfaz IRmfBlock con los métodos de escritura y lectura. Estos serán utilizados por el gestor de ficheros RMF para escribir y leer datos.
La estructura XML de una tabla de color es la siguiente:
<ColorTable name="nombre" version="1.1">
<Color value="0.0" name="rojo" rgb="#FF34FF" interpolated="50"/>
<Color value="1.0" name="rojo" rgb="#FF34FF" interpolated="50"/>
<Alpha value="0.0" number="255" interpolated="50"/>
<NoData rgba="#">
</ColorTable>
Constructor and Description |
---|
ColorTableRmfSerializer()
Constructor.
|
ColorTableRmfSerializer(ColorTable colorTable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getMainTag()
Obtiene el tag principal del bloque
|
Object |
getResult()
Obtiene el objeto resultante de haber aplicado un read.
|
void |
read(String xml)
Lee el bloque XML pasado por parámetro y carga el objeto correspondiente
con los datos.
|
static void |
register()
Registra ColorTableRmfSerializer en los puntos de extension de Serializer
|
String |
write()
Obtiene un bloque XML que representa a las propiedades del objeto a
serializar.
|
convertStringInDoubleArray, convertStringInIntArray, parseBoundingBox, parsePoint2D, parserString, parseViewPort, putProperty, putProperty, putProperty
public ColorTableRmfSerializer(ColorTable colorTable)
ColorTable
- tabla a convertir en XMLpublic ColorTableRmfSerializer()
public static void register()
public void read(String xml) throws ParsingException
IRmfBlock
ParsingException
public String write()
IRmfBlock
public Object getResult()
IRmfBlock