Class PerVisitExternalNcdMetadata

All Implemented Interfaces:
Configurable, Findable, gda.observable.IObserver, ExternalMetadataFile, INcdMetaProvider
Direct Known Subclasses:
NcdBackground, NcdCalibration, NcdMaskLink

public abstract class PerVisitExternalNcdMetadata extends NcdMetaBaseProvider implements gda.observable.IObserver, ExternalMetadataFile
  • Field Details

    • config

      protected org.apache.commons.configuration.XMLConfiguration config
  • Constructor Details

    • PerVisitExternalNcdMetadata

      public PerVisitExternalNcdMetadata()
  • Method Details

    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default implementation for classes that do not have to do any specific configuration.
      Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • setExternalFile

      public void setExternalFile(String filepath)
      Specified by:
      setExternalFile in interface ExternalMetadataFile
    • setExternalFile

      public void setExternalFile(String filepath, String internal)
      Specified by:
      setExternalFile in interface ExternalMetadataFile
    • clear

      public void clear()
      Specified by:
      clear in interface ExternalMetadataFile
    • restore

      public void restore()
    • refresh

      public void refresh(NcdMsg.Refresh ref)
    • requestChange

      public void requestChange(NcdMsg.ChangeRequest req)
    • update

      public void update(Object source, Object arg)
      Specified by:
      update in interface gda.observable.IObserver
    • setConfigFileName

      public void setConfigFileName(String configFileName)
    • setDetectorType

      public void setDetectorType(String detectorType)
    • setMetaType

      public void setMetaType(NcdMetaType metaType)
    • setVisitMeta

      public void setVisitMeta(IMetadataEntry visit)
    • getFilepath

      public String getFilepath()
    • getInternalPath

      public String getInternalPath()
    • writeout

      public void writeout(NXDetectorData nxdata, String treeName)
      Specified by:
      writeout in interface INcdMetaProvider
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • checkFile

      protected void checkFile(String file, String internal)
      Check file is valid before accepting it. Base implementation just checks file exists. Subclasses can perform further checks including of internal path. Should throw exception if not valid.
      Parameters:
      file -
      internal -
      Throws:
      IllegalArgumentException - if file is not valid
    • __call__

      public void __call__(String ext, String inner)
    • __call__

      public void __call__(String ext)
    • write

      protected abstract void write(NXDetectorData nxdata, String treeName)