Package org.nexusformat
Class NexusFile
java.lang.Object
org.nexusformat.NexusFile
- All Implemented Interfaces:
NeXusFileInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThis is the handle to the NeXus file handle.protected static final intMaximum name length, must be VGNAMELENMAX in hlimits.hstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intconstants for compression schemesstatic final intstatic final intconstants for number types.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intconstant denoting an unlimited dimension.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intpossible access codes, @see #NexusFile. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattrdir()attrdir returns the attributes of the currently open dataset or the file global attributes if no dataset is open.voidclose()close the NeXus file.protected voidclose(int handle) voidclosedata closes an opened dataset.voidclosegroup closes access to the current group and steps down one step in group hierarchy.voidcompmakedata(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.voidcompmakedata(String name, int type, int rank, long[] dim, int compression_type, long[] iChunk) compmakedata creates a new dataset with the specified characteristics in the current group.voidcompress(int compression_type) causes the currently open dataset to be compressed on file.voiddebugstop is a debugging helper function which goes into an endless loop in the dynamic link library.voidfinalize()removes all NeXus file data structures and closes the file.voidflush()flushes all pending data to disk.getattr retrieves the data associated with the attribute * name.voidgetattr retrieves the data associated with the attribute name.voidgetdata reads the data from an previously openend dataset into array.getdataID gets the data necessary for linking the current dataset somewhere else.getgroupID gets the data necessary for linking the current vGroup somewhere else.voidgetinfo(int[] iDim, int[] args) getinfo retrieves information about a previously opened dataset.voidgetinfo(long[] iDim, int[] args) getinfo retrieves information about a previously opened dataset.getpath()return the current path into the NeXus file in the form of a Unix path string.voidgetslab reads a subset of a large dataset into array.voidgetslab reads a subset of a large dataset into array.groupdir()groupdir will retrieve the content of the currently open vGroup.protected intprotected voidinitattrdir(int handle) protected voidinitgroupdir(int handle) inquirefile inquires which file we are currently in.isexternaldataset(String name) nxisexternaldataset if the named dataset is is linked externallyisexternalgroup(String name, String nxclass) nxisexternalgroup test the group name, nxclass if it is linked externallyvoidlinkexternal(String name, String nxclass, String nxurl) linkexternal links group name, nxclass to the URL nxurlvoidlinkexternaldataset(String name, String nxurl) linkexternaldataset links dataset name to the URL nxurlvoidmakedata creates a new dataset with the specified characteristics in the current group.voidmakedata creates a new dataset with the specified characteristics in the current group.voidmakegroup creates a new group below the current group within the NeXus file hierarchy.voidmakelink links the object described by target into the current vGroup.voidmakenamedlink(String name, NXlink target) makenamedlink links the object described by target into the current vGroup.protected intprotected intprotected voidnxclosedata(int handle) protected voidnxclosegroup(int handle) protected voidnxcompress(int handle, int compression_type) protected intnxflush(int handle) protected voidprotected voidnxgetattra(int handle, String name, byte[] bdata) protected voidnxgetattrainfo(int handle, String name, int[] dim, int[] args) protected voidnxgetdata(int handle, byte[] bdata) protected voidnxgetdataid(int handle, NXlink link) protected voidnxgetgroupid(int handle, NXlink link) protected voidnxgetinfo(int handle, int[] iDim, int[] args) protected voidnxgetinfo64(int handle, long[] iDim, int[] args) protected intnxgetnextattra(int handle, String[] name, int[] dim, int[] args) protected Stringnxgetpath(int handle) protected voidnxgetslab(int handle, int[] Start, int[] size, byte[] bdata) protected voidnxgetslab64(int handle, long[] Start, long[] size, byte[] bdata) protected voidnxinquirefile(int handle, String[] names) protected intnxisexternaldataset(int handle, String name, String[] nxurl) protected intnxisexternalgroup(int handle, String name, String nxclass, String[] nxurl) protected voidnxlinkexternal(int handle, String name, String nxclass, String nxurl) protected voidnxlinkexternaldataset(int handle, String name, String nxurl) protected voidnxmakecompdata(int handle, String name, int type, int rank, int[] dim, int iCompress, int[] iChunk) protected voidnxmakecompdata64(int handle, String name, int type, int rank, long[] dim, int iCompress, long[] iChunk) protected voidnxmakedata(int handle, String name, int type, int rank, int[] dim) protected voidnxmakedata64(int handle, String name, int type, int rank, long[] dim) protected voidnxmakegroup(int handle, String name, String nxclass) protected voidnxmakelink(int handle, NXlink target) protected voidnxmakenamedlink(int handle, String name, NXlink target) protected voidnxopendata(int handle, String name) protected voidnxopengroup(int handle, String name, String nxclass) protected voidnxopengrouppath(int handle, String path) protected voidnxopenpath(int handle, String path) protected voidnxopensourcepath(int handle) protected voidprotected voidnxputattra(int handle, String name, byte[] bdata, int rank, int[] dim, int iType) protected voidnxputdata(int handle, byte[] array) protected voidnxputslab(int handle, byte[] array, int[] start, int[] size) protected voidnxputslab64(int handle, byte[] array, long[] start, long[] size) protected voidnxsetnumberformat(int handle, int type, String format) voidopendata opens an existing dataset for access.voidopengroup opens the group name with class nxclass.voidopengrouppath(String path) opengrouppath opens groups and datsets accroding to the path string given.voidopenpath opens groups and datsets accroding to the path string given.voidopensourcepath opens the group from which the current item was linked Returns an error if the current item is not linked.voidputattr adds a named attribute to a previously opened dataset or group or a global attribute if nothing is open.voidputattr adds a named attribute to a previously opened dataset or group or a global attribute if nothing is open.voidputdata writes the data from array into a previously opened dataset.voidputslab writes a subset of a larger dataset to a previously opened dataset.voidputslab writes a subset of a larger dataset to a previously opened dataset.voidsetnumberformat(int type, String format) setnumberformat sets the number format for printing number when using the XML-NeXus format.
-
Field Details
-
NXACC_READ
public static final int NXACC_READpossible access codes, @see #NexusFile.- See Also:
-
NXACC_RDWR
public static final int NXACC_RDWR- See Also:
-
NXACC_CREATE
public static final int NXACC_CREATE- See Also:
-
NXACC_CREATE4
public static final int NXACC_CREATE4- See Also:
-
NXACC_CREATE5
public static final int NXACC_CREATE5- See Also:
-
NXACC_CREATEXML
public static final int NXACC_CREATEXML- See Also:
-
NXACC_NOSTRIP
public static final int NXACC_NOSTRIP- See Also:
-
NX_UNLIMITED
public static final int NX_UNLIMITEDconstant denoting an unlimited dimension.- See Also:
-
NX_FLOAT32
public static final int NX_FLOAT32constants for number types. @see #makedata, @see #putattr and others.- See Also:
-
NX_FLOAT64
public static final int NX_FLOAT64- See Also:
-
NX_INT8
public static final int NX_INT8- See Also:
-
NX_BINARY
public static final int NX_BINARY- See Also:
-
NX_UINT8
public static final int NX_UINT8- See Also:
-
NX_BOOLEAN
public static final int NX_BOOLEAN- See Also:
-
NX_INT16
public static final int NX_INT16- See Also:
-
NX_UINT16
public static final int NX_UINT16- See Also:
-
NX_INT32
public static final int NX_INT32- See Also:
-
NX_UINT32
public static final int NX_UINT32- See Also:
-
NX_INT64
public static final int NX_INT64- See Also:
-
NX_UINT64
public static final int NX_UINT64- See Also:
-
NX_CHAR
public static final int NX_CHAR- See Also:
-
NX_COMP_NONE
public static final int NX_COMP_NONEconstants for compression schemes- See Also:
-
NX_COMP_LZW
public static final int NX_COMP_LZW- See Also:
-
NX_COMP_RLE
public static final int NX_COMP_RLE- See Also:
-
NX_COMP_HUF
public static final int NX_COMP_HUF- See Also:
-
NX_COMP_LZW_LVL0
public static final int NX_COMP_LZW_LVL0- See Also:
-
NX_COMP_LZW_LVL1
public static final int NX_COMP_LZW_LVL1- See Also:
-
NX_COMP_LZW_LVL2
public static final int NX_COMP_LZW_LVL2- See Also:
-
NX_COMP_LZW_LVL3
public static final int NX_COMP_LZW_LVL3- See Also:
-
NX_COMP_LZW_LVL4
public static final int NX_COMP_LZW_LVL4- See Also:
-
NX_COMP_LZW_LVL5
public static final int NX_COMP_LZW_LVL5- See Also:
-
NX_COMP_LZW_LVL6
public static final int NX_COMP_LZW_LVL6- See Also:
-
NX_COMP_LZW_LVL7
public static final int NX_COMP_LZW_LVL7- See Also:
-
NX_COMP_LZW_LVL8
public static final int NX_COMP_LZW_LVL8- See Also:
-
NX_COMP_LZW_LVL9
public static final int NX_COMP_LZW_LVL9- See Also:
-
MAXNAMELEN
protected static final int MAXNAMELENMaximum name length, must be VGNAMELENMAX in hlimits.h- See Also:
-
handle
protected int handleThis is the handle to the NeXus file handle.
-
-
Constructor Details
-
NexusFile
constructs a new NexusFile Object.- Parameters:
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:- NXACC_CREATE
- or creating a new file.
- NXACC_RDWR
- For opening an existing file for modification or appending data.
- NXACC_READ
- For opening a file for reading.
- NXACC_NOSTRIP
- To keep leading and trailing whitespace on strings
- Throws:
NexusException- when the file could not be found or an HDF error occurred.
-
-
Method Details
-
init
-
close
protected void close(int handle) -
nxflush
protected int nxflush(int handle) -
flush
flushes all pending data to disk. Closes any open SDS's.- Specified by:
flushin interfaceNeXusFileInterface- Throws:
NexusException- if an error occurs.
-
close
close the NeXus file. To make javalint and diamond happy- Specified by:
closein interfaceNeXusFileInterface- Throws:
NexusException
-
finalize
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.- Specified by:
finalizein interfaceNeXusFileInterface- Overrides:
finalizein classObject- Throws:
Throwable- because it is required by the definition of finalize.
-
nxmakegroup
-
nxopengroup
-
nxopenpath
-
nxopengrouppath
-
nxclosegroup
protected void nxclosegroup(int handle) -
nxgetpath
-
makegroup
Description copied from interface:NeXusFileInterfacemakegroup creates a new group below the current group within the NeXus file hierarchy.- Specified by:
makegroupin interfaceNeXusFileInterface- Parameters:
name- The name of the group to create.nxclass- The classname of the group.- Throws:
NexusException- if an error occurs during this operation.
-
opengroup
Description copied from interface:NeXusFileInterfaceopengroup 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.- Specified by:
opengroupin interfaceNeXusFileInterface- Parameters:
name- the name of the group to open.nxclass- the classname of the group to open.- Throws:
NexusException- when something goes wrong.
-
openpath
Description copied from interface:NeXusFileInterfaceopenpath 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.- Specified by:
openpathin interfaceNeXusFileInterface- Parameters:
path- The path string- Throws:
NexusException- when something goes wrong.
-
opengrouppath
Description copied from interface:NeXusFileInterfaceopengrouppath 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.- Specified by:
opengrouppathin interfaceNeXusFileInterface- Parameters:
path- The path string- Throws:
NexusException- when something goes wrong.
-
getpath
Description copied from interface:NeXusFileInterfacereturn the current path into the NeXus file in the form of a Unix path string.- Specified by:
getpathin interfaceNeXusFileInterface- Returns:
- A unix path string
- Throws:
NexusException
-
closegroup
Description copied from interface:NeXusFileInterfaceclosegroup closes access to the current group and steps down one step in group hierarchy.- Specified by:
closegroupin interfaceNeXusFileInterface- Throws:
NexusException- when an error occurs during this operation.
-
nxmakedata
-
nxmakedata64
-
nxmakecompdata
protected void nxmakecompdata(int handle, String name, int type, int rank, int[] dim, int iCompress, int[] iChunk) -
nxmakecompdata64
protected void nxmakecompdata64(int handle, String name, int type, int rank, long[] dim, int iCompress, long[] iChunk) -
nxopendata
-
nxclosedata
protected void nxclosedata(int handle) -
nxcompress
protected void nxcompress(int handle, int compression_type) -
compmakedata
public void compmakedata(String name, int type, int rank, int[] dim, int compression_type, int[] iChunk) throws NexusException Description copied from interface:NeXusFileInterfacecompmakedata creates a new dataset with the specified characteristics in the current group. This data set will be compressed.- Specified by:
compmakedatain interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when the dataset could not be created.
-
compmakedata
public void compmakedata(String name, int type, int rank, long[] dim, int compression_type, long[] iChunk) throws NexusException Description copied from interface:NeXusFileInterfacecompmakedata creates a new dataset with the specified characteristics in the current group. This data set will be compressed.- Specified by:
compmakedatain interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when the dataset could not be created.
-
makedata
Description copied from interface:NeXusFileInterfacemakedata creates a new dataset with the specified characteristics in the current group.- Specified by:
makedatain interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when the dataset could not be created.
-
makedata
Description copied from interface:NeXusFileInterfacemakedata creates a new dataset with the specified characteristics in the current group.- Specified by:
makedatain interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when the dataset could not be created.
-
opendata
Description copied from interface:NeXusFileInterfaceopendata opens an existing dataset for access. For instance for reading or writing.- Specified by:
opendatain interfaceNeXusFileInterface- Parameters:
name- The name of the dataset to open.- Throws:
NexusException- when the dataset does not exist or something else is wrong.
-
closedata
Description copied from interface:NeXusFileInterfaceclosedata closes an opened dataset. Then no further access is possible without a call to opendata.- Specified by:
closedatain interfaceNeXusFileInterface- Throws:
NexusException- when an error occurrs.
-
compress
Description copied from interface:NeXusFileInterfacecauses the currently open dataset to be compressed on file. This must be called after makedata and before writing to the dataset.- Specified by:
compressin interfaceNeXusFileInterface- Parameters:
compression_type- determines the type of compression to use.- Throws:
NexusException- when no dataset is open or an error occurs.
-
nxgetdata
protected void nxgetdata(int handle, byte[] bdata) -
nxgetslab
protected void nxgetslab(int handle, int[] Start, int[] size, byte[] bdata) -
nxgetslab64
protected void nxgetslab64(int handle, long[] Start, long[] size, byte[] bdata) -
getdata
Description copied from interface:NeXusFileInterfacegetdata reads the data from an previously openend dataset into array.- Specified by:
getdatain interfaceNeXusFileInterface- Parameters:
array- An n-dimensional array of the appropriate number type for the dataset. Make sure to have the right type and size here.- Throws:
NexusException- when either an error occurs or no dataset is open or array is not of the right type to hold the data.
-
getslab
Description copied from interface:NeXusFileInterfacegetslab reads a subset of a large dataset into array.- Specified by:
getslabin interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when either an error occurs or no dataset is open or array is not of the right type to hold the data.
-
getslab
Description copied from interface:NeXusFileInterfacegetslab reads a subset of a large dataset into array.- Specified by:
getslabin interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when either an error occurs or no dataset is open or array is not of the right type to hold the data.
-
nxputdata
protected void nxputdata(int handle, byte[] array) -
nxputslab
protected void nxputslab(int handle, byte[] array, int[] start, int[] size) -
nxputslab64
protected void nxputslab64(int handle, byte[] array, long[] start, long[] size) -
putdata
Description copied from interface:NeXusFileInterfaceputdata writes the data from array into a previously opened dataset.- Specified by:
putdatain interfaceNeXusFileInterface- Parameters:
array- The data to write.- Throws:
NexusException- when an error occurs.
-
putslab
Description copied from interface:NeXusFileInterfaceputslab writes a subset of a larger dataset to a previously opened dataset.- Specified by:
putslabin interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when an error occurs.
-
putslab
Description copied from interface:NeXusFileInterfaceputslab writes a subset of a larger dataset to a previously opened dataset.- Specified by:
putslabin interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when an error occurs.
-
nxgetattr
-
nxputattr
-
nxputattra
-
nxgetnextattra
-
nxgetattra
-
nxgetattrainfo
-
nextattr
-
initattrdir
protected void initattrdir(int handle) -
initgroupdir
protected void initgroupdir(int handle) -
getattr
Description copied from interface:NeXusFileInterfacegetattr retrieves the data associated with the attribute * name.- Specified by:
getattrin interfaceNeXusFileInterface- Parameters:
name- The name of the attribute.- Returns:
- The attribute data as an array.
- Throws:
NexusException- when either an error occurs or the attribute could not be found.
-
getattr
Description copied from interface:NeXusFileInterfacegetattr retrieves the data associated with the attribute name.- Specified by:
getattrin interfaceNeXusFileInterface- Parameters:
name- The name of the attribute.array- 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.- Throws:
NexusException- when either an error occurs or the attribute could not be found.
-
putattr
Description copied from interface:NeXusFileInterfaceputattr adds a named attribute to a previously opened dataset or group or a global attribute if nothing is open.- Specified by:
putattrin interfaceNeXusFileInterface- Parameters:
name- The name of the attribute.array- The data of the attribute.iType- The number type of the attribute.- Throws:
NexusException- if an error occurs.
-
putattr
Description copied from interface:NeXusFileInterfaceputattr adds a named attribute to a previously opened dataset or group or a global attribute if nothing is open.- Specified by:
putattrin interfaceNeXusFileInterface- Parameters:
name- The name of the attribute.array- The data of the attribute.iType- The number type of the attribute.- Throws:
NexusException- if an error occurs.
-
attrdir
Description copied from interface:NeXusFileInterfaceattrdir returns the attributes of the currently open dataset or the file global attributes if no dataset is open.- Specified by:
attrdirin interfaceNeXusFileInterface- Returns:
- A Hashtable which will hold the names of the attributes as keys. For each key there is an AttributeEntry class as value.
- Throws:
NexusException- when an error occurs.
-
nxgetinfo
protected void nxgetinfo(int handle, int[] iDim, int[] args) -
nxgetinfo64
protected void nxgetinfo64(int handle, long[] iDim, int[] args) -
nxsetnumberformat
-
nextentry
-
setnumberformat
Description copied from interface:NeXusFileInterfacesetnumberformat 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.- Specified by:
setnumberformatin interfaceNeXusFileInterface- Parameters:
type- The NeXus type to set the format for.format- The new format to use.- Throws:
NexusException
-
getinfo
Description copied from interface:NeXusFileInterfacegetinfo retrieves information about a previously opened dataset.- Specified by:
getinfoin interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when an error occurs.
-
getinfo
Description copied from interface:NeXusFileInterfacegetinfo retrieves information about a previously opened dataset.- Specified by:
getinfoin interfaceNeXusFileInterface- Parameters:
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.- Throws:
NexusException- when an error occurs.
-
groupdir
Description copied from interface:NeXusFileInterfacegroupdir will retrieve the content of the currently open vGroup. groupdir is similar to an ls in unix.- Specified by:
groupdirin interfaceNeXusFileInterface- Returns:
- A Hashtable which will hold the names of the items in the group as keys and the NeXus classname for vGroups or the string 'SDS' for datasets as values.
- Throws:
NexusException- if an error occurs
-
nxgetgroupid
-
nxgetdataid
-
nxmakelink
-
nxmakenamedlink
-
nxopensourcepath
protected void nxopensourcepath(int handle) -
getgroupID
Description copied from interface:NeXusFileInterfacegetgroupID gets the data necessary for linking the current vGroup somewhere else.- Specified by:
getgroupIDin interfaceNeXusFileInterface- Returns:
- A NXlink object holding the link data.
- Throws:
NexusException- if an error occurs.
-
getdataID
Description copied from interface:NeXusFileInterfacegetdataID gets the data necessary for linking the current dataset somewhere else.- Specified by:
getdataIDin interfaceNeXusFileInterface- Returns:
- A NXlink object holding the link data.
- Throws:
NexusException- if an error occurs.
-
makelink
Description copied from interface:NeXusFileInterfacemakelink links the object described by target into the current vGroup.- Specified by:
makelinkin interfaceNeXusFileInterface- Parameters:
target- The Object to link into the current group.- Throws:
NexusException- if an error occurs.
-
makenamedlink
Description copied from interface:NeXusFileInterfacemakenamedlink 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- Specified by:
makenamedlinkin interfaceNeXusFileInterface- Parameters:
name- The name of this object in the current grouptarget- The Object to link into the current group.- Throws:
NexusException- if an error occurs.
-
opensourcepath
Description copied from interface:NeXusFileInterfaceopensourcepath opens the group from which the current item was linked Returns an error if the current item is not linked.- Specified by:
opensourcepathin interfaceNeXusFileInterface- Throws:
NexusException- if an error occurs.
-
nxinquirefile
-
nxlinkexternal
-
nxlinkexternaldataset
-
nxisexternalgroup
-
nxisexternaldataset
-
inquirefile
Description copied from interface:NeXusFileInterfaceinquirefile inquires which file we are currently in. This is a support function for external linking- Specified by:
inquirefilein interfaceNeXusFileInterface- Returns:
- The current file
- Throws:
NexusException- when things are wrong
-
linkexternal
Description copied from interface:NeXusFileInterfacelinkexternal links group name, nxclass to the URL nxurl- Specified by:
linkexternalin interfaceNeXusFileInterface- Parameters:
name- The name of the vgroup to link tonxclass- The class name of the linked vgroupnxurl- The URL to the linked external file- Throws:
NexusException- if things are wrong
-
linkexternaldataset
Description copied from interface:NeXusFileInterfacelinkexternaldataset links dataset name to the URL nxurl- Specified by:
linkexternaldatasetin interfaceNeXusFileInterface- Parameters:
name- The name of the dataset to link tonxurl- The URL to the linked external file- Throws:
NexusException- if things are wrong
-
isexternalgroup
Description copied from interface:NeXusFileInterfacenxisexternalgroup test the group name, nxclass if it is linked externally- Specified by:
isexternalgroupin interfaceNeXusFileInterface- Parameters:
name- of the group to testnxclass- class of the group to test- Returns:
- null when the group is not linked, else a string giving the URL of the linked resource
- Throws:
NexusException- if things are wrong
-
isexternaldataset
Description copied from interface:NeXusFileInterfacenxisexternaldataset if the named dataset is is linked externally- Specified by:
isexternaldatasetin interfaceNeXusFileInterface- Parameters:
name- of the dataset to test- Returns:
- null when the it is not linked, else a string giving the URL of the linked resource
- Throws:
NexusException- if things are wrong
-
debugstop
public void 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.
-