|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectncsa.hdf.object.HObject
ncsa.hdf.object.Datatype
Datatype encapsulates information of a datatype. Information includes the class, size, endian of a datatype.
Field Summary | |
static int |
CLASS_ARRAY
|
static int |
CLASS_BITFIELD
|
static int |
CLASS_CHAR
|
static int |
CLASS_COMPOUND
|
static int |
CLASS_ENUM
|
static int |
CLASS_FLOAT
|
static int |
CLASS_INTEGER
|
static int |
CLASS_NO_CLASS
|
static int |
CLASS_OPAQUE
|
static int |
CLASS_REFERENCE
|
static int |
CLASS_STRING
|
static int |
CLASS_VLEN
|
protected int |
datatypeClass
The class of the datatype. |
protected int |
datatypeOrder
The byte order of the datatype. |
protected int |
datatypeSign
The sign of the datatype. |
protected int |
datatypeSize
The size (in bytes) of the datatype. |
static int |
NATIVE
|
protected int |
nativeID
Datatype identifier of the implementing class of this datatype. |
static int |
NSGN
|
static int |
ORDER_BE
|
static int |
ORDER_LE
|
static int |
ORDER_NONE
|
static int |
ORDER_VAX
|
static int |
SIGN_2
|
static int |
SIGN_NONE
|
Fields inherited from class ncsa.hdf.object.HObject |
hasAttribute, oid, separator |
Constructor Summary | |
Datatype(FileFormat fileFormat,
java.lang.String name,
java.lang.String path,
long[] oid)
|
|
Datatype(int type)
Create a Datatype with a given identifier of user defined datatype. |
|
Datatype(int tclass,
int tsize,
int torder,
int tsign)
Create an Datatype with specified class, size, byte order and sign. |
Method Summary | |
void |
close(int id)
Closes access to this object. |
abstract void |
fromNative(int nativeID)
Specify this datatype with a given id of a user defined datatype. |
int |
getDatatypeClass()
Returns the class of the datatype. |
java.lang.String |
getDatatypeDescription()
Returns a short text description of this datatype. |
int |
getDatatypeOrder()
Returns the Order of the datatype. |
int |
getDatatypeSign()
Returns the sign of the datatype. |
int |
getDatatypeSize()
Returns the size of the datatype. |
java.util.List |
getMetadata()
Loads the metadata such as attributes and type of the the data object into memory if the metadata is not loaded. |
abstract boolean |
isUnsigned()
Checks if this datatype is an unsigned integer. |
int |
open()
Opens access to this object. |
void |
removeMetadata(java.lang.Object info)
Deletes an existing metadata from this data object. |
abstract int |
toNative()
Converts this datatype to a user defined datatype. |
void |
writeMetadata(java.lang.Object info)
Saves a specific metadata into file. |
Methods inherited from class ncsa.hdf.object.HObject |
equalsOID, getFID, getFile, getFileFormat, getName, getOID, getPath, hasAttribute, setName, setPath, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NATIVE
public static final int CLASS_NO_CLASS
public static final int CLASS_INTEGER
public static final int CLASS_FLOAT
public static final int CLASS_CHAR
public static final int CLASS_STRING
public static final int CLASS_BITFIELD
public static final int CLASS_OPAQUE
public static final int CLASS_COMPOUND
public static final int CLASS_REFERENCE
public static final int CLASS_ENUM
public static final int CLASS_VLEN
public static final int CLASS_ARRAY
public static final int ORDER_LE
public static final int ORDER_BE
public static final int ORDER_VAX
public static final int ORDER_NONE
public static final int SIGN_NONE
public static final int SIGN_2
public static final int NSGN
protected int datatypeClass
protected int datatypeSize
protected int datatypeOrder
protected int datatypeSign
protected int nativeID
Constructor Detail |
public Datatype(FileFormat fileFormat, java.lang.String name, java.lang.String path, long[] oid)
public Datatype(int tclass, int tsize, int torder, int tsign)
tclass
- the class of the datatype.tsize
- the size of the datatype in byptes.torder
- the order of the datatype.tsign
- the sign of the datatype.public Datatype(int type)
int user_type = H5.J2C( HDF5CDataTypes.JH5T_NATIVE_UNINT32); Datatype dtype = new Datatype(user_type);will construct a datatype equivalent to new Datatype(CLASS_INTEGER, 4, NATIVE, SIGN_NONE);
type
- the identifier of user defined datatype.fromNative(int nativeID)
Method Detail |
public int getDatatypeClass()
public int getDatatypeSize()
public int getDatatypeOrder()
public int getDatatypeSign()
public abstract int toNative()
For example, a HDF5 datatype created from
H5Dataype dtype = new H5Datatype(CLASS_INTEGER, 4, NATIVE, SIGN_NONE); int type = dtype.toNative();here "type" will be the HDF5 datatype id of a 32-bit unsigned integer, which is equivalent to
int type = H5.J2C( HDF5CDataTypes.JH5T_NATIVE_UNINT32);
public abstract void fromNative(int nativeID)
For example, if the type identifier is a 32-bit unsigned integer created from HDF5,
int user_type = H5.J2C( HDF5CDataTypes.JH5T_NATIVE_UNINT32); Datatype dtype = new Datatype(user_type);will construct a datatype equivalent to new Datatype(CLASS_INTEGER, 4, NATIVE, SIGN_NONE);
nativeID
- the identifier of user defined datatype.public java.lang.String getDatatypeDescription()
public abstract boolean isUnsigned()
public int open()
HObject
Sub-classes have to implement this interface so that different data objects have their own ways of how the data resources are opened.
open
in class HObject
public void close(int id)
HObject
close
in class HObject
id
- the object identifier.
Sub-classes have to implement this interface so that different data
objects have their own ways of how the data resources are closed.public java.util.List getMetadata() throws java.lang.Exception
DataFormat
java.lang.Exception
List
public void writeMetadata(java.lang.Object info) throws java.lang.Exception
DataFormat
info
- the specific metadata.
java.lang.Exception
public void removeMetadata(java.lang.Object info) throws java.lang.Exception
DataFormat
info
- the metadata to delete.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |