Package hec.heclib.dss
Class HecDSSUtilities
java.lang.Object
hec.heclib.dss.HecDSSFileAccess
hec.heclib.dss.HecDssCatalog
hec.heclib.dss.HecDSSDataAttributes
hec.heclib.dss.HecDataManager
hec.heclib.dss.HecDSSUtilities
- All Implemented Interfaces:
HecDssListener
,IHecDSSUtilities
,Cloneable
,EventListener
HecDSSUtilities is a
HecDataManager
with utility features
such as squeezing, and copying records between DSS files-
Nested Class Summary
Nested classes/interfaces inherited from class hec.heclib.dss.HecDssCatalog
HecDssCatalog.WriteCatalogFileRunnable
-
Field Summary
Fields inherited from class hec.heclib.dss.HecDataManager
_recordData, logFileName, messageUnit
Fields inherited from class hec.heclib.dss.HecDSSDataAttributes
_arrayEndTime, _arraySize, _arrayStartTime, _checkedNumber, _dataLengthInts, _dataType, _defaultEndTime, _defaultStartTime, _desiredArraySize, _dirty, _dssPathname, _endTime, _localUnitSystem, _recordExists, _recordType, _slashPosition, _startTime, _timeSeries, _timeWindowSet, _typeX, _unitsX, ALBERS, ALBERS_GRID, ALBERS_GRID_WITH_TIME, DOUBLE_ARRAY, ENGLISH_UNITS, ERROR, FILE, FLOAT_ARRAY, HRAP, HRAP_GRID, HRAP_GRID_WITH_TIME, IMAGE, INT_ARRAY, IRREGULAR_TIME_PATTERN, IRREGULAR_TIME_SERIES, IRREGULAR_TIME_SERIES_DOUBLES, LOCATION_LEVEL, PAIRED, PAIRED_DOUBLES, REGULAR_TIME_PATTERN, REGULAR_TIME_SERIES, REGULAR_TIME_SERIES_DOUBLES, SI_UNITS, SINGLE_VALUE, SPECIFIED_GRID, SPECIFIED_GRID_TYPE, SPECIFIED_GRID_WITH_TIME, TEXT, UNDEFINED_GRID, UNDEFINED_GRID_TYPE, UNDEFINED_GRID_WITH_TIME, UNDEFINED_UNITS, UNKNOWN
Fields inherited from class hec.heclib.dss.HecDssCatalog
_catalogName, _forceNewCatalog, _listenerList, _observerThreads, _useCollectionGroups, crcValues, dataTypeEnd, dataTypeStart, endDates, lastWriteTimeFile, lastWriteTimeRecord, listIsCollection, listIsComplete, listIsSorted, maxNumberToRetrieve, pathnameAddresses, pathnameHash, pathnameList, pathnameWithWild, startDates, statusRead, statusWanted
Fields inherited from class hec.heclib.dss.HecDSSFileAccess
_defaultDirectory, _defaultDSSFileName, _fileData, _maxNumberReopensForError, _numberReopensForError, _severeErrorIndex, _severeErrorMessages, _severeErrorRaised, ABBREVIATED_CATALOG, CONDENSED_CATALOG, FULL_CATALOG, MESS_LEVEL_CRITICAL, MESS_LEVEL_GENERAL, MESS_LEVEL_INTERNAL_DIAG_1, MESS_LEVEL_INTERNAL_DIAG_2, MESS_LEVEL_NONE, MESS_LEVEL_TERSE, MESS_LEVEL_USER_DIAG, MESS_METHOD_ALIAS, MESS_METHOD_CATALOG, MESS_METHOD_CHECK, MESS_METHOD_COPY, MESS_METHOD_FILE_CHECK, MESS_METHOD_GENERAL, MESS_METHOD_GET, MESS_METHOD_GLOBAL, MESS_METHOD_JNI, MESS_METHOD_LOCKING, MESS_METHOD_OPEN, MESS_METHOD_PERM, MESS_METHOD_PUT, MESS_METHOD_READ, MESS_METHOD_TS_READ, MESS_METHOD_TS_WRITE, MESS_METHOD_UTILITY, MESS_METHOD_WRITE
Fields inherited from interface hec.heclib.dss.IHecDSSUtilities
STATUS_OKAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
int
boolean
int
convertVersion
(String convertFileName) int
copyFile
(HecDataManager toDataManager) int
protected int
copyRecords
(int[] fromDSSTable, int[] toDSSTable, Vector pathnameList) copyRecords is used for low level record copy between two dss files.protected int
copyRecords
(int[] fromDSSTable, int[] toDSSTable, Vector pathnameListfrom, Vector pathnameListTo) copyRecords is used for low level record copy between two dss files.int
copyRecordsFrom
(HecDataManager toDataManager, List<String> pathnameList) int
copyRecordsFrom
(HecDataManager toDataManager, List<String> pathnameListFrom, List<String> pathnameListTo) int
copyRecordsFrom
(String toDSSFilename, List<String> pathnameList) copyRecordsFrom copies from HecDSSUtilities instance to the toDSSFilenameint
copyRecordsInto
(HecDataManager fromDataManager, List<String> pathnameList) int
copyRecordsInto
(String fromDSSFilename, List<String> pathnameList) int
void
dss_zquery
(String parameter, stringContainer alpha, int[] numb) void
int
duplicateRecords
(List<String> pathnameList, List<String> newPathnameList) int
fileAccessInfo
(int[] accessMode, int[] numberAccesses, int[] numberWrites, int[] pidsArray, int[] modesArray, int[] numberPids) int
getCondensedCatalog
(String[] sortedPathnames, boolean querryTimes) short[]
readRawShorts
(String pathname) int
renameRecords
(List<String> pathnameList, List<String> newPathnameList) int
squeeze()
int
squeeze
(boolean onlyIfNeeded) boolean
int
int
Methods inherited from class hec.heclib.dss.HecDataManager
addAlias, addAlias, addAlias, addAliasList, aliasGetPrimary, aliasGetPrimary, aliasList, aliasList, aliasRemove, aliasRemove, aliasRemoveList, clear, closeLogFile, closeMessageFile, convertUnitSystem, copyContainerToRecordData, copyRecordDataToContainer, displayLogFile, done, flushMessageFile, generateLogFileName, getLogFileName, getRecordInfo, getRecordInfo, getRecordInfo, getTSRecordInfo, numberArray, release, release, setLogFile, setMessageFile, setProgramName, status, windMessageFile, Xarray, Yarray, Yarray, zlocationRetrieve, zlocationStore
Methods inherited from class hec.heclib.dss.HecDSSDataAttributes
aPart, arrayEndTime, arrayStartTime, bPart, clearDefaultParts, convertDoubleUnits, convertUnits, cPart, createArrayObject, createObject, createPairedDataObject, createTextObject, createTimeSeriesObject, defaultAPart, defaultBPart, defaultCPart, defaultDPart, defaultEPart, defaultFPart, dirty, dPart, endTime, ePart, fPart, getLastWriteTime, getLastWriteTime, getLastWriteTimeMillis, getLastWriteTimeMillis, getRecordBasics, isGridRecord, isTimeWindowSet, localUnitSystem, pathname, pathnameDataType, readRawBytes, readRawBytes, readRawRecord, readRawShorts, readRawShorts, recordExists, recordsUpdated, recordType, recordType, recordTypes, setAPart, setBPart, setCPart, setDefaultAPart, setDefaultBPart, setDefaultCPart, setDefaultDPart, setDefaultEPart, setDefaultFPart, setDefaultPathnameParts, setDefaultTimeWindow, setDefaultTimeWindow, setDPart, setDSSFileName, setEndTime, setEPart, setFPart, setLocalUnitSystem, setPathname, setPathnameParts, setStartTime, setTimeWindow, setTimeWindow, startTime, writeRawRecord
Methods inherited from class hec.heclib.dss.HecDssCatalog
addHecDssListener, addHecDssListener, addHecDssListener, addHecDssListener, addHecDssListener, addHecDssListener, addHecDssListener, buildCondensedList, buildSortedCatalog, callCatalog, callCatalog, callCatalog, callCatalogOriginal, catalogFile, cleanCatalogPart, clearList, clone, compareCondensedPaths, createNewCatalog, expandPathname, fireHecDssEvent, getCatalog, getCatalog, getCatalog, getCatalogName, getCatalogSortAddresses, getCondensedCatalog, getCondensedCatalog, getEndDates, getEPartLoc, getMaximumPartLengths, getMaximumPartLengths, getPathnameList, getPathnameList, getPathnameList6, getPathnameList7, getPathnameListAndDates, getPathnameListType, getPathnames, getSortedPathnameList, getStartDates, getStatusRead, getUseCollectionGroups, hecDssEventPerformed, isCatalogValid, isPathnamePartsString, numberCatalogedRecords, pathNamePartsToRegex, processSearchParts, readCatalog, removeHecDssListener, searchDSSCatalog, searchDSSCatalog, searchDSSPaths, searchDSSPaths, setCatalogSortAddresses, setForceNewCatalog, setMaxNumberToRetrieve, setPathnameList, setPathnameList, setPathWithWildChars, setStatusWanted, setTypeWanted, setUseCollectionGroups, sort, sortCatalog, startObserverThread, whatChanged, whatChanged, whatChangedCompare, whatChangedSetStart, whatChangedSetStart, whatChangedSetStart, wildCharsToRegex, writeCatalog
Methods inherited from class hec.heclib.dss.HecDSSFileAccess
allSevereErrorMessages, appendNameToDirectory, catchSevereErrors, checkAccessReset, checkAllPathnames, checkForError, checkForSevereError, checkForSevereError, checkForSevereFileError, checkLinks, checkPathnameBins, checkSystemError, cleanDSSFileName, clearError, clearSevereError, clearSevereError, clearStatus, close, close, closeAll, closeAllFiles, closeAndClear, closeDSSFile, debugLook, debugLook7, debugModify, defaultDirectory, defaultDSSFileName, doesDSSFileExist, DSSFileName, fileAccessible, fileOpened, fileStatus, flushMessages, forceMultiUserAccess, getCollectionList, getCollectionSequenceList, getCollectionSize, getDssFileVersion, getDssFileVersion, getFileInfo, getFileLastWriteTime, getFileLastWriteTimeMillis, getIrregBeginningDate, getLastError, getMessageLevel, getNumberRecords, getProcessStatus, getTimeSeriesExtents, getTSRecordInfo, isFileRemote, lastSevereErrorMessage, nextTimeSeriesPathname, numberRecords, open, open, processStatus, requestSecondAccess, setDefaultDirectory, setDefaultDSSFileName, setDss, setDSSFileName, setDSSFileName, setDSSFileName, setInterrupt, setMessageLevel, setSpaceReclaimation, setSpaceReclaimationPerm, setUnit, writeAccess, zgetMessageLevel, zinqir, zinqir, zinquire, zmessage, zquery, zquery, zset, zsetFile, zsetMessageLevel
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hec.heclib.dss.IHecDSSUtilities
allSevereErrorMessages, checkAllPathnames, checkForError, checkLinks, checkPathnameBins, clearError, clearSevereError, clearStatus, close, createNewCatalog, delete, done, DSSFileName, fileAccessible, fileOpened, forceMultiUserAccess, getCatalogName, getDssFileVersion, getPathnameList, getProcessStatus, getTimeSeriesExtents, getTSRecordInfo, isCatalogValid, lastSevereErrorMessage, nextTimeSeriesPathname, numberRecords, open, recordExists, recordType, recordTypes, searchDSSCatalog, searchDSSPaths, setDSSFileName, setDSSFileName, setForceNewCatalog, setInterrupt, setPathname, writeAccess, zinqir, zinqir
-
Constructor Details
-
HecDSSUtilities
public HecDSSUtilities()
-
-
Method Details
-
fileAccessInfo
public int fileAccessInfo(int[] accessMode, int[] numberAccesses, int[] numberWrites, int[] pidsArray, int[] modesArray, int[] numberPids) -
fileStats
public int fileStats()- Specified by:
fileStats
in interfaceIHecDSSUtilities
-
checkFile
public int checkFile() -
delete
- Specified by:
delete
in interfaceIHecDSSUtilities
-
getDeletedRecords
-
undelete
- Specified by:
undelete
in interfaceIHecDSSUtilities
-
undoLastDelete
public int undoLastDelete()- Specified by:
undoLastDelete
in interfaceIHecDSSUtilities
-
copyRecordsInto
-
copyRecordsInto
- Specified by:
copyRecordsInto
in interfaceIHecDSSUtilities
-
copyRecordsFrom
-
copyRecordsFrom
public int copyRecordsFrom(HecDataManager toDataManager, List<String> pathnameListFrom, List<String> pathnameListTo) -
copyRecordsFrom
Description copied from interface:IHecDSSUtilities
copyRecordsFrom copies from HecDSSUtilities instance to the toDSSFilename- Specified by:
copyRecordsFrom
in interfaceIHecDSSUtilities
- Parameters:
toDSSFilename
- destination of recordspathnameList
- list of paths to copy- Returns:
- returns the number of records copied.
-
copyFile
-
copyFile
- Specified by:
copyFile
in interfaceIHecDSSUtilities
-
getLastDeletePathnames
- Specified by:
getLastDeletePathnames
in interfaceIHecDSSUtilities
-
copyRecords
copyRecords is used for low level record copy between two dss files.- Parameters:
fromDSSTable
-toDSSTable
-pathnameList
-- Returns:
- returns the number of records copied.
-
copyRecords
protected int copyRecords(int[] fromDSSTable, int[] toDSSTable, Vector pathnameListfrom, Vector pathnameListTo) copyRecords is used for low level record copy between two dss files. WARNING: if the dss files are different versions grid records are not copied (grids are copied in calling method copyRecords(HecDataManager src,HecDataManager dest,....)- Parameters:
fromDSSTable
- source dss ifltabtoDSSTable
- destination ifltabpathnameListfrom
- list of paths in sourcepathnameListTo
- path name to save in destination- Returns:
- returns the number of records copied.
-
duplicateRecords
- Specified by:
duplicateRecords
in interfaceIHecDSSUtilities
-
renameRecords
- Specified by:
renameRecords
in interfaceIHecDSSUtilities
-
convertVersion
-
squeeze
public int squeeze()- Specified by:
squeeze
in interfaceIHecDSSUtilities
-
squeeze
public int squeeze(boolean onlyIfNeeded) -
cancelSqueeze
public int cancelSqueeze()- Specified by:
cancelSqueeze
in interfaceIHecDSSUtilities
-
squeezeNeeded
public boolean squeezeNeeded() -
cancelProcess
public void cancelProcess()- Specified by:
cancelProcess
in interfaceIHecDSSUtilities
-
getCondensedCatalog
- Specified by:
getCondensedCatalog
in interfaceIHecDSSUtilities
-
getCondensedCatalog
public Vector<CondensedReference> getCondensedCatalog(String[] sortedPathnames, boolean querryTimes) -
checkForSevereDssError
public boolean checkForSevereDssError()- Specified by:
checkForSevereDssError
in interfaceIHecDSSUtilities
-
readRawShorts
- Specified by:
readRawShorts
in interfaceIHecDSSUtilities
-
dss_zset
- Specified by:
dss_zset
in interfaceIHecDSSUtilities
-
dss_zquery
- Specified by:
dss_zquery
in interfaceIHecDSSUtilities
-