generated.docs.javadoc.org.eclipse.dawnsci.nexus.builder.data.impl.DataDeviceImpl.html Maven / Gradle / Ivy
DataDeviceImpl (h5jan API)
org.eclipse.dawnsci.nexus.builder.data.impl
Class DataDeviceImpl<N extends NXobject>
- java.lang.Object
-
- org.eclipse.dawnsci.nexus.builder.data.impl.DataDeviceImpl<N>
-
- Type Parameters:
N
- subinterface of NXobject
created by the
wrapped NexusObjectProvider
- All Implemented Interfaces:
- DataDevice<N>
- Direct Known Subclasses:
- AxisDataDeviceImpl, PrimaryDataDeviceImpl
public abstract class DataDeviceImpl<N extends NXobject>
extends java.lang.Object
implements DataDevice<N>
A object of this class wraps an NexusObjectProvider
and contains
additional information that can be used by a NexusDataBuilder
describing how to add the fields for this device to an NXdata
group when its added, either as a primary data device (by calling
NexusDataBuilder.setPrimaryDevice(org.eclipse.dawnsci.nexus.builder.data.PrimaryDataDevice)
)
or as an axis device (by calling NexusDataBuilder.addAxisDevice(org.eclipse.dawnsci.nexus.builder.data.AxisDataDevice)
-
-
Constructor Summary
Constructors
Constructor and Description
DataDeviceImpl(N nexusObject)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
void
addAxisField(AxisFieldModel axisFieldModel)
protected void
appendFields(java.lang.StringBuilder sb)
java.util.List<java.lang.String>
getAxisFieldNames()
Returns the list of the axis field names.
java.lang.Integer
getDefaultAxisDimension(java.lang.String sourceFieldName)
java.lang.String
getDestinationFieldName(java.lang.String sourceFieldName)
int[]
getDimensionMappings(java.lang.String sourceFieldName)
Returns the dimension mappings for the field with the given name.
Node
getFieldNode(java.lang.String sourceFieldName)
int
getFieldRank(java.lang.String sourceFieldName)
Returns the rank of the source field with the given name
N
getNexusObject()
Returns the nexus object for this data device.
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.dawnsci.nexus.builder.data.DataDevice
isPrimary
-
-
Constructor Detail
-
DataDeviceImpl
public DataDeviceImpl(N nexusObject)
-
Method Detail
-
addAxisField
public void addAxisField(AxisFieldModel axisFieldModel)
-
getNexusObject
public final N getNexusObject()
Description copied from interface: DataDevice
Returns the nexus object for this data device.
- Specified by:
getNexusObject
in interface DataDevice<N extends NXobject>
- Returns:
- nexus object
-
getAxisFieldNames
public java.util.List<java.lang.String> getAxisFieldNames()
Description copied from interface: DataDevice
Returns the list of the axis field names.
- Specified by:
getAxisFieldNames
in interface DataDevice<N extends NXobject>
- Returns:
- axis field names
-
getDimensionMappings
public int[] getDimensionMappings(java.lang.String sourceFieldName)
Description copied from interface: DataDevice
Returns the dimension mappings for the field with the given name. This is an array of
integers each of which specifies the index of the @signal
field that
the dimension of the dataset for this field name with the corresponding index maps to.
- Specified by:
getDimensionMappings
in interface DataDevice<N extends NXobject>
- Parameters:
sourceFieldName
- field name in the existing NXobject
- Returns:
- dimension mappings between the field with the given name and the
@signal
field of the NXdata
group
-
getDefaultAxisDimension
public java.lang.Integer getDefaultAxisDimension(java.lang.String sourceFieldName)
Description copied from interface: DataDevice
Returns the index of the dimension of the @signal
field of the NXdata
group the field of the NXobject
with the given name is a default axis for, or
null
if this field is not a default axis of the @signal
field.
- Specified by:
getDefaultAxisDimension
in interface DataDevice<N extends NXobject>
- Parameters:
sourceFieldName
- field name in the existing NXobject
- Returns:
- dimension of the signal field that this field is a default axis for,
or
null
-
getDestinationFieldName
public java.lang.String getDestinationFieldName(java.lang.String sourceFieldName)
Description copied from interface: DataDevice
Returns the name that the field with the given name in the NXobject
should be
given in the NXdata
group when added (i.e. linked to).
- Specified by:
getDestinationFieldName
in interface DataDevice<N extends NXobject>
- Parameters:
sourceFieldName
- field name in the existing NXobject
- Returns:
- destination name
-
getFieldNode
public Node getFieldNode(java.lang.String sourceFieldName)
Description copied from interface: DataDevice
Returns the Node
for the field with the given name in the NXobject
that this object was created from. In most cases this will be
a DataNode
, but may be a SymbolicNode
in the case of an external link
- Specified by:
getFieldNode
in interface DataDevice<N extends NXobject>
- Parameters:
sourceFieldName
- field name in the existing NXobject
- Returns:
- the node with the given name
-
getFieldRank
public int getFieldRank(java.lang.String sourceFieldName)
Description copied from interface: DataDevice
Returns the rank of the source field with the given name
- Specified by:
getFieldRank
in interface DataDevice<N extends NXobject>
- Parameters:
sourceFieldName
- field name in the existing NXobject
- Returns:
- rank of the field with the given name
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
-
appendFields
protected void appendFields(java.lang.StringBuilder sb)