NeXusJavaBindings  1
NeXusFileInterface.java
Go to the documentation of this file.
1 
17 package org.nexusformat;
18 
19 import java.util.Hashtable;
20 
21 public interface NeXusFileInterface {
22 
23  // general functions
29  public void flush() throws NexusException;
30 
40  public void finalize() throws Throwable;
41 
46  public void close() throws NexusException;
47 
48  // group functions
56  public void makegroup(String name, String nxclass) throws
57  NexusException;
66  public void opengroup(String name, String nxclass) throws
67  NexusException;
76  public void openpath(String path) throws NexusException;
77 
86  public void opengrouppath(String path) throws NexusException;
87 
93  public String getpath() throws NexusException;
94 
101  public void closegroup() throws NexusException;
102 
103  // data set handling
116  public void makedata(String name, int type, int rank, int dim[])
117  throws NexusException;
118 
131  public void makedata(String name, int type, int rank, long dim[])
132  throws NexusException;
133 
151  public void compmakedata(String name, int type, int rank, int dim[],
152  int compression_type, int iChunk[]) throws NexusException;
153 
171  public void compmakedata(String name, int type, int rank, long dim[],
172  int compression_type, long iChunk[]) throws NexusException;
173 
181  public void opendata(String name)throws NexusException;
182 
188  public void closedata() throws NexusException;
189 
199  public void compress(int compression_type) throws NexusException;
200 
201  // data set reading
212  public void getdata(Object array) throws NexusException;
213 
225  public void getslab(int start[], int size[], Object array) throws
226  NexusException;
227 
239  public void getslab(long start[], long size[], Object array) throws
240  NexusException;
241 
254  public void getattr(String name, Object data, int args[]) throws
255  NexusException;
256 
257  // data set writing
264  public void putdata(Object array) throws NexusException;
265 
276  public void putslab(Object array, int start[], int size[]) throws
277  NexusException;
278 
289  public void putslab(Object array, long start[], long size[]) throws
290  NexusException;
291 
300  public void putattr(String name, Object array, int iType) throws
301  NexusException;
302 
303  // inquiry
313  public void getinfo(int iDim[], int args[]) throws NexusException;
314 
324  public void getinfo(long iDim[], int args[]) throws NexusException;
325 
335  public void setnumberformat(int type, String format) throws NexusException;
336 
345  public Hashtable groupdir() throws NexusException;
346 
354  public Hashtable attrdir() throws NexusException;
355 
356  // linking
363  public NXlink getgroupID() throws NexusException;
364 
371  public NXlink getdataID()throws NexusException;
372 
379  public void makelink(NXlink target)throws NexusException;
388  public void makenamedlink(String name, NXlink target) throws NexusException;
389 
395  public void opensourcepath() throws NexusException;
396 
403  public String inquirefile() throws NexusException;
404 
412  public void linkexternal(String name, String nxclass, String nxurl) throws NexusException;
413 
420  public void linkexternaldataset(String name, String nxurl) throws NexusException;
421 
430  public String isexternalgroup(String name, String nxclass) throws NexusException;
431 
439  public String isexternaldataset(String name) throws NexusException;
440 }
void getdata(Object array)
getdata reads the data from an previously openend dataset into array.
String getpath()
return the current path into the NeXus file in the form of a Unix path string.
void closegroup()
closegroup closes access to the current group and steps down one step in group hierarchy.
void getattr(String name, Object data, int args[])
getattr retrieves the data associated with the attribute name.
void makenamedlink(String name, NXlink target)
makenamedlink links the object described by target into the current vGroup.
void makedata(String name, int type, int rank, int dim[])
makedata creates a new dataset with the specified characteristics in the current group.
void makegroup(String name, String nxclass)
makegroup creates a new group below the current group within the NeXus file hierarchy.
void closedata()
closedata closes an opened dataset.
void openpath(String path)
openpath opens groups and datsets accroding to the path string given.
void compmakedata(String name, int type, int rank, int dim[], int compression_type, int iChunk[])
compmakedata creates a new dataset with the specified characteristics in the current group...
void putslab(Object array, int start[], int size[])
putslab writes a subset of a larger dataset to a previously opened dataset.
void setnumberformat(int type, String format)
setnumberformat sets the number format for printing number when using the XML-NeXus format...
void opengrouppath(String path)
opengrouppath opens groups and datsets accroding to the path string given.
NXlink getdataID()
getdataID gets the data necessary for linking the current dataset somewhere else. ...
void close()
close the NeXus file.
void compress(int compression_type)
causes the currently open dataset to be compressed on file.
void opendata(String name)
opendata opens an existing dataset for access.
void opensourcepath()
opensourcepath opens the group from which the current item was linked Returns an error if the current...
String inquirefile()
inquirefile inquires which file we are currently in.
void getinfo(int iDim[], int args[])
getinfo retrieves information about a previously opened dataset.
void finalize()
finalize closes the file.
String isexternalgroup(String name, String nxclass)
nxisexternalgroup test the group name, nxclass if it is linked externally
void makelink(NXlink target)
makelink links the object described by target into the current vGroup.
void linkexternaldataset(String name, String nxurl)
linkexternaldataset links dataset name to the URL nxurl
void flush()
flush writes all previously unsaved data to disk.
Hashtable attrdir()
attrdir returns the attributes of the currently open dataset or the file global attributes if no data...
void linkexternal(String name, String nxclass, String nxurl)
linkexternal links group name, nxclass to the URL nxurl
NXlink getgroupID()
getgroupID gets the data necessary for linking the current vGroup somewhere else. ...
Hashtable groupdir()
groupdir will retrieve the content of the currently open vGroup.
void getslab(int start[], int size[], Object array)
getslab reads a subset of a large dataset into array.
void putattr(String name, Object array, int iType)
putattr adds a named attribute to a previously opened dataset or a global attribute if no dataset is ...
void opengroup(String name, String nxclass)
opengroup opens the group name with class nxclass.
void putdata(Object array)
putdata writes the data from array into a previously opened dataset.
String isexternaldataset(String name)
nxisexternaldataset if the named dataset is is linked externally