Package gda.data.metadata
Class MetadataEntry
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.data.metadata.MetadataEntry
- All Implemented Interfaces:
IMetadataEntry,Configurable,Findable,gda.observable.IObservable,Serializable
- Direct Known Subclasses:
DateMetadataEntry,DummyMetadataEntry,EpicsMetadataEntry,IcatMetadataEntry,JythonMetadataEntry,PersistantMetadataEntry,PropertyMetadataEntry,ScannableMetadataEntry,StoredMetadataEntry
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIObserver(gda.observable.IObserver anIObserver) booleanvoidConfigure Method.voiddeleteIObserver(gda.observable.IObserver anIObserver) voidReturns the current value of the object.protected voidnotifyIObservers(Object theObserved, Object theArgument) Notify all observers on the list of the requested change.protected abstract StringReturns the actual value of the metadata entry.voidsetDefEntryName(String defEntryName) voidWhere appropriate, sets the value of the metadata.toString()Methods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
isConfigureAtStartup, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.data.metadata.IMetadataEntry
getName, setName
-
Constructor Details
-
MetadataEntry
public MetadataEntry() -
MetadataEntry
-
-
Method Details
-
configure
Configure Method.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException
-
getMetadataValue
Description copied from interface:IMetadataEntryReturns 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:
getMetadataValuein interfaceIMetadataEntry- Returns:
- The value of this metadata entry.
-
readActualValue
Returns the actual value of the metadata entry. Any exception can be thrown by this method, which will causegetMetadataValue()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
- Specified by:
getDefEntryNamein interfaceIMetadataEntry- Returns:
- defEntryName
-
setDefEntryName
- Specified by:
setDefEntryNamein interfaceIMetadataEntry- Parameters:
defEntryName-
-
addIObserver
public void addIObserver(gda.observable.IObserver anIObserver) - Specified by:
addIObserverin interfacegda.observable.IObservable
-
deleteIObserver
public void deleteIObserver(gda.observable.IObserver anIObserver) - Specified by:
deleteIObserverin interfacegda.observable.IObservable
-
deleteIObservers
public void deleteIObservers()- Specified by:
deleteIObserversin interfacegda.observable.IObservable
-
notifyIObservers
Notify all observers on the list of the requested change.- Parameters:
theObserved- the observed componenttheArgument- the data to be sent to the observer.
-
setValue
Description copied from interface:IMetadataEntryWhere appropriate, sets the value of the metadata.- Specified by:
setValuein interfaceIMetadataEntry- Parameters:
metadataValue-- Throws:
Exception
-
canStoreValue
public boolean canStoreValue()- Specified by:
canStoreValuein interfaceIMetadataEntry- Returns:
- true - if this instance of IMetadataEntry can persist its value, so the storeValue method will try to do something
-
toString
-