generated.docs.javadoc.org.eclipse.dawnsci.nexus.builder.data.NexusDataBuilder.html Maven / Gradle / Ivy
NexusDataBuilder (h5jan API)
org.eclipse.dawnsci.nexus.builder.data
Interface NexusDataBuilder
-
- All Known Implementing Classes:
- AbstractNexusDataBuilder, DefaultNexusDataBuilder, PredeterminedLinksApplicationDataBuilder
public interface NexusDataBuilder
Wraps a NXdataImpl
object and provides methods to configure it by adding
NexusObjectProvider
s providing the data node and axis data.
-
-
Field Summary
Fields
Modifier and Type
Field and Description
static java.lang.String
ATTR_NAME_AXES
static java.lang.String
ATTR_NAME_LONG_NAME
static java.lang.String
ATTR_NAME_SIGNAL
static java.lang.String
ATTR_NAME_TARGET
static java.lang.String
ATTR_SUFFIX_INDICES
static java.lang.String
NO_DEFAULT_AXIS_PLACEHOLDER
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
<N extends NXobject>
void
addAxisDevice(AxisDataDevice<N> dataDeviceModel)
Adds the data fields of the given device to the wrapped NXdata
group.
<N extends NXobject>
void
addAxisDevice(NexusObjectProvider<N> dataDevice)
Adds the data fields of the given device to the wrapped NXdata
group.
<N extends NXobject>
void
addAxisDevice(NexusObjectProvider<N> dataDevice,
java.lang.Integer defaultAxisDimension,
int... dimensionMappings)
Adds the data fields of the given device to the wrapped NXdata
group.
NXdata
getNxData()
Returns the wrapped NXdata
object.
<N extends NXobject>
void
setPrimaryDevice(NexusObjectProvider<N> primaryDevice)
Sets the given device as the primary device of the wrapped NXdata
group.
<N extends NXobject>
void
setPrimaryDevice(PrimaryDataDevice<N> primaryDeviceModel)
Sets the given device as the primary device of the wrapped NXdata
group.
-
-
Field Detail
-
NO_DEFAULT_AXIS_PLACEHOLDER
static final java.lang.String NO_DEFAULT_AXIS_PLACEHOLDER
- See Also:
- Constant Field Values
-
ATTR_NAME_SIGNAL
static final java.lang.String ATTR_NAME_SIGNAL
- See Also:
- Constant Field Values
-
ATTR_NAME_AXES
static final java.lang.String ATTR_NAME_AXES
- See Also:
- Constant Field Values
-
ATTR_NAME_TARGET
static final java.lang.String ATTR_NAME_TARGET
- See Also:
- Constant Field Values
-
ATTR_NAME_LONG_NAME
static final java.lang.String ATTR_NAME_LONG_NAME
- See Also:
- Constant Field Values
-
ATTR_SUFFIX_INDICES
static final java.lang.String ATTR_SUFFIX_INDICES
- See Also:
- Constant Field Values
-
Method Detail
-
getNxData
NXdata getNxData()
Returns the wrapped NXdata
object. This can be used if client
code needs to modify the NXdata
group in a custom way.
- Returns:
- the
NXdata
-
setPrimaryDevice
<N extends NXobject> void setPrimaryDevice(NexusObjectProvider<N> primaryDevice)
throws NexusException
Sets the given device as the primary device of the wrapped NXdata
group. The data node of the device with the name as returned by
NexusObjectProvider.getPrimaryDataFieldName()
will be set
as the default data field of this device, (referenced by the
@signal
other fields as returned by
NexusObjectProvider.getAxisDataFieldNames()
will also be added.
- Parameters:
primaryDevice
- primary device
- Throws:
NexusException
- if the device could not be added for any reason
-
setPrimaryDevice
<N extends NXobject> void setPrimaryDevice(PrimaryDataDevice<N> primaryDeviceModel)
throws NexusException
Sets the given device as the primary device of the wrapped NXdata
group. The given DataDevice
object wraps a
NexusObjectProvider
and provides methods for configuring how the
DataNode
s for the device should be added to the NXdata
group.
- Parameters:
primaryDeviceModel
- a DataDevice
wrapping the NexusObjectProvider
that provides the NXobject
whose fields should be
added to the NXdata
- Throws:
NexusException
- if the device could not be added for any reason
-
addAxisDevice
<N extends NXobject> void addAxisDevice(NexusObjectProvider<N> dataDevice)
throws NexusException
Adds the data fields of the given device to the wrapped NXdata
group. The fields do add are determined by
NexusObjectProvider.getAxisDataFieldNames()
.
- Parameters:
dataDevice
- device
- Throws:
NexusException
- if the device could not be added for any reason
-
addAxisDevice
<N extends NXobject> void addAxisDevice(NexusObjectProvider<N> dataDevice,
java.lang.Integer defaultAxisDimension,
int... dimensionMappings)
throws NexusException
Adds the data fields of the given device to the wrapped NXdata
group. The fields do add are determined by
NexusObjectProvider.getAxisDataFieldNames()
.
Additionally the field with the name as returned by
NexusObjectProvider.getDefaultAxisDataFieldName()
, or by
NexusObjectProvider.getPrimaryDataFieldName()
if the
former is null
is set as the default axis of the main data
field of the NXdata
for the dimension with the given index (e.g.
the value of the @axes
attribute at that index is set to the
name of this field).
The dimension mappings for each field are set to those given. The
possible exception is that if the field that default axis dimension
applies to has a rank of 1 then this single dimension will be mapped to
the dimension of the given index of the main dataset.
- Parameters:
dataDevice
- data device
defaultAxisDimension
- the index of the axis of the main data field of the wrapped
NXdata
for which this device provides a default axis
value
dimensionMappings
- dimension mappings between the data field(s) of the device
and the @signal
field of the NXdata
group
- Throws:
NexusException
- if the device could not be added for any reason
-
addAxisDevice
<N extends NXobject> void addAxisDevice(AxisDataDevice<N> dataDeviceModel)
throws NexusException
Adds the data fields of the given device to the wrapped NXdata
group. The given DataDevice
object wraps a
NexusObjectProvider
and provides methods for configuring how the
DataNode
s for the device should be added to the NXdata
- Parameters:
dataDeviceModel
- a DataDevice
wrapping the NexusObjectProvider
that provides the NXobject
whose fields should be
added to the NXdata
- Throws:
NexusException
- if the device could not be added for any reason