Class GDataObject
- java.lang.Object
-
- org.hortonmachine.gears.io.grasslegacy.utils.GDataObject
-
- Direct Known Subclasses:
GDataObject.GridData,GDataObject.PointData,GDataObject.VectorData
public abstract class GDataObject extends Object
A displayable object.
- Since:
- 1.1.0
- Author:
- Andrea Antonello - www.hydrologis.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGDataObject.GridDatastatic classGDataObject.PointDatastatic classGDataObject.VectorData
-
Field Summary
Fields Modifier and Type Field Description static intCOLUMN_TYPE_DOUBLEstatic intCOLUMN_TYPE_FLOATstatic intCOLUMN_TYPE_INTstatic intCOLUMN_TYPE_STRINGprotected booleandataIsVolatileprotected org.hortonmachine.gears.io.grasslegacy.utils.GDataObject.DataStoredstorestatic intPOINT_DATAstatic VectorrafHandlesstatic intRASTER_DATAstatic intUSE_BACKING_FILEstatic intUSE_BACKING_MEMORYstatic IntegerVECTOR_AREA_DATAstatic intVECTOR_DATAstatic IntegerVECTOR_LINE_DATA
-
Constructor Summary
Constructors Constructor Description GDataObject()GDataObject(int dtype, int use)Constructor for Vector data object.GDataObject(int dtype, int[] xyz, int[] c)Constructor for Point data object with xyz + some other column data.GDataObject(int dtype, int len, int use)Constructor for Raster data object of len size.GDataObject(int dtype, ByteBuffer buf)Constructor for Raster data object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumerationenumerator()Returns an enumeration of the data of this object.Objectget(int row, int col)Returns the data of this objects row and column cell.intgetColumnCount()Returns the number of columns in this data object.StringgetColumnName(int col)intgetColumnType(int col)ByteBuffergetReadBuffer()intgetRowCount()Returns the number of rows in this data object.booleanhasData()voidsetColumnName(int col, String name)voidsetColumnNames(String[] names)voidsetDouble(int row, int col, double val)Set the data at the cell given by the row and column specified to double value.voidsetFloat(int row, int col, float val)Set the data at the cell given by the row and column specified to float value.voidsetInt(int row, int col, int val)Set the data at the cell given by the row and column specified to integer value.ByteBuffersetReadBuffer(ByteBuffer newBuffer)voidsetString(int row, int col, String val)Set the data at the cell given by the row and column specified to String value.voidwriteRow(Vector v)Extract the number of columns worth of data from the vector and write to the data store.
-
-
-
Field Detail
-
POINT_DATA
public static final int POINT_DATA
- See Also:
- Constant Field Values
-
VECTOR_DATA
public static final int VECTOR_DATA
- See Also:
- Constant Field Values
-
RASTER_DATA
public static final int RASTER_DATA
- See Also:
- Constant Field Values
-
VECTOR_LINE_DATA
public static final Integer VECTOR_LINE_DATA
-
VECTOR_AREA_DATA
public static final Integer VECTOR_AREA_DATA
-
USE_BACKING_FILE
public static final int USE_BACKING_FILE
- See Also:
- Constant Field Values
-
USE_BACKING_MEMORY
public static final int USE_BACKING_MEMORY
- See Also:
- Constant Field Values
-
COLUMN_TYPE_DOUBLE
public static final int COLUMN_TYPE_DOUBLE
- See Also:
- Constant Field Values
-
COLUMN_TYPE_INT
public static final int COLUMN_TYPE_INT
- See Also:
- Constant Field Values
-
COLUMN_TYPE_FLOAT
public static final int COLUMN_TYPE_FLOAT
- See Also:
- Constant Field Values
-
COLUMN_TYPE_STRING
public static final int COLUMN_TYPE_STRING
- See Also:
- Constant Field Values
-
dataIsVolatile
protected boolean dataIsVolatile
-
dstore
protected org.hortonmachine.gears.io.grasslegacy.utils.GDataObject.DataStore dstore
-
rafHandles
public static Vector rafHandles
-
-
Constructor Detail
-
GDataObject
public GDataObject()
-
GDataObject
public GDataObject(int dtype, int[] xyz, int[] c)Constructor for Point data object with xyz + some other column data.
-
GDataObject
public GDataObject(int dtype, int use)Constructor for Vector data object.
-
GDataObject
public GDataObject(int dtype, ByteBuffer buf)Constructor for Raster data object.
-
GDataObject
public GDataObject(int dtype, int len, int use)Constructor for Raster data object of len size.
-
-
Method Detail
-
hasData
public boolean hasData()
-
getReadBuffer
public ByteBuffer getReadBuffer()
-
setReadBuffer
public ByteBuffer setReadBuffer(ByteBuffer newBuffer)
-
setColumnNames
public void setColumnNames(String[] names)
-
setColumnName
public void setColumnName(int col, String name)
-
getColumnName
public String getColumnName(int col)
-
getColumnType
public int getColumnType(int col)
-
get
public Object get(int row, int col)
Returns the data of this objects row and column cell.
-
writeRow
public void writeRow(Vector v)
Extract the number of columns worth of data from the vector and write to the data store.
-
setInt
public void setInt(int row, int col, int val)Set the data at the cell given by the row and column specified to integer value.
-
setFloat
public void setFloat(int row, int col, float val)Set the data at the cell given by the row and column specified to float value.
-
setDouble
public void setDouble(int row, int col, double val)Set the data at the cell given by the row and column specified to double value.
-
setString
public void setString(int row, int col, String val)Set the data at the cell given by the row and column specified to String value.
-
enumerator
public Enumeration enumerator()
Returns an enumeration of the data of this object.
-
getColumnCount
public int getColumnCount()
Returns the number of columns in this data object.
-
getRowCount
public int getRowCount()
Returns the number of rows in this data object.
-
-