public class Dimension<T>
extends java.lang.Object
implements java.lang.AutoCloseable
Example:
Context ctx = new Context();
Domain domain = new Domain(ctx);
// Create a dimension with inclusive domain [0,1000] and tile extent 100.
Dimension<Integer> d = new Dimension<Integer>(ctx, "d", Integer.class, new Pair<Integer, Integer>(0, 1000), 100);
domain.addDimension(d);
Modifier | Constructor and Description |
---|---|
|
Dimension(Context ctx,
java.lang.String name,
java.lang.Class<T> type,
Pair<T,T> domain,
T extent)
Constructor for creating a new dimension with java type class
|
|
Dimension(Context ctx,
java.lang.String name,
Datatype type,
Pair<T,T> domain,
T extent)
Constructor for creating a new dimension with TileDB Datatype
|
protected |
Dimension(Context ctx,
SWIGTYPE_p_p_tiledb_dimension_t dimensionpp)
Constructor from native object
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Free's native TileDB resources associated with the Dimension object
|
java.lang.String |
domainToStr() |
long |
getCellValNum()
Retrieves the number of values per cell for the dimension.
|
protected SWIGTYPE_p_tiledb_dimension_t |
getDimensionp() |
Pair<T,T> |
getDomain() |
FilterList |
getFilterList()
Gets the list of filtes associated with the dimension
|
java.lang.String |
getName() |
T |
getTileExtent() |
Datatype |
getType() |
boolean |
isVar()
Checks whether the dimension is var-sized
|
void |
setCellValNum(long cellValNum)
Sets the number of values per cell for the dimension.
|
Dimension<T> |
setFilterList(FilterList filters)
Sets the Dimension FilterList.
|
java.lang.String |
tileExtentToStr() |
protected Dimension(Context ctx, SWIGTYPE_p_p_tiledb_dimension_t dimensionpp)
ctx
- A TileDB contextdimensionpp
- A Swig wrapper object to a tiledb_dimension_t pointerpublic Dimension(Context ctx, java.lang.String name, java.lang.Class<T> type, Pair<T,T> domain, T extent) throws TileDBError
ctx
- The TileDB context.name
- The dimension name.type
- The Dimension Java scalar type classdomain
- The dimension domain (A Pair containing the lower and upper bound).extent
- The tile extent on the dimension.TileDBError
- A TileDB exceptionpublic Dimension(Context ctx, java.lang.String name, Datatype type, Pair<T,T> domain, T extent) throws TileDBError
ctx
- A TileDB contextname
- A dimension nametype
- The dimension Datatypedomain
- A dimension domain (A Pair containing lower and upper bound).extent
- The tiledb extent on the dimension.TileDBError
- A TileDB exception.protected SWIGTYPE_p_tiledb_dimension_t getDimensionp()
public java.lang.String getName() throws TileDBError
TileDBError
- A TileDB exceptionpublic Datatype getType() throws TileDBError
TileDBError
- A TileDB exceptionpublic Pair<T,T> getDomain() throws TileDBError
TileDBError
- A TileDB exceptionpublic java.lang.String domainToStr() throws TileDBError
TileDBError
- A TileDB exceptionpublic T getTileExtent() throws TileDBError
TileDBError
- A TileDB exceptionpublic FilterList getFilterList() throws TileDBError
TileDBError
- A TileDB exceptionpublic Dimension<T> setFilterList(FilterList filters) throws TileDBError
filters
- A TileDB FilterListTileDBError
- A TileDB exceptionpublic void setCellValNum(long cellValNum) throws TileDBError
cellValNum
- The number of values per cellTileDBError
- TileDBError A TileDB errorpublic long getCellValNum() throws TileDBError
TileDBError
- TileDBError A TileDB errorpublic boolean isVar() throws TileDBError
TileDBError
- A TileDB errorpublic java.lang.String tileExtentToStr() throws TileDBError
TileDBError
- A TileDB exceptionpublic void close()
close
in interface java.lang.AutoCloseable