Package io.tiledb.java.api
Class Dimension<T>
- java.lang.Object
-
- io.tiledb.java.api.Dimension<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Dimension<T> extends java.lang.Object implements java.lang.AutoCloseable
Describes one dimension of an Array. The dimension consists of a type, lower and upper bound, and tile-extent describing the memory ordering. Dimensions are added to a Domain.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);
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Dimension(Context ctx, SWIGTYPE_p_p_tiledb_dimension_t dimensionpp)
Constructor from native objectDimension(Context ctx, java.lang.String name, Datatype type, Pair<T,T> domain, T extent)
Constructor for creating a new dimension with TileDB DatatypeDimension(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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Free's native TileDB resources associated with the Dimension objectjava.lang.String
domainToStr()
protected SWIGTYPE_p_tiledb_dimension_t
getDimensionp()
Pair<T,T>
getDomain()
java.lang.String
getName()
T
getTileExtent()
Datatype
getType()
java.lang.String
tileExtentToStr()
-
-
-
Constructor Detail
-
Dimension
protected Dimension(Context ctx, SWIGTYPE_p_p_tiledb_dimension_t dimensionpp)
Constructor from native object- Parameters:
ctx
- A TileDB contextdimensionpp
- A Swig wrapper object to a tiledb_dimension_t pointer
-
Dimension
public Dimension(Context ctx, java.lang.String name, java.lang.Class<T> type, Pair<T,T> domain, T extent) throws TileDBError
Constructor for creating a new dimension with java type class- Parameters:
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.- Throws:
TileDBError
- A TileDB exception
-
Dimension
public Dimension(Context ctx, java.lang.String name, Datatype type, Pair<T,T> domain, T extent) throws TileDBError
Constructor for creating a new dimension with TileDB Datatype- Parameters:
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.- Throws:
TileDBError
- A TileDB exception.
-
-
Method Detail
-
getDimensionp
protected SWIGTYPE_p_tiledb_dimension_t getDimensionp()
-
getName
public java.lang.String getName() throws TileDBError
- Returns:
- The String name of the dimension.
- Throws:
TileDBError
- A TileDB exception
-
getType
public Datatype getType() throws TileDBError
- Returns:
- The dimension datatype.
- Throws:
TileDBError
- A TileDB exception
-
getDomain
public Pair<T,T> getDomain() throws TileDBError
- Returns:
- The domain of the dimension (A Pair containing the lower and upper bound).
- Throws:
TileDBError
- A TileDB exception
-
domainToStr
public java.lang.String domainToStr() throws TileDBError
- Returns:
- A string representation of the domain.
- Throws:
TileDBError
- A TileDB exception
-
getTileExtent
public T getTileExtent() throws TileDBError
- Returns:
- The tile extent of the dimension.
- Throws:
TileDBError
- A TileDB exception
-
tileExtentToStr
public java.lang.String tileExtentToStr() throws TileDBError
- Returns:
- A string representation of the extent.
- Throws:
TileDBError
- A TileDB exception
-
close
public void close()
Free's native TileDB resources associated with the Dimension object- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-