Class MetadataEntry

All Implemented Interfaces:
IMetadataEntry, Configurable, Findable, gda.observable.IObservable, Serializable
Direct Known Subclasses:
DateMetadataEntry, DummyMetadataEntry, EpicsMetadataEntry, IcatMetadataEntry, JythonMetadataEntry, PersistantMetadataEntry, PropertyMetadataEntry, ScannableMetadataEntry, StoredMetadataEntry

public abstract class MetadataEntry extends FindableConfigurableBase implements IMetadataEntry
An item of metadata. The user does not need to know the means of access to the metadata value. This is based on the type of this metadata. The current value can be retrieved by by the getMetadataValue() method or via a containing Metadata object and it's Metadata.getMetadataValue(String) method.
See Also:
  • Constructor Details

    • MetadataEntry

      public MetadataEntry()
    • MetadataEntry

      public MetadataEntry(String name)
  • Method Details

    • configure

      public void configure() throws FactoryException
      Configure Method.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException
    • getMetadataValue

      public String getMetadataValue()
      Description copied from interface: IMetadataEntry
      Returns the current value of the object. The method of retrieving this value will vary depending on the type of this piece of metadata.
      Specified by:
      getMetadataValue in interface IMetadataEntry
      Returns:
      The value of this metadata entry.
    • readActualValue

      protected abstract String readActualValue() throws Exception
      Returns the actual value of the metadata entry. Any exception can be thrown by this method, which will cause getMetadataValue() to look for a default value (if one is specified).
      Returns:
      the entry's actual value
      Throws:
      Exception - if the value cannot be retrieved
    • getDefEntryName

      public String getDefEntryName()
      Specified by:
      getDefEntryName in interface IMetadataEntry
      Returns:
      defEntryName
    • setDefEntryName

      public void setDefEntryName(String defEntryName)
      Specified by:
      setDefEntryName in interface IMetadataEntry
      Parameters:
      defEntryName -
    • addIObserver

      public void addIObserver(gda.observable.IObserver anIObserver)
      Specified by:
      addIObserver in interface gda.observable.IObservable
    • deleteIObserver

      public void deleteIObserver(gda.observable.IObserver anIObserver)
      Specified by:
      deleteIObserver in interface gda.observable.IObservable
    • deleteIObservers

      public void deleteIObservers()
      Specified by:
      deleteIObservers in interface gda.observable.IObservable
    • notifyIObservers

      protected void notifyIObservers(Object theObserved, Object theArgument)
      Notify all observers on the list of the requested change.
      Parameters:
      theObserved - the observed component
      theArgument - the data to be sent to the observer.
    • setValue

      public void setValue(String metadataValue) throws Exception
      Description copied from interface: IMetadataEntry
      Where appropriate, sets the value of the metadata.
      Specified by:
      setValue in interface IMetadataEntry
      Parameters:
      metadataValue -
      Throws:
      Exception
    • canStoreValue

      public boolean canStoreValue()
      Specified by:
      canStoreValue in interface IMetadataEntry
      Returns:
      true - if this instance of IMetadataEntry can persist its value, so the storeValue method will try to do something
    • toString

      public String toString()
      Overrides:
      toString in class Object