Interface NexusScanFile


public interface NexusScanFile
An instance of this interface encapsulates a nexus file as defined by a NexusScanModel.
  • Method Details

    • getFilePath

      String getFilePath()
      Returns the absolute file path of the underlying NexusFile on disk
      Returns:
    • getNexusScanModel

      NexusScanModel getNexusScanModel()
      Returns the NexusScanModel defining the scan for this scan file.
      Returns:
    • getNexusObjectProviders

      Map<NexusScanInfo.ScanRole,List<NexusObjectProvider<?>>> getNexusObjectProviders()
      Returns the NexusObjectProviders for this scan file, grouped by NexusScanInfo.ScanRole. These are extracted from the INexusDevices when this NexusScanFile is created.
      Returns:
    • getExternalFilePaths

      Set<String> getExternalFilePaths()
      Returns the set of file paths of the external file that this scan file links to.
      Returns:
      external file paths
    • createNexusFile

      void createNexusFile(boolean async) throws NexusException
      Create the structure of the nexus file according to the NexusScanModel that this NexusScanFile was created with and writes it to disk. This method always opens the file in SWMR mode. This means that the structure of the file cannot be chaned
      Parameters:
      async - if true all writes to datasets are done asynchronously
      Throws:
      NexusException - if the nexus file could not be created for any reason
    • createNexusFile

      void createNexusFile(boolean async, boolean useSwmr) throws NexusException
      Create the structure of the nexus file according to the NexusScanModel that this NexusScanFile was created with and writes it to disk.
      Parameters:
      async - if true all writes to datasets are done asynchronously
      Throws:
      NexusException - if the nexus file could not be created for any reason
    • flush

      int flush() throws NexusException
      Flush the underlying nexus file
      Returns:
      Throws:
      NexusException
    • scanFinished

      void scanFinished() throws NexusException
      Call at the end of the scan to write the final timestamps and close the nexus file.
      Throws:
      NexusException