org.dawb.tango.extensions.editors
Class SpecData

java.lang.Object
  extended by org.dawb.tango.extensions.editors.SpecData

public class SpecData
extends java.lang.Object

Class deals with multi-scan ascii spec file data. This file acts like a data struture returned by LoaderFactory but has more levels and deals normally with small data. Unlike hdf5 everything is read into memory at the start. This class is a bit Hacked at the moment with methods and updates and fields with position sensitive data. However it is encapsulated and can be improved when and if we go for something like this.

Author:
gerring

Constructor Summary
SpecData(java.io.InputStream input)
           
 
Method Summary
 void clear()
           
 javax.swing.tree.TreeNode getNode()
           
 java.util.Collection<java.lang.String> getScanNames()
           
 java.util.Collection<uk.ac.diamond.scisoft.analysis.dataset.AbstractDataset> getSets(java.lang.String scanName)
           
 java.lang.String processLine(java.lang.String line)
          Processes a line and adds it to the scan data.
 void update(boolean endScan)
           
 javax.swing.tree.TreeNode updateNode(java.lang.String newScanName)
          Returns the tree node that was updated or null if nothing or everything was updated.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecData

public SpecData(java.io.InputStream input)
         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getSets

public java.util.Collection<uk.ac.diamond.scisoft.analysis.dataset.AbstractDataset> getSets(java.lang.String scanName)

getScanNames

public java.util.Collection<java.lang.String> getScanNames()

clear

public void clear()

getNode

public javax.swing.tree.TreeNode getNode()

updateNode

public javax.swing.tree.TreeNode updateNode(java.lang.String newScanName)
Returns the tree node that was updated or null if nothing or everything was updated.

Parameters:
newScanName -
Returns:

processLine

public java.lang.String processLine(java.lang.String line)
Processes a line and adds it to the scan data. Returns true if data added requires a replot.

Parameters:
line -

update

public void update(boolean endScan)