public class DataFactory
extends java.lang.Object
DataStructure based on input parameters| Modifier and Type | Field and Description |
|---|---|
private static DataFactory |
dataFactory |
static int |
DOUBLE |
static int |
INTEGER |
static int |
STRING |
| Modifier | Constructor and Description |
|---|---|
private |
DataFactory()
Use
getInstance() to instantiate an object |
| Modifier and Type | Method and Description |
|---|---|
DataStructure<?> |
getDataStructure(int dataType,
int dataspace_id)
Returns a DataStructure with the requested data type and dimensions of the provided dataspace
|
DataStructure<?> |
getDataStructure(int dataType,
int num_dimensions,
long[] dimensions)
Returns a DataStructure with the requested data type and dimensions provided
|
private DataStructure<?> |
getDoubleDataStructure(int num_dimensions,
long[] dimensions) |
static DataFactory |
getInstance()
Get an instance of DataFactory class
|
private <T> DataStructure<?> |
getIntegerDataStructure(int num_dimensions,
long[] dimensions) |
private DataStructure<?> |
getStringDataStructure(int num_dimensions,
long[] dimensions) |
private static DataFactory dataFactory
public static final int INTEGER
public static final int DOUBLE
public static final int STRING
private DataFactory()
getInstance() to instantiate an objectpublic static DataFactory getInstance()
public DataStructure<?> getDataStructure(int dataType, int dataspace_id) throws ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException
dataType - Type of data. Type can be DOUBLE, INTEGER, STRINGdataspace_id - The identifier of the dataspace. It'll be used to calcualte the dimensions of DataStructure to be return.ncsa.hdf.hdf5lib.exceptions.HDF5LibraryExceptionpublic DataStructure<?> getDataStructure(int dataType, int num_dimensions, long[] dimensions)
dataType - Type of data. Type can be DOUBLE, INTEGER, STRINGnum_dimensions - It's the rank of array. It can be 1, 2 or 3 for Integer or Double. It can be 1 for String.dimensions - It give the dimension of each array.private <T> DataStructure<?> getIntegerDataStructure(int num_dimensions, long[] dimensions)
private DataStructure<?> getDoubleDataStructure(int num_dimensions, long[] dimensions)
private DataStructure<?> getStringDataStructure(int num_dimensions, long[] dimensions)