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

public abstract class BaseGlobalVariable extends NamedType implements GlobalVariable
See Also:
  • Field Details

  • Constructor Details

    • BaseGlobalVariable

      public BaseGlobalVariable()
    • BaseGlobalVariable

      public BaseGlobalVariable(RssSystem network)
  • Method Details

    • clone

      public BaseGlobalVariable clone()
      Description copied from class: NamedType
      Creates 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:
      clone in interface GlobalVariable
      Overrides:
      clone in class NamedType
    • isInput

      public boolean isInput()
      Specified by:
      isInput in interface GlobalVariable
      Returns:
    • setInput

      public void setInput(boolean isInput)
      Specified by:
      setInput in interface GlobalVariable
    • getUsageType

      public String getUsageType()
      Returns:
    • initializeGv

      public boolean initializeGv()
      called on input global variables
      Specified by:
      initializeGv in interface GlobalVariable
    • setGlobalVariableData

      public void setGlobalVariableData(GlobalVariableData altGvData)
      Specified by:
      setGlobalVariableData in interface GlobalVariable
    • printToComputeLog

      public void printToComputeLog()
      print the type, name and value of the Global Variable to the Compute Log
      See Also:
    • getComputeMsg

      protected String 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:
      finalizeCompute in interface GlobalVariable
    • getNetwork

      public RssSystem getNetwork()
      get the GlobalVariable's Network
      Specified by:
      getNetwork in interface GlobalVariable
      Returns:
      the GlobalVariable's network
    • hasValidValue

      public String hasValidValue()
      check to see if the GlobalVariable has a valid value
      Specified by:
      hasValidValue in interface GlobalVariable
      Returns:
      null if valid, message string if its not.
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Overrides:
      getFieldObject in class NamedType
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Overrides:
      setFieldObject in class NamedType
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful
    • setIsDataLocation

      public void setIsDataLocation(boolean isDataLocation)
      Specified by:
      setIsDataLocation in interface GlobalVariable
    • getIsDataLocation

      public boolean getIsDataLocation()
      Specified by:
      getIsDataLocation in interface GlobalVariable
    • outputReport

      public void outputReport(AlternativeInputReport report, org.jdom.Element myElem)
      called when created the network part of the alternative report
      Specified by:
      outputReport in interface GlobalVariable
      Parameters:
      report - the alternative report
      myElem - the element for this global variable