Public Member Functions | |
NexusFile (String filename, int access) throws NexusException | |
constructs a new NexusFile Object. | |
void | flush () throws NexusException |
flushes all pending data to disk. | |
void | close () throws NexusException |
close the NeXus file. | |
void | finalize () throws Throwable |
removes all NeXus file data structures and closes the file. | |
void | makegroup (String name, String nxclass) throws NexusException |
makegroup creates a new group below the current group within the NeXus file hierarchy. | |
void | opengroup (String name, String nxclass) throws NexusException |
opengroup opens the group name with class nxclass. | |
void | openpath (String path) throws NexusException |
openpath opens groups and datsets accroding to the path string given. | |
void | opengrouppath (String path) throws NexusException |
opengrouppath opens groups and datsets accroding to the path string given. | |
String | getpath () throws NexusException |
return the current path into the NeXus file in the form of a Unix path string. | |
void | closegroup () throws NexusException |
closegroup closes access to the current group and steps down one step in group hierarchy. | |
void | compmakedata (String name, int type, int rank, int dim[], int compression_type, int iChunk[]) throws NexusException |
compmakedata creates a new dataset with the specified characteristics in the current group. | |
void | compmakedata (String name, int type, int rank, long dim[], int compression_type, long iChunk[]) throws NexusException |
compmakedata creates a new dataset with the specified characteristics in the current group. | |
void | makedata (String name, int type, int rank, int dim[]) throws NexusException |
makedata creates a new dataset with the specified characteristics in the current group. | |
void | makedata (String name, int type, int rank, long dim[]) throws NexusException |
makedata creates a new dataset with the specified characteristics in the current group. | |
void | opendata (String name) throws NexusException |
opendata opens an existing dataset for access. | |
void | closedata () throws NexusException |
closedata closes an opened dataset. | |
void | compress (int compression_type) throws NexusException |
causes the currently open dataset to be compressed on file. | |
void | getdata (Object array) throws NexusException |
getdata reads the data from an previously openend dataset into array. | |
void | getslab (int start[], int size[], Object array) throws NexusException |
getslab reads a subset of a large dataset into array. | |
void | getslab (long start[], long size[], Object array) throws NexusException |
getslab reads a subset of a large dataset into array. | |
void | getattr (String name, Object array, int args[]) throws NexusException |
getattr retrieves the data associated with the attribute name. | |
void | putdata (Object array) throws NexusException |
putdata writes the data from array into a previously opened dataset. | |
void | putslab (Object array, int start[], int size[]) throws NexusException |
putslab writes a subset of a larger dataset to a previously opened dataset. | |
void | putslab (Object array, long start[], long size[]) throws NexusException |
putslab writes a subset of a larger dataset to a previously opened dataset. | |
void | putattr (String name, Object array, int iType) throws NexusException |
putattr adds a named attribute to a previously opened dataset or a global attribute if no dataset is open. | |
void | setnumberformat (int type, String format) throws NexusException |
setnumberformat sets the number format for printing number when using the XML-NeXus format. | |
void | getinfo (int iDim[], int args[]) throws NexusException |
getinfo retrieves information about a previously opened dataset. | |
void | getinfo (long iDim[], int args[]) throws NexusException |
getinfo retrieves information about a previously opened dataset. | |
Hashtable | groupdir () throws NexusException |
groupdir will retrieve the content of the currently open vGroup. | |
Hashtable | attrdir () throws NexusException |
attrdir returns the attributes of the currently open dataset or the file global attributes if no dataset is open. | |
NXlink | getgroupID () throws NexusException |
getgroupID gets the data necessary for linking the current vGroup somewhere else. | |
NXlink | getdataID () throws NexusException |
getdataID gets the data necessary for linking the current dataset somewhere else. | |
void | makelink (NXlink target) throws NexusException |
makelink links the object described by target into the current vGroup. | |
void | makenamedlink (String name, NXlink target) throws NexusException |
makenamedlink links the object described by target into the current vGroup. | |
void | opensourcepath () throws NexusException |
opensourcepath opens the group from which the current item was linked Returns an error if the current item is not linked. | |
String | inquirefile () throws NexusException |
inquirefile inquires which file we are currently in. | |
void | linkexternal (String name, String nxclass, String nxurl) throws NexusException |
linkexternal links group name, nxclass to the URL nxurl | |
void | linkexternaldataset (String name, String nxurl) throws NexusException |
linkexternaldataset links dataset name to the URL nxurl | |
String | isexternalgroup (String name, String nxclass) throws NexusException |
nxisexternalgroup test the group name, nxclass if it is linked externally | |
String | isexternaldataset (String name) throws NexusException |
nxisexternaldataset if the named dataset is is linked externally | |
native void | debugstop () |
debugstop is a debugging helper function which goes into an endless loop in the dynamic link library. |
Static Public Attributes | |
static final int | NXACC_READ = 1 |
possible access codes, | |
static final int | NXACC_RDWR = 2 |
static final int | NXACC_CREATE = 3 |
static final int | NXACC_CREATE4 = 4 |
static final int | NXACC_CREATE5 = 5 |
static final int | NXACC_CREATEXML = 6 |
static final int | NXACC_NOSTRIP = 128 |
static final int | NX_UNLIMITED = -1 |
constant denoting an unlimited dimension. | |
static final int | NX_FLOAT32 = 5 |
constants for number types. | |
static final int | NX_FLOAT64 = 6 |
static final int | NX_INT8 = 20 |
static final int | NX_BINARY = 20 |
static final int | NX_UINT8 = 21 |
static final int | NX_BOOLEAN = 21 |
static final int | NX_INT16 = 22 |
static final int | NX_UINT16 = 23 |
static final int | NX_INT32 = 24 |
static final int | NX_UINT32 = 25 |
static final int | NX_INT64 = 26 |
static final int | NX_UINT64 = 27 |
static final int | NX_CHAR = 4 |
static final int | NX_COMP_NONE = 100 |
constants for compression schemes | |
static final int | NX_COMP_LZW = 200 |
static final int | NX_COMP_RLE = 300 |
static final int | NX_COMP_HUF = 400 |
Protected Member Functions | |
native int | init (String filename, int access) |
native void | close (int handle) |
native int | nxflush (int handle) |
native void | nxmakegroup (int handle, String name, String nxclass) |
native void | nxopengroup (int handle, String name, String nxclass) |
native void | nxopenpath (int handle, String path) |
native void | nxopengrouppath (int handle, String path) |
native void | nxclosegroup (int handle) |
native String | nxgetpath (int handle) |
native void | nxmakedata (int handle, String name, int type, int rank, int dim[]) |
native void | nxmakedata64 (int handle, String name, int type, int rank, long dim[]) |
native void | nxmakecompdata (int handle, String name, int type, int rank, int dim[], int iCompress, int iChunk[]) |
native void | nxmakecompdata64 (int handle, String name, int type, int rank, long dim[], int iCompress, long iChunk[]) |
native void | nxopendata (int handle, String name) |
native void | nxclosedata (int handle) |
native void | nxcompress (int handle, int compression_type) |
native void | nxgetdata (int handle, byte bdata[]) |
native void | nxgetslab (int handle, int Start[], int size[], byte bdata[]) |
native void | nxgetslab64 (int handle, long Start[], long size[], byte bdata[]) |
native void | nxgetattr (int handle, String name, byte bdata[], int args[]) |
native void | nxputdata (int handle, byte array[]) |
native void | nxputslab (int handle, byte array[], int start[], int size[]) |
native void | nxputslab64 (int handle, byte array[], long start[], long size[]) |
native void | nxputattr (int handle, String name, byte array[], int type) |
native void | nxgetinfo (int handle, int iDim[], int args[]) |
native void | nxgetinfo64 (int handle, long iDim[], int args[]) |
native void | nxsetnumberformat (int handle, int type, String format) |
native int | nextentry (int handle, String names[]) |
native int | nextattr (int handle, String names[], int args[]) |
native void | initattrdir (int handle) |
native void | initgroupdir (int handle) |
native void | nxgetgroupid (int handle, NXlink link) |
native void | nxgetdataid (int handle, NXlink link) |
native void | nxmakelink (int handle, NXlink target) |
native void | nxmakenamedlink (int handle, String name, NXlink target) |
native void | nxopensourcepath (int handle) |
native void | nxinquirefile (int handle, String names[]) |
native void | nxlinkexternal (int handle, String name, String nxclass, String nxurl) |
native void | nxlinkexternaldataset (int handle, String name, String nxurl) |
native int | nxisexternalgroup (int handle, String name, String nxclass, String nxurl[]) |
native int | nxisexternaldataset (int handle, String name, String nxurl[]) |
Protected Attributes | |
int | handle |
This is the handle to the NeXus file handle. |
Static Protected Attributes | |
static final int | MAXNAMELEN = 64 |
Maximum name length, must be VGNAMELENMAX in hlimits.h. |
Definition at line 24 of file NexusFile.java.
org.nexusformat.NexusFile.NexusFile | ( | String | filename, |
int | access | ||
) | throws NexusException |
constructs a new NexusFile Object.
filename | The name of the NeXus file to access. |
access | The access mode for the file. Can only be one of the predefined NeXus access code NXACC.... These are:
|
NexusException | when the file could not be found or an HDF error occurred. |
Definition at line 130 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.init().
Hashtable org.nexusformat.NexusFile.attrdir | ( | ) | throws NexusException |
attrdir returns the attributes of the currently open dataset or the file global attributes if no dataset is open.
NexusException | when an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 485 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, org.nexusformat.NexusFile.initattrdir(), org.nexusformat.AttributeEntry.length, and org.nexusformat.NexusFile.nextattr().
|
protected |
void org.nexusformat.NexusFile.close | ( | ) | throws NexusException |
close the NeXus file.
To make javalint and diamond happy
NexusException |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 151 of file NexusFile.java.
References org.nexusformat.NexusFile.handle.
Referenced by org.nexusformat.NexusFile.finalize().
void org.nexusformat.NexusFile.closedata | ( | ) | throws NexusException |
closedata closes an opened dataset.
Then no further access is possible without a call to opendata.
NexusException | when an HDF error occurrs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 284 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxclosedata().
void org.nexusformat.NexusFile.closegroup | ( | ) | throws NexusException |
closegroup closes access to the current group and steps down one step in group hierarchy.
NexusException | when an HDF error occurs during this operation. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 211 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxclosegroup().
void org.nexusformat.NexusFile.compmakedata | ( | String | name, |
int | type, | ||
int | rank, | ||
int | dim[], | ||
int | compression_type, | ||
int | iChunk[] | ||
) | throws NexusException |
compmakedata creates a new dataset with the specified characteristics in the current group.
This data set will be compressed.
name | The name of the dataset. |
type | The number type of the dataset. Usually a constant from a selection of values. |
rank | The rank or number of dimensions of the dataset. |
dim | An array containing the length of each dimension. dim must have at least rank entries. Dimension passed as -1 denote an unlimited dimension. |
compression_type | determines the compression type. |
iChunk | With HDF-5, slabs can be written to compressed data sets. The size of these slabs is specified through the chunk array. This must have the rank values for the size of the chunk to be written in each dimension. |
NexusException | when the dataset could not be created. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 226 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, org.nexusformat.NexusFile.NX_COMP_LZW, org.nexusformat.NexusFile.NX_COMP_NONE, and org.nexusformat.NexusFile.nxmakecompdata().
void org.nexusformat.NexusFile.compmakedata | ( | String | name, |
int | type, | ||
int | rank, | ||
long | dim[], | ||
int | compression_type, | ||
long | iChunk[] | ||
) | throws NexusException |
compmakedata creates a new dataset with the specified characteristics in the current group.
This data set will be compressed.
name | The name of the dataset. |
type | The number type of the dataset. Usually a constant from a selection of values. |
rank | The rank or number of dimensions of the dataset. |
dim | An array containing the length of each dimension. dim must have at least rank entries. Dimension passed as -1 denote an unlimited dimension. |
compression_type | determines the compression type. |
iChunk | With HDF-5, slabs can be written to compressed data sets. The size of these slabs is specified through the chunk array. This must have the rank values for the size of the chunk to be written in each dimension. |
NexusException | when the dataset could not be created. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 243 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, org.nexusformat.NexusFile.NX_COMP_LZW, org.nexusformat.NexusFile.NX_COMP_NONE, and org.nexusformat.NexusFile.nxmakecompdata64().
void org.nexusformat.NexusFile.compress | ( | int | compression_type | ) | throws NexusException |
causes the currently open dataset to be compressed on file.
This must be called after makedata and before writing to the dataset.
compression_type | determines the type of compression to use. |
NexusException | when no dataset is open or an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 289 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, org.nexusformat.NexusFile.NX_COMP_HUF, org.nexusformat.NexusFile.NX_COMP_LZW, org.nexusformat.NexusFile.NX_COMP_NONE, org.nexusformat.NexusFile.NX_COMP_RLE, and org.nexusformat.NexusFile.nxcompress().
native void org.nexusformat.NexusFile.debugstop | ( | ) |
debugstop is a debugging helper function which goes into an endless loop in the dynamic link library.
Then a unix debugger may attach to the running java process using the pid, interrupt, set the loop variable to leave the loop, set a new breakpoint and continue debugging. This works with ladebug on DU40D. This is an developer support routine and should NEVER be called in normal code.
void org.nexusformat.NexusFile.finalize | ( | ) | throws Throwable |
removes all NeXus file data structures and closes the file.
This function should automatically be called by the Java garbage collector whenever the NexusFile object falls into disuse. However the time when this is done is left to the garbage collector. My personal experience is that finalize might never be called. I suggest, to call finalize yourself when you are done with the NeXus file. finalize makes sure that multiple invocations will not do any harm.
Implements org.nexusformat.NeXusFileInterface.
Definition at line 168 of file NexusFile.java.
References org.nexusformat.NexusFile.close().
void org.nexusformat.NexusFile.flush | ( | ) | throws NexusException |
flushes all pending data to disk.
Closes any open SDS's.
Implements org.nexusformat.NeXusFileInterface.
Definition at line 142 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxflush().
void org.nexusformat.NexusFile.getattr | ( | String | name, |
Object | data, | ||
int | args[] | ||
) | throws NexusException |
getattr retrieves the data associated with the attribute name.
name | The name of the attribute. |
data | an array with sufficient space for holding the attribute data. |
args | An integer array holding the number of data elements in data as args[0], and the type as args[1]. Both values will be updated while reading. |
NexusException | when either an HDF error occurs or the attribute could not be found. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 355 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.arrayify(), ncsa.hdf.hdflib.HDFArray.emptyBytes(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetattr().
void org.nexusformat.NexusFile.getdata | ( | Object | array | ) | throws NexusException |
getdata reads the data from an previously openend dataset into array.
array | An n-dimensional array of the appropriate number type for the dataset. Make sure to have the right type and size here. |
NexusException | when either an HDF error occurs or no dataset is open or array is not of the right type to hold the data. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 311 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.arrayify(), ncsa.hdf.hdflib.HDFArray.emptyBytes(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetdata().
NXlink org.nexusformat.NexusFile.getdataID | ( | ) | throws NexusException |
getdataID gets the data necessary for linking the current dataset somewhere else.
NexusException | if an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 518 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetdataid().
NXlink org.nexusformat.NexusFile.getgroupID | ( | ) | throws NexusException |
getgroupID gets the data necessary for linking the current vGroup somewhere else.
NexusException | if an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 511 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetgroupid().
void org.nexusformat.NexusFile.getinfo | ( | int | iDim[], |
int | args[] | ||
) | throws NexusException |
getinfo retrieves information about a previously opened dataset.
iDim | An array which will be filled with the size of the dataset in each dimension. |
args | An integer array which will hold more information about the dataset after return. The fields: args[0] is the rank, args[1] is the number type. |
NexusException | when an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 463 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetinfo().
void org.nexusformat.NexusFile.getinfo | ( | long | iDim[], |
int | args[] | ||
) | throws NexusException |
getinfo retrieves information about a previously opened dataset.
iDim | An array which will be filled with the size of the dataset in each dimension. |
args | An integer array which will hold more information about the dataset after return. The fields: args[0] is the rank, args[1] is the number type. |
NexusException | when an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 468 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetinfo64().
String org.nexusformat.NexusFile.getpath | ( | ) | throws NexusException |
return the current path into the NeXus file in the form of a Unix path string.
Implements org.nexusformat.NeXusFileInterface.
Definition at line 206 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetpath().
void org.nexusformat.NexusFile.getslab | ( | int | start[], |
int | size[], | ||
Object | array | ||
) | throws NexusException |
getslab reads a subset of a large dataset into array.
start | An array of dimension rank which contains the start position in the dataset from where to start reading. |
size | An array of dimension rank which contains the size in each dimension of the data subset to read. |
array | An array for holding the returned data values. |
NexusException | when either an HDF error occurs or no dataset is open or array is not of the right type to hold the data. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 325 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.arrayify(), ncsa.hdf.hdflib.HDFArray.emptyBytes(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetslab().
void org.nexusformat.NexusFile.getslab | ( | long | start[], |
long | size[], | ||
Object | array | ||
) | throws NexusException |
getslab reads a subset of a large dataset into array.
start | An array of dimension rank which contains the start position in the dataset from where to start reading. |
size | An array of dimension rank which contains the size in each dimension of the data subset to read. |
array | An array for holding the returned data values. |
NexusException | when either an HDF error occurs or no dataset is open or array is not of the right type to hold the data. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 340 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.arrayify(), ncsa.hdf.hdflib.HDFArray.emptyBytes(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxgetslab64().
Hashtable org.nexusformat.NexusFile.groupdir | ( | ) | throws NexusException |
groupdir will retrieve the content of the currently open vGroup.
groupdir is similar to an ls in unix.
NexusException | if an HDF error occurs |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 473 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, org.nexusformat.NexusFile.initgroupdir(), and org.nexusformat.NexusFile.nextentry().
|
protected |
Referenced by org.nexusformat.NexusFile.NexusFile().
|
protected |
Referenced by org.nexusformat.NexusFile.attrdir().
|
protected |
Referenced by org.nexusformat.NexusFile.groupdir().
String org.nexusformat.NexusFile.inquirefile | ( | ) | throws NexusException |
inquirefile inquires which file we are currently in.
This is a support function for external linking
NexusException | when things are wrong |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 614 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxinquirefile().
String org.nexusformat.NexusFile.isexternaldataset | ( | String | name | ) | throws NexusException |
nxisexternaldataset if the named dataset is is linked externally
name | of the dataset to test |
NexusException | if things are wrong |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 646 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxisexternaldataset().
String org.nexusformat.NexusFile.isexternalgroup | ( | String | name, |
String | nxclass | ||
) | throws NexusException |
nxisexternalgroup test the group name, nxclass if it is linked externally
name | of the group to test |
nxclass | class of the group to test |
NexusException | if things are wrong |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 633 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxisexternalgroup().
void org.nexusformat.NexusFile.linkexternal | ( | String | name, |
String | nxclass, | ||
String | nxurl | ||
) | throws NexusException |
linkexternal links group name, nxclass to the URL nxurl
name | The name of the vgroup to link to |
nxclass | The class name of the linked vgroup |
nxurl | The URL to the linked external file |
NexusException | if things are wrong |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 621 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxlinkexternal().
void org.nexusformat.NexusFile.linkexternaldataset | ( | String | name, |
String | nxurl | ||
) | throws NexusException |
linkexternaldataset links dataset name to the URL nxurl
name | The name of the dataset to link to |
nxurl | The URL to the linked external file |
NexusException | if things are wrong |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 627 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxlinkexternaldataset().
void org.nexusformat.NexusFile.makedata | ( | String | name, |
int | type, | ||
int | rank, | ||
int | dim[] | ||
) | throws NexusException |
makedata creates a new dataset with the specified characteristics in the current group.
name | The name of the dataset. |
type | The number type of the dataset. Usually a constant from a selection of values. |
rank | The rank or number of dimensions of the dataset. |
dim | An array containing the length of each dimension. dim must have at least rank entries. Dimension passed as -1 denote an unlimited dimension. |
NexusException | when the dataset could not be created. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 260 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxmakedata().
void org.nexusformat.NexusFile.makedata | ( | String | name, |
int | type, | ||
int | rank, | ||
long | dim[] | ||
) | throws NexusException |
makedata creates a new dataset with the specified characteristics in the current group.
name | The name of the dataset. |
type | The number type of the dataset. Usually a constant from a selection of values. |
rank | The rank or number of dimensions of the dataset. |
dim | An array containing the length of each dimension. dim must have at least rank entries. Dimension passed as -1 denote an unlimited dimension. |
NexusException | when the dataset could not be created. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 269 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxmakedata64().
void org.nexusformat.NexusFile.makegroup | ( | String | name, |
String | nxclass | ||
) | throws NexusException |
makegroup creates a new group below the current group within the NeXus file hierarchy.
name | The name of the group to create. |
nxclass | The classname of the group. |
NexusException | if an error occurs during this operation. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 182 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxmakegroup().
void org.nexusformat.NexusFile.makelink | ( | NXlink | target | ) | throws NexusException |
makelink links the object described by target into the current vGroup.
target | The Object to link into the current group. |
NexusException | if an error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 525 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxmakelink().
void org.nexusformat.NexusFile.makenamedlink | ( | String | name, |
NXlink | target | ||
) | throws NexusException |
makenamedlink links the object described by target into the current vGroup.
The object will have a new name in the group into which it is linked
target | The Object to link into the current group. |
name | The name of this object in the current group |
NexusException | if an error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 531 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxmakenamedlink().
|
protected |
Referenced by org.nexusformat.NexusFile.attrdir().
|
protected |
Referenced by org.nexusformat.NexusFile.groupdir().
|
protected |
Referenced by org.nexusformat.NexusFile.closedata().
|
protected |
Referenced by org.nexusformat.NexusFile.closegroup().
|
protected |
Referenced by org.nexusformat.NexusFile.compress().
|
protected |
Referenced by org.nexusformat.NexusFile.flush().
|
protected |
Referenced by org.nexusformat.NexusFile.getattr().
|
protected |
Referenced by org.nexusformat.NexusFile.getdata().
|
protected |
Referenced by org.nexusformat.NexusFile.getdataID().
|
protected |
Referenced by org.nexusformat.NexusFile.getgroupID().
|
protected |
Referenced by org.nexusformat.NexusFile.getinfo().
|
protected |
Referenced by org.nexusformat.NexusFile.getinfo().
|
protected |
Referenced by org.nexusformat.NexusFile.getpath().
|
protected |
Referenced by org.nexusformat.NexusFile.getslab().
|
protected |
Referenced by org.nexusformat.NexusFile.getslab().
|
protected |
Referenced by org.nexusformat.NexusFile.inquirefile().
|
protected |
Referenced by org.nexusformat.NexusFile.isexternaldataset().
|
protected |
Referenced by org.nexusformat.NexusFile.isexternalgroup().
|
protected |
Referenced by org.nexusformat.NexusFile.linkexternal().
|
protected |
Referenced by org.nexusformat.NexusFile.linkexternaldataset().
|
protected |
Referenced by org.nexusformat.NexusFile.compmakedata().
|
protected |
Referenced by org.nexusformat.NexusFile.compmakedata().
|
protected |
Referenced by org.nexusformat.NexusFile.makedata().
|
protected |
Referenced by org.nexusformat.NexusFile.makedata().
|
protected |
Referenced by org.nexusformat.NexusFile.makegroup().
|
protected |
Referenced by org.nexusformat.NexusFile.makelink().
|
protected |
Referenced by org.nexusformat.NexusFile.makenamedlink().
|
protected |
Referenced by org.nexusformat.NexusFile.opendata().
|
protected |
Referenced by org.nexusformat.NexusFile.opengroup().
|
protected |
Referenced by org.nexusformat.NexusFile.opengrouppath().
|
protected |
Referenced by org.nexusformat.NexusFile.openpath().
|
protected |
Referenced by org.nexusformat.NexusFile.opensourcepath().
|
protected |
Referenced by org.nexusformat.NexusFile.putattr().
|
protected |
Referenced by org.nexusformat.NexusFile.putdata().
|
protected |
Referenced by org.nexusformat.NexusFile.putslab().
|
protected |
Referenced by org.nexusformat.NexusFile.putslab().
|
protected |
Referenced by org.nexusformat.NexusFile.setnumberformat().
void org.nexusformat.NexusFile.opendata | ( | String | name | ) | throws NexusException |
opendata opens an existing dataset for access.
For instance for reading or writing.
name | The name of the dataset to open. |
NexusException | when the dataset does not exist or something else is wrong. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 278 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxopendata().
void org.nexusformat.NexusFile.opengroup | ( | String | name, |
String | nxclass | ||
) | throws NexusException |
opengroup opens the group name with class nxclass.
The group must exist, otherwise an exception is thrown. opengroup is similar to a cd name in a filesystem.
name | the name of the group to open. |
nxclass | the classname of the group to open. |
NexusException | when something goes wrong. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 188 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxopengroup().
void org.nexusformat.NexusFile.opengrouppath | ( | String | path | ) | throws NexusException |
opengrouppath opens groups and datsets accroding to the path string given.
The path syntax follows unix conventions. Both absolute and relative paths are possible. All objects of the path must exist. This function stops int the last group.
path | The path string |
NexusException | when something goes wrong. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 200 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxopengrouppath().
void org.nexusformat.NexusFile.openpath | ( | String | path | ) | throws NexusException |
openpath opens groups and datsets accroding to the path string given.
The path syntax follows unix conventions. Both absolute and relative paths are possible. All objects of the path must exist.
path | The path string |
NexusException | when something goes wrong. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 194 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxopenpath().
void org.nexusformat.NexusFile.opensourcepath | ( | ) | throws NexusException |
opensourcepath opens the group from which the current item was linked Returns an error if the current item is not linked.
NexusException | if an error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 537 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxopensourcepath().
void org.nexusformat.NexusFile.putattr | ( | String | name, |
Object | array, | ||
int | iType | ||
) | throws NexusException |
putattr adds a named attribute to a previously opened dataset or a global attribute if no dataset is open.
name | The name of the attribute. |
array | The data of the attribute. |
iType | The number type of the attribute. |
NexusException | if an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 428 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.byteify(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxputattr().
void org.nexusformat.NexusFile.putdata | ( | Object | array | ) | throws NexusException |
putdata writes the data from array into a previously opened dataset.
array | The data to write. |
NexusException | when an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 377 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.byteify(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxputdata().
void org.nexusformat.NexusFile.putslab | ( | Object | array, |
int | start[], | ||
int | size[] | ||
) | throws NexusException |
putslab writes a subset of a larger dataset to a previously opened dataset.
array | The data to write. |
start | An integer array of dimension rank which holds the startcoordinates of the data subset in the larger dataset. |
size | An integer array of dimension rank whidh holds the size in each dimension of the data subset to write. |
NexusException | when an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 394 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.byteify(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxputslab().
void org.nexusformat.NexusFile.putslab | ( | Object | array, |
long | start[], | ||
long | size[] | ||
) | throws NexusException |
putslab writes a subset of a larger dataset to a previously opened dataset.
array | The data to write. |
start | An integer array of dimension rank which holds the startcoordinates of the data subset in the larger dataset. |
size | An integer array of dimension rank whidh holds the size in each dimension of the data subset to write. |
NexusException | when an HDF error occurs. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 411 of file NexusFile.java.
References ncsa.hdf.hdflib.HDFArray.byteify(), ncsa.hdf.hdflib.HDFException.getMessage(), org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxputslab64().
void org.nexusformat.NexusFile.setnumberformat | ( | int | type, |
String | format | ||
) | throws NexusException |
setnumberformat sets the number format for printing number when using the XML-NeXus format.
For HDF4 and HDF5 this is ignored. If a dataset is open, the format for the dataset is set, if none is open the default setting for the number type is changed. The format must be a ANSII-C language format string.
type | The NeXus type to set the format for. |
format | The new format to use. |
Implements org.nexusformat.NeXusFileInterface.
Definition at line 456 of file NexusFile.java.
References org.nexusformat.NexusFile.handle, and org.nexusformat.NexusFile.nxsetnumberformat().
|
protected |
This is the handle to the NeXus file handle.
Definition at line 103 of file NexusFile.java.
Referenced by org.nexusformat.NexusFile.attrdir(), org.nexusformat.NexusFile.close(), org.nexusformat.NexusFile.closedata(), org.nexusformat.NexusFile.closegroup(), org.nexusformat.NexusFile.compmakedata(), org.nexusformat.NexusFile.compress(), org.nexusformat.NexusFile.flush(), org.nexusformat.NexusFile.getattr(), org.nexusformat.NexusFile.getdata(), org.nexusformat.NexusFile.getdataID(), org.nexusformat.NexusFile.getgroupID(), org.nexusformat.NexusFile.getinfo(), org.nexusformat.NexusFile.getpath(), org.nexusformat.NexusFile.getslab(), org.nexusformat.NexusFile.groupdir(), org.nexusformat.NexusFile.inquirefile(), org.nexusformat.NexusFile.isexternaldataset(), org.nexusformat.NexusFile.isexternalgroup(), org.nexusformat.NexusFile.linkexternal(), org.nexusformat.NexusFile.linkexternaldataset(), org.nexusformat.NexusFile.makedata(), org.nexusformat.NexusFile.makegroup(), org.nexusformat.NexusFile.makelink(), org.nexusformat.NexusFile.makenamedlink(), org.nexusformat.NexusFile.NexusFile(), org.nexusformat.NexusFile.opendata(), org.nexusformat.NexusFile.opengroup(), org.nexusformat.NexusFile.opengrouppath(), org.nexusformat.NexusFile.openpath(), org.nexusformat.NexusFile.opensourcepath(), org.nexusformat.NexusFile.putattr(), org.nexusformat.NexusFile.putdata(), org.nexusformat.NexusFile.putslab(), and org.nexusformat.NexusFile.setnumberformat().
|
staticprotected |
Maximum name length, must be VGNAMELENMAX in hlimits.h.
Definition at line 72 of file NexusFile.java.
|
static |
Definition at line 50 of file NexusFile.java.
|
static |
Definition at line 52 of file NexusFile.java.
|
static |
Definition at line 59 of file NexusFile.java.
|
static |
Definition at line 67 of file NexusFile.java.
Referenced by org.nexusformat.NexusFile.compress().
|
static |
Definition at line 65 of file NexusFile.java.
Referenced by org.nexusformat.NexusFile.compmakedata(), and org.nexusformat.NexusFile.compress().
|
static |
constants for compression schemes
Definition at line 64 of file NexusFile.java.
Referenced by org.nexusformat.NexusFile.compmakedata(), and org.nexusformat.NexusFile.compress().
|
static |
Definition at line 66 of file NexusFile.java.
Referenced by org.nexusformat.NexusFile.compress().
|
static |
constants for number types.
Definition at line 47 of file NexusFile.java.
|
static |
Definition at line 48 of file NexusFile.java.
|
static |
Definition at line 53 of file NexusFile.java.
|
static |
Definition at line 55 of file NexusFile.java.
|
static |
Definition at line 57 of file NexusFile.java.
|
static |
Definition at line 49 of file NexusFile.java.
|
static |
Definition at line 54 of file NexusFile.java.
|
static |
Definition at line 56 of file NexusFile.java.
|
static |
Definition at line 58 of file NexusFile.java.
|
static |
Definition at line 51 of file NexusFile.java.
|
static |
constant denoting an unlimited dimension.
Definition at line 41 of file NexusFile.java.
|
static |
Definition at line 32 of file NexusFile.java.
|
static |
Definition at line 33 of file NexusFile.java.
|
static |
Definition at line 34 of file NexusFile.java.
|
static |
Definition at line 35 of file NexusFile.java.
|
static |
Definition at line 36 of file NexusFile.java.
|
static |
Definition at line 31 of file NexusFile.java.
|
static |