generated.docs.javadoc.org.eclipse.dawnsci.nexus.builder.data.impl.AbstractNexusDataBuilder.html Maven / Gradle / Ivy
AbstractNexusDataBuilder (h5jan API)
org.eclipse.dawnsci.nexus.builder.data.impl
Class AbstractNexusDataBuilder
- java.lang.Object
-
- org.eclipse.dawnsci.nexus.builder.data.impl.AbstractNexusDataBuilder
-
- All Implemented Interfaces:
- NexusDataBuilder
- Direct Known Subclasses:
- DefaultNexusDataBuilder, PredeterminedLinksApplicationDataBuilder
public abstract class AbstractNexusDataBuilder
extends java.lang.Object
implements NexusDataBuilder
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected NexusEntryBuilder
entryBuilder
protected NXdata
nxData
-
Fields inherited from interface org.eclipse.dawnsci.nexus.builder.data.NexusDataBuilder
ATTR_NAME_AXES, ATTR_NAME_LONG_NAME, ATTR_NAME_SIGNAL, ATTR_NAME_TARGET, ATTR_SUFFIX_INDICES, NO_DEFAULT_AXIS_PLACEHOLDER
-
Constructor Summary
Constructors
Modifier
Constructor and Description
protected
AbstractNexusDataBuilder(NexusEntryBuilder entryBuilder,
NXdata nxData)
Create a new DefaultNexusDataBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
<N extends NXobject>
void
addAxisDevice(NexusObjectProvider<N> dataDevice)
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.
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.dawnsci.nexus.builder.data.NexusDataBuilder
addAxisDevice, addAxisDevice, setPrimaryDevice
-
-
Field Detail
-
nxData
protected final NXdata nxData
-
entryBuilder
protected final NexusEntryBuilder entryBuilder
-
Constructor Detail
-
AbstractNexusDataBuilder
protected AbstractNexusDataBuilder(NexusEntryBuilder entryBuilder,
NXdata nxData)
Create a new DefaultNexusDataBuilder
. This constructor should only be
called by DefaultNexusEntryBuilder
.
- Parameters:
entryBuilder
- parent entry model
nxData
- NXdata
object to wrap
-
Method Detail
-
getNxData
public NXdata getNxData()
Description copied from interface: NexusDataBuilder
Returns the wrapped NXdata
object. This can be used if client
code needs to modify the NXdata
group in a custom way.
- Specified by:
getNxData
in interface NexusDataBuilder
- Returns:
- the
NXdata
-
setPrimaryDevice
public <N extends NXobject> void setPrimaryDevice(NexusObjectProvider<N> primaryDevice)
throws NexusException
Description copied from interface: NexusDataBuilder
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.
- Specified by:
setPrimaryDevice
in interface NexusDataBuilder
- Parameters:
primaryDevice
- primary device
- Throws:
NexusException
- if the device could not be added for any reason
-
addAxisDevice
public <N extends NXobject> void addAxisDevice(NexusObjectProvider<N> dataDevice)
throws NexusException
Description copied from interface: NexusDataBuilder
Adds the data fields of the given device to the wrapped NXdata
group. The fields do add are determined by
NexusObjectProvider.getAxisDataFieldNames()
.
- Specified by:
addAxisDevice
in interface NexusDataBuilder
- Parameters:
dataDevice
- device
- Throws:
NexusException
- if the device could not be added for any reason