Package hec.rss.model
Class XMLManager
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.clientapp.model.Manager
hec.rss.model.XMLManager
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,LockableObject,MessagePrinter,TsRecordContainer,Serializable,Cloneable,Comparable,Observer,mil.army.usace.hec.rmi.csinterface.CallBackInterface,rma.lang.Modifiable
- Direct Known Subclasses:
ReportIntervalManager
- See Also:
-
Field Summary
Fields inherited from class hec.clientapp.model.Manager
_callBack, _dssFileManagerWrapper, _identifier, _lastModifiedTime, _modifiableListeners, _proxyList, _readOnly, _reloadFailed, _reloadOk, _uiWrapper, _userInterface, _wkspPath, _Workspace, LASTMODIFIED_STRINGFields 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 TypeMethodDescriptionvoidinit()protected voidloadDescription(org.jdom.Element descElem) set the NamedType's description from theElementdescElem.protected abstract booleanloadDocument(org.jdom.Document doc) booleanreadFile(Identifier id) protected voidsaveDescription(org.jdom.Element parent) save the NamedType's description.protected booleansaveDocument(org.jdom.Document doc, HecFile file) save the XML Document doc to the File fileMethods inherited from class hec.clientapp.model.Manager
addModifiableListener, backupFile, computeComplete, copyFile, deleteFile, deleting, finalize, getCallback, getCommonDataList, getDirectory, getDSSFileManager, getDSSFileManagerWrapper, getFieldObject, getFileManager, getFilename, getGmtOffset, getIdentifier, getInputITSDataSet, getInputTSDataSet, getLastModifiedTime, getLastModifiedTimeString, getModTime, getModTime, getOutputITSDataSet, getOutputTSDataSet, getPath, getProxyList, getReadOnly, getRelativePath, getReloadOk, getSaveAsId, getSaveAsId, getUnitSystem, getUserInterface, getWorkspace, getWorkspacePath, hasLock, isCanceled, isForecastManager, loadComplete, loadSaveAsFile, makeAbsolutePath, makeAbsolutePath, makeAbsolutePathFromWatershed, makeRelativePath, makeRelativePathFromWatershed, modifiyForSaveAs, newFile, newTSRecordProxy, newTSRecordProxy, notify, notifyModifiableListeners, openFile, printErrorMessage, printLogMessage, printMessage, printSeparator, printStatus, printTableRow, printWarningMessage, refreshData, reLoadChildManagers, reLoadFile, reLoadFile, removeCallBack, removeModifiableListener, renamed, saveChildManagers, saveManager, saveManagerAs, saveManagerAs, setFieldObject, setIdentifier, setLastModifiedTime, setLastModifiedTime, setLineAttributes, setLocked, setManagersModifiedTime, setModified, setModifiedFalse, setPath, setProgress, setProxyList, setReadOnly, setReloadOk, setUserInterface, setUserInterface, setWorkspace, toString, unloading, writeFile, writeLastModTimeMethods inherited from class hec.lang.NamedType
clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, setValid, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface rma.lang.Modifiable
isModified
-
Constructor Details
-
XMLManager
public XMLManager()
-
-
Method Details
-
init
public void init() -
saveDescription
protected void saveDescription(org.jdom.Element parent) save the NamedType's description. This saves the description as an Element with each line of description stored as a child Element. XML doesn't preserve the newlines when just an attribute is used.- Parameters:
parent- the parent to add the description Element to.
-
loadDescription
protected void loadDescription(org.jdom.Element descElem) set the NamedType's description from theElementdescElem.- Parameters:
descElem- theElementthat holds the NamedType's description as created bysaveDescription(Element)
-
saveDocument
save the XML Document doc to the File file- Parameters:
doc- XML Document to savefile- RMAFile to save to- Returns:
- true if the document was written successfully.
-
readFile
-
loadDocument
protected abstract boolean loadDocument(org.jdom.Document doc) - Parameters:
doc-- Returns:
-