Package hec.rss.model.globalvariable
Class BaseGlobalVariable
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.globalvariable.BaseGlobalVariable
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,GlobalVariable,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
- Direct Known Subclasses:
ExternalGlobalVariable,ScalarGlobalVariable,StringGlobalVariable,TableGlobalVariable
- See Also:
-
Field Summary
FieldsFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object of the same class as this object.voidcalled at the end of the compute to do any compute related cleanup that's necessary;protected StringgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.booleanget the GlobalVariable's Networkcheck to see if the GlobalVariable has a valid valuebooleancalled on input global variablesbooleanisInput()voidoutputReport(AlternativeInputReport report, org.jdom.Element myElem) called when created the network part of the alternative reportvoidprint the type, name and value of the Global Variable to the Compute Logvoidprint the type, name and value of the Global Variable to the Compute WindowbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetGlobalVariableData(GlobalVariableData altGvData) voidsetInput(boolean isInput) voidsetIsDataLocation(boolean isDataLocation) Methods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.rss.model.globalvariable.GlobalVariable
getDescription, getDescriptiveText, getIndex, getName, getType, setDescription, setIndex, setName
-
Field Details
-
_network
-
_altGvData
-
-
Constructor Details
-
BaseGlobalVariable
public BaseGlobalVariable() -
BaseGlobalVariable
-
-
Method Details
-
clone
Description copied from class:NamedTypeCreates a new object of the same class as this object.
It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No
constructor is called.- Specified by:
clonein interfaceGlobalVariable- Overrides:
clonein classNamedType
-
isInput
public boolean isInput()- Specified by:
isInputin interfaceGlobalVariable- Returns:
-
setInput
public void setInput(boolean isInput) - Specified by:
setInputin interfaceGlobalVariable
-
getUsageType
- Returns:
-
initializeGv
public boolean initializeGv()called on input global variables- Specified by:
initializeGvin interfaceGlobalVariable
-
setGlobalVariableData
- Specified by:
setGlobalVariableDatain interfaceGlobalVariable
-
printToComputeLog
public void printToComputeLog()print the type, name and value of the Global Variable to the Compute Log- See Also:
-
getComputeMsg
- Returns:
-
printToComputeWindow
public void printToComputeWindow()print the type, name and value of the Global Variable to the Compute Window- See Also:
-
finalizeCompute
public void finalizeCompute()called at the end of the compute to do any compute related cleanup that's necessary;- Specified by:
finalizeComputein interfaceGlobalVariable
-
getNetwork
get the GlobalVariable's Network- Specified by:
getNetworkin interfaceGlobalVariable- Returns:
- the GlobalVariable's network
-
hasValidValue
check to see if the GlobalVariable has a valid value- Specified by:
hasValidValuein interfaceGlobalVariable- Returns:
- null if valid, message string if its not.
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin classNamedType- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Overrides:
setFieldObjectin classNamedType- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-
setIsDataLocation
public void setIsDataLocation(boolean isDataLocation) - Specified by:
setIsDataLocationin interfaceGlobalVariable
-
getIsDataLocation
public boolean getIsDataLocation()- Specified by:
getIsDataLocationin interfaceGlobalVariable
-
outputReport
called when created the network part of the alternative report- Specified by:
outputReportin interfaceGlobalVariable- Parameters:
report- the alternative reportmyElem- the element for this global variable
-