Package hec.model
Class Node
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.model.Node
- All Implemented Interfaces:
AsciiSerializable
,FieldAccessor
,StreamReferenceHolder
,TSLocation
,TSLocation2
,Serializable
,Cloneable
,Comparable
,Observer
,Modifiable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WorldPt
protected TsRecordContainer
protected double
protected StreamElement
protected double
protected int
protected String
protected Vector
static final int
static final int
Fields 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 TypeMethodDescriptionboolean
addTSRecord
(String name, String param, boolean isinput) protected void
assignParameter
(String type, String param) getFieldObject
(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.getITSDataSet
(boolean isInput) returns the input or output TSData set currently associated with this loationdouble
int
double
double[]
getTSArray
(int vid) returns the double array containing the time series of the record according to variable id.double[]
getTSArray
(String param) double[]
getTSArray
(String param, boolean isinput) double[]
getTSArray
(String name, String param) getTSContainer
(int vid) returns the double array containing the time series of the record according to variable id.getTSDataSet
(boolean isInput) returns the input or output TSData set currently associated with this loationdouble
getTSFactor
(String param) getTSRecordProxy
(String param) Deprecated.getTSRecordProxy
(String param, boolean isInput) getTSRecordProxy
(String name, String param, boolean isInput) getTSRecordProxyByName
(String name) void
boolean
isWithinExtents
(WorldRect extents) boolean
readData
(BufferedReader input) Retrieves the Node data from the specified BufferedReader.void
removeTSRecord
(String name, String param, boolean isinput) boolean
setFieldObject
(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.void
setLocation
(WorldPt pt) void
void
echo the name change to tsproxies whose names are based on the nodes namevoid
void
setStreamCoord
(double coord) void
setStreamIndex
(int idx) void
void
setStreamStation
(double coord) boolean
writeData
(BufferedWriter out) Methods inherited from class hec.lang.NamedType
addModifiableListener, clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setValid, toString, update, useRecursiveModifiedTest
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Field Details
-
OUTFLOW
public static final int OUTFLOW- See Also:
-
INFLOW
public static final int INFLOW- See Also:
-
_manager
-
_tsrecordVector
-
_location
-
_streamIndex
protected int _streamIndex -
_stream
-
_streamName
-
_station
protected double _station -
_streamCoord
protected double _streamCoord
-
-
Constructor Details
-
Node
public Node() -
Node
-
-
Method Details
-
setManager
-
setStream
-
getStreamIndex
public int getStreamIndex()- Specified by:
getStreamIndex
in interfaceStreamReferenceHolder
-
setStreamIndex
public void setStreamIndex(int idx) - Specified by:
setStreamIndex
in interfaceStreamReferenceHolder
-
getStreamName
- Specified by:
getStreamName
in interfaceStreamReferenceHolder
-
setStreamName
- Specified by:
setStreamName
in interfaceStreamReferenceHolder
-
setStreamCoord
public void setStreamCoord(double coord) -
getStreamCoord
public double getStreamCoord() -
setStreamStation
public void setStreamStation(double coord) -
getStreamStation
public double getStreamStation() -
setLocation
-
getLocation
-
isWithinExtents
-
initialize
public void initialize() -
getTSRecordProxies
-
getTSRecordProxyByName
-
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
returns the double array containing the time series of the record according to variable id. returns null if unsuccessful -
getTSRecordProxy
Deprecated. -
getTSRecordProxy
-
getTSRecordProxy
-
getITSDataSet
Description copied from interface:TSLocation2
returns the input or output TSData set currently associated with this loation- Specified by:
getITSDataSet
in interfaceTSLocation2
-
getTSDataSet
Description copied from interface:TSLocation
returns the input or output TSData set currently associated with this loation- Specified by:
getTSDataSet
in interfaceTSLocation
-
getTSFactor
-
getTSArray
-
getTSArray
-
getTSArray
-
addTSRecord
-
removeTSRecord
-
readData
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 EndIf 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
-
writeData
-
setName
echo the name change to tsproxies whose names are based on the nodes name -
getFieldObject
Description copied from interface:FieldAccessor
This method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObject
in interfaceFieldAccessor
- Overrides:
getFieldObject
in classNamedType
- Parameters:
fld
- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessor
This allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObject
in interfaceFieldAccessor
- Overrides:
setFieldObject
in 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
-