Package hec.model

Class Node

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, StreamReferenceHolder, TSLocation, TSLocation2, Serializable, Cloneable, Comparable, Observer, Modifiable

public class Node extends NamedType implements TSLocation, TSLocation2, StreamReferenceHolder
See Also:
  • Field Details

    • OUTFLOW

      public static final int OUTFLOW
      See Also:
    • INFLOW

      public static final int INFLOW
      See Also:
    • _manager

      protected TsRecordContainer _manager
    • _tsrecordVector

      protected Vector _tsrecordVector
    • _location

      protected WorldPt _location
    • _streamIndex

      protected int _streamIndex
    • _stream

      protected transient StreamElement _stream
    • _streamName

      protected String _streamName
    • _station

      protected double _station
    • _streamCoord

      protected double _streamCoord
  • Constructor Details

  • Method Details

    • setManager

      public void setManager(TsRecordContainer sys)
    • setStream

      public void setStream(StreamElement s)
    • getStreamIndex

      public int getStreamIndex()
      Specified by:
      getStreamIndex in interface StreamReferenceHolder
    • setStreamIndex

      public void setStreamIndex(int idx)
      Specified by:
      setStreamIndex in interface StreamReferenceHolder
    • getStreamName

      public String getStreamName()
      Specified by:
      getStreamName in interface StreamReferenceHolder
    • setStreamName

      public void setStreamName(String s)
      Specified by:
      setStreamName in interface StreamReferenceHolder
    • setStreamCoord

      public void setStreamCoord(double coord)
    • getStreamCoord

      public double getStreamCoord()
    • setStreamStation

      public void setStreamStation(double coord)
    • getStreamStation

      public double getStreamStation()
    • setLocation

      public void setLocation(WorldPt pt)
    • getLocation

      public WorldPt getLocation()
    • isWithinExtents

      public boolean isWithinExtents(WorldRect extents)
    • initialize

      public void initialize()
    • getTSRecordProxies

      public Vector getTSRecordProxies()
    • getTSRecordProxyByName

      public TSRecord getTSRecordProxyByName(String name)
    • getTSArray

      public double[] getTSArray(int vid)
      returns the double array containing the time series of the record according to variable id. returns null if unsuccessful
    • getTSContainer

      public doubleArrayContainer getTSContainer(int vid)
      returns the double array containing the time series of the record according to variable id. returns null if unsuccessful
    • getTSRecordProxy

      @Deprecated public TSRecord getTSRecordProxy(String param)
      Deprecated.
    • getTSRecordProxy

      public TSRecord getTSRecordProxy(String param, boolean isInput)
    • getTSRecordProxy

      public TSRecord getTSRecordProxy(String name, String param, boolean isInput)
    • getITSDataSet

      public ITSDataSet getITSDataSet(boolean isInput)
      Description copied from interface: TSLocation2
      returns the input or output TSData set currently associated with this loation
      Specified by:
      getITSDataSet in interface TSLocation2
    • getTSDataSet

      public ITSDataSet getTSDataSet(boolean isInput)
      Description copied from interface: TSLocation
      returns the input or output TSData set currently associated with this loation
      Specified by:
      getTSDataSet in interface TSLocation
    • getTSFactor

      public double getTSFactor(String param)
    • getTSArray

      public double[] getTSArray(String param)
    • getTSArray

      public double[] getTSArray(String name, String param)
    • getTSArray

      public double[] getTSArray(String param, boolean isinput)
    • addTSRecord

      public boolean addTSRecord(String name, String param, boolean isinput)
    • removeTSRecord

      public void removeTSRecord(String name, String param, boolean isinput)
    • readData

      public boolean readData(BufferedReader input)
      Retrieves the Node data from the specified BufferedReader. Control of the file processing is passed back to the callder object once a Node End line type is found or if "Node" is not contained in the line type. The later case is an error condition.

      The data stream must have type=param formatting. The following types and parameters are defined.

      Node Name= (String) name of the Node
      Node TSRecord= (String) name, (String) parameter, (int) input flag
      Node End

      If the input flag > 0, the TSRecord is in the input TSDataSet, otherwise the TSRecord is in the output TSDataSet.

      Parameters:
      input - BufferedReader connected to the ASCII file containing the
    • assignParameter

      protected void assignParameter(String type, String param)
    • writeData

      public boolean writeData(BufferedWriter out)
    • setName

      public void setName(String name)
      echo the name change to tsproxies whose names are based on the nodes name
      Overrides:
      setName in class NamedType
    • 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