generated.docs.javadoc.org.eclipse.dawnsci.nexus.builder.appdef.impl.TomoApplicationBuilder.html Maven / Gradle / Ivy
TomoApplicationBuilder (h5jan API)
org.eclipse.dawnsci.nexus.builder.appdef.impl
Class TomoApplicationBuilder
- java.lang.Object
-
- org.eclipse.dawnsci.nexus.builder.appdef.impl.AbstractNexusApplicationBuilder
-
- org.eclipse.dawnsci.nexus.builder.appdef.impl.TomoApplicationBuilder
-
- All Implemented Interfaces:
- NexusApplicationBuilder
public class TomoApplicationBuilder
extends AbstractNexusApplicationBuilder
implements NexusApplicationBuilder
Application builder for NexusApplicationDefinition.NX_TOMO
applications.
Note that there are two ways to populate the NXsample
group within the application,
either by providing a fully populated NXsample
object by invoking
setSample(NexusObjectProvider)
, or by adding setting each field individually
using setSampleName(String)
, setRotationAngle(NexusObjectProvider)
,
setXTranslation(DataNode)
, etc. For each data field two methods exist, one
that takes a NexusObjectProvider
that produces an NXpositioner
- in
this case a link to the 'value' data node of this positioner will be added, or by
directly adding a DataNode
.
-
-
Field Summary
-
Fields inherited from class org.eclipse.dawnsci.nexus.builder.appdef.impl.AbstractNexusApplicationBuilder
nexusEntryModel, subentry
-
Constructor Summary
Constructors
Constructor and Description
TomoApplicationBuilder(NexusEntryBuilder nexusEntryBuilder,
NXsubentry subentry)
Creates a new TomoApplicationBuilder
within the NXentry
for the
given nexus entry builder
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
<N extends NXobject>
N
add(NexusObjectProvider<N> nexusObjectProvider)
Not supported.
void
addDefaultGroups()
Adds the default groups to the subentry.
protected void
addPredeterminedLinks(PredeterminedLinksApplicationDataBuilder dataBuilder)
Adds the predetermined links to the given PredeterminedLinksApplicationDataBuilder
.
NexusDataBuilder
newData()
Creates a new NexusDataBuilder
child of this application.
void
setControl(NexusObjectProvider<NXpositioner> controlDevice)
Sets the control device
void
setDetector(NexusObjectProvider<NXdetector> detector)
Sets the detector to that provided by the given NexusObjectProvider
.
void
setRotationAngle(DataNode rotationAngle)
Sets the rotation angle
void
setRotationAngle(NexusObjectProvider<NXpositioner> rotationAnglePositioner)
Sets the rotation angle
void
setSample(NexusObjectProvider<NXsample> sample)
Sets the sample to that provided by this given NexusObjectProvider
.
void
setSampleName(java.lang.String sampleName)
Sets the sample name.
void
setSource(NexusObjectProvider<NXsource> source)
Sets the source to that provided by the given NexusObjectProvider
.
void
setTitle(DataNode title)
Links the title of the application to the given data node.
void
setTitle(java.lang.String title)
Sets the title of the application to that given
void
setXTranslation(DataNode xTranslation)
Sets the 'x' translation
void
setXTranslation(NexusObjectProvider<NXpositioner> xPositioner)
Sets the 'x' translation.
void
setYTranslation(DataNode yTranslation)
Sets the 'y' translation
void
setYTranslation(NexusObjectProvider<NXpositioner> yPositioner)
Sets the 'y' translation
void
setZTranslation(DataNode zTranslation)
Sets the 'z' translation
void
setZTranslation(NexusObjectProvider<NXpositioner> zPositioner)
Sets the 'z' translation
void
validate()
Validates this NeXus application according to the NXDL application definition.
-
Methods inherited from class org.eclipse.dawnsci.nexus.builder.appdef.impl.AbstractNexusApplicationBuilder
getApplicationDefinitionName, getDataNode, getNXsubentry
-
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.appdef.NexusApplicationBuilder
getDataNode, getNXsubentry
-
-
Constructor Detail
-
TomoApplicationBuilder
public TomoApplicationBuilder(NexusEntryBuilder nexusEntryBuilder,
NXsubentry subentry)
Creates a new TomoApplicationBuilder
within the NXentry
for the
given nexus entry builder
- Parameters:
nexusEntryBuilder
-
subentry
-
-
Method Detail
-
add
public <N extends NXobject> N add(NexusObjectProvider<N> nexusObjectProvider)
throws NexusException
Not supported. Use the methods specific to this application instead
- Specified by:
add
in interface NexusApplicationBuilder
- Returns:
- the added nexus object
- Throws:
NexusException
- if the nexus objects cannot be added for any reason
- See Also:
NexusApplicationBuilder.add(org.eclipse.dawnsci.nexus.builder.NexusObjectProvider)
-
setTitle
public void setTitle(java.lang.String title)
Sets the title of the application to that given
- Parameters:
title
- title
-
setTitle
public void setTitle(DataNode title)
Links the title of the application to the given data node.
- Parameters:
title
- title data node to link to
-
setSource
public void setSource(NexusObjectProvider<NXsource> source)
throws NexusException
Sets the source to that provided by the given NexusObjectProvider
.
- Parameters:
source
-
- Throws:
NexusException
- if the source could not be added for any reason
-
setDetector
public void setDetector(NexusObjectProvider<NXdetector> detector)
throws NexusException
Sets the detector to that provided by the given NexusObjectProvider
.
- Parameters:
detector
-
- Throws:
NexusException
- if the detector could not be added for any reason
-
setSample
public void setSample(NexusObjectProvider<NXsample> sample)
throws NexusException
Sets the sample to that provided by this given NexusObjectProvider
.
- Parameters:
sample
-
- Throws:
NexusException
-
setSampleName
public void setSampleName(java.lang.String sampleName)
Sets the sample name.
- Parameters:
sampleName
-
-
setRotationAngle
public void setRotationAngle(NexusObjectProvider<NXpositioner> rotationAnglePositioner)
throws NexusException
Sets the rotation angle
- Parameters:
rotationAnglePositioner
- rotation angle positioner
- Throws:
NexusException
-
setRotationAngle
public void setRotationAngle(DataNode rotationAngle)
throws NexusException
Sets the rotation angle
- Parameters:
rotationAngle
- rotation angle data node
- Throws:
NexusException
-
setXTranslation
public void setXTranslation(NexusObjectProvider<NXpositioner> xPositioner)
throws NexusException
Sets the 'x' translation.
- Parameters:
xPositioner
- x positioner
- Throws:
NexusException
-
setXTranslation
public void setXTranslation(DataNode xTranslation)
throws NexusException
Sets the 'x' translation
- Parameters:
xTranslation
- x translation data node
- Throws:
NexusException
-
setYTranslation
public void setYTranslation(NexusObjectProvider<NXpositioner> yPositioner)
throws NexusException
Sets the 'y' translation
- Parameters:
yPositioner
- y positioner
- Throws:
NexusException
-
setYTranslation
public void setYTranslation(DataNode yTranslation)
throws NexusException
Sets the 'y' translation
- Parameters:
yTranslation
- y translation data node
- Throws:
NexusException
-
setZTranslation
public void setZTranslation(NexusObjectProvider<NXpositioner> zPositioner)
throws NexusException
Sets the 'z' translation
- Parameters:
zPositioner
- z positioner
- Throws:
NexusException
-
setZTranslation
public void setZTranslation(DataNode zTranslation)
throws NexusException
Sets the 'z' translation
- Parameters:
zTranslation
- z translation
- Throws:
NexusException
-
setControl
public void setControl(NexusObjectProvider<NXpositioner> controlDevice)
throws NexusException
Sets the control device
- Parameters:
controlDevice
- control device
- Throws:
NexusException
-
newData
public NexusDataBuilder newData()
throws NexusException
Description copied from interface: NexusApplicationBuilder
Creates a new NexusDataBuilder
child of this application. If the application definition defines links from fields within this data node
to the subentry for the application definition, these will be automatically added when this method is invoked.
- Specified by:
newData
in interface NexusApplicationBuilder
- Returns:
- nexus data model
- Throws:
NexusException
- if the new data cannot be created for any reason
-
validate
public void validate()
throws NexusValidationException
Description copied from interface: NexusApplicationBuilder
Validates this NeXus application according to the NXDL application definition.
- Specified by:
validate
in interface NexusApplicationBuilder
- Throws:
NexusValidationException
- if the application is invalid
-
addDefaultGroups
public void addDefaultGroups()
Description copied from interface: NexusApplicationBuilder
Adds the default groups to the subentry. This method should be called before
any nexus objects are added to the entry
- Specified by:
addDefaultGroups
in interface NexusApplicationBuilder
-
addPredeterminedLinks
protected void addPredeterminedLinks(PredeterminedLinksApplicationDataBuilder dataBuilder)
throws NexusException
Adds the predetermined links to the given PredeterminedLinksApplicationDataBuilder
.
- Parameters:
dataBuilder
-
- Throws:
NexusException