generated.docs.javadoc.org.eclipse.dawnsci.nexus.builder.impl.DefaultNexusFileBuilder.html Maven / Gradle / Ivy
DefaultNexusFileBuilder (h5jan API)
org.eclipse.dawnsci.nexus.builder.impl
Class DefaultNexusFileBuilder
- java.lang.Object
-
- org.eclipse.dawnsci.nexus.builder.impl.DefaultNexusFileBuilder
-
- All Implemented Interfaces:
- NexusFileBuilder
public class DefaultNexusFileBuilder
extends java.lang.Object
implements NexusFileBuilder
Default implementation of NexusFileBuilder
.
-
-
Constructor Summary
Constructors
Constructor and Description
DefaultNexusFileBuilder(java.lang.String filePath)
Creates a new DefaultNexusFileBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
NexusScanFile
createFile(boolean async)
Creates the NeXus file with the content as configured with this builder.
TreeFile
getNexusTree()
Returns the wrapped TreeFile
.
NXroot
getNXroot()
Returns the NXrootImpl
object at the root of the NeXus object tree.
DefaultNexusEntryBuilder
newEntry()
Creates a new NexusEntryBuilder
with the default name, "entry".
DefaultNexusEntryBuilder
newEntry(java.lang.String entryName)
Creates a new NexusEntryBuilder
with the given name.
void
validate()
Validates all entries within the NeXus file.
-
-
Constructor Detail
-
DefaultNexusFileBuilder
public DefaultNexusFileBuilder(java.lang.String filePath)
Creates a new DefaultNexusFileBuilder
.
- Parameters:
filePath
-
-
Method Detail
-
getNexusTree
public TreeFile getNexusTree()
Description copied from interface: NexusFileBuilder
Returns the wrapped TreeFile
.
- Specified by:
getNexusTree
in interface NexusFileBuilder
- Returns:
- nexus tree
-
getNXroot
public NXroot getNXroot()
Description copied from interface: NexusFileBuilder
Returns the NXrootImpl
object at the root of the NeXus object tree.
- Specified by:
getNXroot
in interface NexusFileBuilder
- Returns:
- the
NXrootImpl
-
newEntry
public DefaultNexusEntryBuilder newEntry()
throws NexusException
Description copied from interface: NexusFileBuilder
Creates a new NexusEntryBuilder
with the default name, "entry".
- Specified by:
newEntry
in interface NexusFileBuilder
- Returns:
- new
NexusEntryBuilder
- Throws:
NexusException
- if the entry could not be created for any reason
-
newEntry
public DefaultNexusEntryBuilder newEntry(java.lang.String entryName)
throws NexusException
Description copied from interface: NexusFileBuilder
Creates a new NexusEntryBuilder
with the given name.
- Specified by:
newEntry
in interface NexusFileBuilder
- Parameters:
entryName
- entry name
- Returns:
- new
NexusEntryBuilder
- Throws:
NexusException
- if the entry could not be created for any reason
-
validate
public void validate()
throws NexusValidationException
Description copied from interface: NexusFileBuilder
Validates all entries within the NeXus file.
- Specified by:
validate
in interface NexusFileBuilder
- Throws:
NexusValidationException
- if one or more of the entries in the nexus file
are invalid.
-
createFile
public NexusScanFile createFile(boolean async)
throws NexusException
Description copied from interface: NexusFileBuilder
Creates the NeXus file with the content as configured with this builder.
The nexus file is left open and SWMR mode activated.
This file must be closed by calling #closeFile()
(or by using try-with-resources on this object).
- Specified by:
createFile
in interface NexusFileBuilder
- Parameters:
async
- if true, then all writes are done asynchronously
- Throws:
NexusException
- if the nexus file could not be saved for any reason