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 WorldPtprotected TsRecordContainerprotected doubleprotected StreamElementprotected doubleprotected intprotected Stringprotected Vectorstatic final intstatic final intFields 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 TypeMethodDescriptionbooleanaddTSRecord(String name, String param, boolean isinput) protected voidassignParameter(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 loationdoubleintdoubledouble[]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 loationdoublegetTSFactor(String param) getTSRecordProxy(String param) Deprecated.getTSRecordProxy(String param, boolean isInput) getTSRecordProxy(String name, String param, boolean isInput) getTSRecordProxyByName(String name) voidbooleanisWithinExtents(WorldRect extents) booleanreadData(BufferedReader input) Retrieves the Node data from the specified BufferedReader.voidremoveTSRecord(String name, String param, boolean isinput) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetLocation(WorldPt pt) voidvoidecho the name change to tsproxies whose names are based on the nodes namevoidvoidsetStreamCoord(double coord) voidsetStreamIndex(int idx) voidvoidsetStreamStation(double coord) booleanwriteData(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, useRecursiveModifiedTestMethods 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:
getStreamIndexin interfaceStreamReferenceHolder
-
setStreamIndex
public void setStreamIndex(int idx) - Specified by:
setStreamIndexin interfaceStreamReferenceHolder
-
getStreamName
- Specified by:
getStreamNamein interfaceStreamReferenceHolder
-
setStreamName
- Specified by:
setStreamNamein 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:TSLocation2returns the input or output TSData set currently associated with this loation- Specified by:
getITSDataSetin interfaceTSLocation2
-
getTSDataSet
Description copied from interface:TSLocationreturns the input or output TSData set currently associated with this loation- Specified by:
getTSDataSetin 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: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
-