Package hec.rss.model.globalvariable
Class BaseAltGlobalData
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.globalvariable.BaseAltGlobalData
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,GlobalVariableData,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
- Direct Known Subclasses:
AltExternalGlobalData,AltScalarGlobalData,AltStringGlobalData,AltTableGlobalData
- 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 TypeMethodDescriptionprotected booleancanCoerceValue(Object value) clone()Creates a new object of the same class as this object.booleancopyInto(GlobalVariableData copyFromGv) copy into this GlobalVariableData the contents from copyFromGvbooleanIndicates whether some other object is "equal to" this one.protected booleanmethod for subclasses to override to finsih reading dataprotected booleanfinishWritingData(String alternateDssFile) method for subclasses that need to do more than just the standard write dataprotected ObjectgetCoercedValue(Object value) protected StringgetDSSPathname(boolean update) getRelativePath(String pathName) abstract GlobalVariableTypegetType()getValue()inthashCode()Returns a hash code value for the object.booleanbooleanloadData()voidmarkForDelete(boolean markedForDelete) protected voidparseGVRecord(String type, String param) booleanreadData(BufferedReader input) booleanreadDssData(String dssFile, String dssPath) protected Stringprotected StringreadDssTextValue(String dssFile, String dssPath) voidsetDSSFilename(String name) voidsetDSSPathname(String dssPathname) voidsetGlobalVariable(GlobalVariable globalVariable) voidsetGVDataSet(GVDataSet gvDataSet) voidprotected voidbooleanwriteData(BufferedWriter out, String alternateDssFile) abstract booleanwriteDssData(String alternateDssFile) protected booleanwriteDssTextValue(String alternateDssFile, Object value) Methods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getFieldObject, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setFieldObject, 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
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.rss.model.globalvariable.GlobalVariableData
getDescription, getIndex, getName, setDescription, setIndex, setName
-
Field Details
-
_value
-
_globalVariable
-
-
Constructor Details
-
BaseAltGlobalData
public BaseAltGlobalData() -
BaseAltGlobalData
- Parameters:
gv-value-
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceGlobalVariableData
-
getType
- Specified by:
getTypein interfaceGlobalVariableData
-
setValue
- Specified by:
setValuein interfaceGlobalVariableData- Parameters:
value-
-
getCoercedValue
- Parameters:
value-- Returns:
-
canCoerceValue
- Parameters:
value-- Returns:
-
getDSSFilename
- Specified by:
getDSSFilenamein interfaceGlobalVariableData- Returns:
-
setDSSFilename
- Specified by:
setDSSFilenamein interfaceGlobalVariableData- Parameters:
name-
-
getRelativePath
- Parameters:
pathName-- Returns:
-
setGVDataSet
- Specified by:
setGVDataSetin interfaceGlobalVariableData
-
getGVDataSet
- Specified by:
getGVDataSetin interfaceGlobalVariableData- Returns:
-
getDSSPathname
- Specified by:
getDSSPathnamein interfaceGlobalVariableData
-
getDSSPathname
-
setDSSPathname
- Specified by:
setDSSPathnamein interfaceGlobalVariableData- Parameters:
dssPathname-
-
getDssEPart
-
writeDssTextValue
- Parameters:
value-- Returns:
-
loadData
public boolean loadData()- Specified by:
loadDatain interfaceGlobalVariableData- Returns:
- - true if successfully loaded
-
readDssData
- Specified by:
readDssDatain interfaceGlobalVariableData
-
readDssTextValue
- Returns:
-
readDssTextValue
-
writeData
- Specified by:
writeDatain interfaceGlobalVariableData- Parameters:
out- BufferedWriter to write toalternateDssFile- an alternative DSS File to write to. Can be null, which if so use getDSSFilename()- Returns:
- true if successful
-
writeAdditionalInfo
- Parameters:
out-- Throws:
IOException
-
readData
- Specified by:
readDatain interfaceGlobalVariableData- Parameters:
input- - buffered reader to read from- Returns:
- - true if successfully read
-
parseGVRecord
- Parameters:
type-param-
-
writeDssData
- Specified by:
writeDssDatain interfaceGlobalVariableData
-
finishWritingData
method for subclasses that need to do more than just the standard write data- Returns:
- true for success
-
finishReadingData
protected boolean finishReadingData()method for subclasses to override to finsih reading data- Returns:
- true for success
-
setGlobalVariable
- Specified by:
setGlobalVariablein interfaceGlobalVariableData- Parameters:
globalVariable- - the network global variable associated with this data
-
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 interfaceGlobalVariableData- Overrides:
clonein classNamedType
-
getGlobalVariableDataLocation
- Specified by:
getGlobalVariableDataLocationin interfaceGlobalVariableData
-
copyInto
Description copied from interface:GlobalVariableDatacopy into this GlobalVariableData the contents from copyFromGv- Specified by:
copyIntoin interfaceGlobalVariableData- Parameters:
copyFromGv-
-
markForDelete
public void markForDelete(boolean markedForDelete) - Specified by:
markForDeletein interfaceGlobalVariableData
-
isMarkedForDeletion
public boolean isMarkedForDeletion()- Specified by:
isMarkedForDeletionin interfaceGlobalVariableData
-
equals
Indicates whether some other object is "equal to" this one. same class type and same name -
hashCode
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.
-