Class LDEResourceUtil

java.lang.Object
org.opengda.lde.utils.LDEResourceUtil

public class LDEResourceUtil extends Object
  • Constructor Details

    • LDEResourceUtil

      public LDEResourceUtil()
  • Method Details

    • getDefaultFilename

      public String getDefaultFilename()
      returns the default filename.
      Returns:
    • getDefaultDirectory

      public String getDefaultDirectory()
      return the default file directory. This directory must have permission for GDA client to write to. At DLS beamlines it is always the 'xml' directory under the directory defined by the java property gda.data.scan.datawriter.datadir. In other case, such as on developer's PC, or if this property is not set, it will use system use.home property to store the file.
      Returns:
    • getFileName

      public String getFileName()
    • setFileName

      public void setFileName(String fileName)
      enable file name to be set in Spring object configuration. If the file name dosn't contain full path, the default XML data directory defined in java property gda.data.scan.datawriter.datadir is used.
      Parameters:
      fileName -
    • getResource

      public org.eclipse.emf.ecore.resource.Resource getResource() throws Exception
      return the resource. The filename for this resource can be set in Spring object configuration property. If not set in Spring configuration, it is built using GDA property gda.data.scan.datawriter.datadir and the default file name newsamples.lde. If this property is not set this sequence file will be created at user.home
      Returns:
      Throws:
      Exception
    • getExperiments

      public List<Experiment> getExperiments(String filename) throws Exception
      Throws:
      Exception
    • createExperiments

      public List<Experiment> createExperiments() throws Exception
      Throws:
      Exception
    • getExperiments

      public List<Experiment> getExperiments() throws Exception
      Throws:
      Exception
    • getResource

      public org.eclipse.emf.ecore.resource.Resource getResource(String fileName)
    • getExperiments

      public List<Experiment> getExperiments(org.eclipse.emf.ecore.resource.Resource res)
    • getStages

      public List<Stage> getStages(Experiment experiment)
    • getCells

      public List<Cell> getCells(Stage stage)
    • getSamples

      public List<Sample> getSamples(Cell cell)
    • save

      public void save(org.eclipse.emf.ecore.resource.Resource res) throws IOException
      Throws:
      IOException
    • saveAs

      public void saveAs(org.eclipse.emf.ecore.resource.Resource resource, String filename)
    • getEditingDomain

      public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
    • getSamples

      public Map<String,Sample> getSamples(String filename) throws Exception
      Throws:
      Exception
    • getStages

      public Map<String,Stage> getStages(String filename) throws Exception
      Throws:
      Exception
    • getCells

      public Map<String,Cell> getCells(String filename) throws Exception
      Throws:
      Exception
    • getSamples

      public List<Sample> getSamples() throws Exception
      Throws:
      Exception
    • getStages

      public List<Stage> getStages() throws Exception
      Throws:
      Exception
    • getCells

      public List<Cell> getCells() throws Exception
      Throws:
      Exception