Package hec.heclib.dss
Class HecDSSDataAttributes
java.lang.Object
hec.heclib.dss.HecDSSFileAccess
hec.heclib.dss.HecDssCatalog
hec.heclib.dss.HecDSSDataAttributes
- All Implemented Interfaces:
HecDssListener
,Cloneable
,EventListener
- Direct Known Subclasses:
HecDataManager
HecDSSDataAttributes contains various data utility methods and constants.
includes: data type and other constants, path utilities, factory methods for IO objects,
and time window methods.
-
Nested Class Summary
Nested classes/interfaces inherited from class hec.heclib.dss.HecDssCatalog
HecDssCatalog.WriteCatalogFileRunnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HecTime
protected int
protected HecTime
protected int
protected int
protected int
protected static HecTime
protected static HecTime
protected int
protected boolean
protected DSSPathname
protected HecTime
protected int
protected boolean
protected int
protected int[]
protected HecTime
protected boolean
protected boolean
protected String
protected String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaPart()
bPart()
static void
static int
convertDoubleUnits
(double[] data, int number, int fromUnits, int toUnits) static int
convertUnits
(double[] data, int number, int fromUnitSyst, int toUnitSyst, stringContainer units) cPart()
createArrayObject
(String pathname) createObject
(String pathname) createPairedDataObject
(String pathname) createTextObject
(String pathname) createTimeSeriesObject
(String pathname) static String
static String
static String
static String
static String
static String
boolean
dirty()
dPart()
endTime()
ePart()
fPart()
getLastWriteTime
(String pathname) long
long
getLastWriteTimeMillis
(String pathname) boolean
isGridRecord
(String pathname) Determines if record for the given pathname is represents a grid.boolean
int
pathname()
static int
pathnameDataType
(String pathname) Tries to determine data type quickly from pathname only, without accessing the DSS file.byte[]
byte[]
readRawBytes
(int[] internalHeader, int limitInternalHeader, int[] numberInternalHeader, int[] compressionHeader, int limitCompressionHeader, int[] numberCompressionHeader, int[] userHeader, int limitUserHeader, int[] numberUserHeader, int[] stat) int
readRawRecord
(RawContainer rawContainer, boolean getLengthsOnly) short[]
short[]
readRawShorts
(int[] internalHeader, int limitInternalHeader, int[] numberInternalHeader, int[] compressionHeader, int limitCompressionHeader, int[] numberCompressionHeader, int[] userHeader, int limitUserHeader, int[] numberUserHeader, int[] stat) boolean
recordExists
(String pathname) int
recordsUpdated
(long startTime, List<String> pathnames, List<Long> updateTimes, List<Integer> recordTypes) Retrieves infomation about record updated since the specified time.int
int
recordType
(String pathname) recordTypes
(String[] pathnames) void
void
void
static void
setDefaultAPart
(String partName) static void
setDefaultBPart
(String partName) static void
setDefaultCPart
(String partName) static void
setDefaultDPart
(String partName) static int
setDefaultEPart
(String partName) static void
setDefaultFPart
(String partName) int
setDefaultPathnameParts
(String pathnameParts) void
setDefaultTimeWindow
(HecTime startTime, HecTime endTime) int
setDefaultTimeWindow
(String userLine) void
int
setDSSFileName
(String dssFileName, boolean fileMustExist) void
setEndTime
(HecTime endTime) int
void
void
setLocalUnitSystem
(int localUnitSystem) int
setPathname
(String path) int
setPathnameParts
(String pathnameParts) void
setStartTime
(HecTime startTime) void
setTimeWindow
(HecTime startTime, HecTime endTime) int
setTimeWindow
(String userLine) void
status()
int
writeRawRecord
(RawContainer rawContainer) 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, done, 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
-
Field Details
-
ERROR
public static final int ERROR- See Also:
-
UNKNOWN
public static final int UNKNOWN- See Also:
-
INT_ARRAY
public static final int INT_ARRAY- See Also:
-
FLOAT_ARRAY
public static final int FLOAT_ARRAY- See Also:
-
DOUBLE_ARRAY
public static final int DOUBLE_ARRAY- See Also:
-
LOCATION_LEVEL
public static final int LOCATION_LEVEL- See Also:
-
REGULAR_TIME_SERIES
public static final int REGULAR_TIME_SERIES- See Also:
-
REGULAR_TIME_PATTERN
public static final int REGULAR_TIME_PATTERN- See Also:
-
REGULAR_TIME_SERIES_DOUBLES
public static final int REGULAR_TIME_SERIES_DOUBLES- See Also:
-
IRREGULAR_TIME_SERIES
public static final int IRREGULAR_TIME_SERIES- See Also:
-
IRREGULAR_TIME_PATTERN
public static final int IRREGULAR_TIME_PATTERN- See Also:
-
IRREGULAR_TIME_SERIES_DOUBLES
public static final int IRREGULAR_TIME_SERIES_DOUBLES- See Also:
-
PAIRED
public static final int PAIRED- See Also:
-
PAIRED_DOUBLES
public static final int PAIRED_DOUBLES- See Also:
-
TEXT
public static final int TEXT- See Also:
-
SINGLE_VALUE
public static final int SINGLE_VALUE- See Also:
-
UNDEFINED_GRID_WITH_TIME
public static final int UNDEFINED_GRID_WITH_TIME- See Also:
-
UNDEFINED_GRID
public static final int UNDEFINED_GRID- See Also:
-
UNDEFINED_GRID_TYPE
public static final int UNDEFINED_GRID_TYPE- See Also:
-
HRAP_GRID_WITH_TIME
public static final int HRAP_GRID_WITH_TIME- See Also:
-
HRAP_GRID
public static final int HRAP_GRID- See Also:
-
HRAP
public static final int HRAP- See Also:
-
ALBERS_GRID_WITH_TIME
public static final int ALBERS_GRID_WITH_TIME- See Also:
-
ALBERS_GRID
public static final int ALBERS_GRID- See Also:
-
ALBERS
public static final int ALBERS- See Also:
-
SPECIFIED_GRID_WITH_TIME
public static final int SPECIFIED_GRID_WITH_TIME- See Also:
-
SPECIFIED_GRID
public static final int SPECIFIED_GRID- See Also:
-
SPECIFIED_GRID_TYPE
public static final int SPECIFIED_GRID_TYPE- See Also:
-
FILE
public static final int FILE- See Also:
-
IMAGE
public static final int IMAGE- See Also:
-
UNDEFINED_UNITS
public static final int UNDEFINED_UNITS- See Also:
-
ENGLISH_UNITS
public static final int ENGLISH_UNITS- See Also:
-
SI_UNITS
public static final int SI_UNITS- See Also:
-
_defaultStartTime
-
_defaultEndTime
-
_dssPathname
-
_dirty
protected boolean _dirty -
_slashPosition
protected int[] _slashPosition -
_startTime
-
_endTime
-
_arrayStartTime
-
_arrayEndTime
-
_timeWindowSet
protected boolean _timeWindowSet -
_arraySize
protected int _arraySize -
_desiredArraySize
protected int _desiredArraySize -
_recordType
protected int _recordType -
_checkedNumber
protected int _checkedNumber -
_dataLengthInts
protected int _dataLengthInts -
_dataType
protected int _dataType -
_localUnitSystem
protected int _localUnitSystem -
_recordExists
protected boolean _recordExists -
_timeSeries
protected boolean _timeSeries -
_unitsX
-
_typeX
-
-
Constructor Details
-
HecDSSDataAttributes
public HecDSSDataAttributes()
-
-
Method Details
-
createObject
-
createTimeSeriesObject
-
createPairedDataObject
-
createTextObject
-
createArrayObject
-
setDSSFileName
- Overrides:
setDSSFileName
in classHecDSSFileAccess
-
setDefaultAPart
-
setDefaultBPart
-
setDefaultCPart
-
setDefaultDPart
-
setDefaultEPart
-
setDefaultFPart
-
clearDefaultParts
public static void clearDefaultParts() -
defaultAPart
-
defaultBPart
-
defaultCPart
-
defaultDPart
-
defaultEPart
-
defaultFPart
-
aPart
-
bPart
-
cPart
-
dPart
-
ePart
-
fPart
-
pathname
- Overrides:
pathname
in classHecDssCatalog
-
setAPart
-
setBPart
-
setCPart
-
setDPart
-
setEPart
-
setFPart
-
setPathname
-
setPathnameParts
-
setDefaultPathnameParts
-
dirty
public boolean dirty() -
pathnameDataType
Tries to determine data type quickly from pathname only, without accessing the DSS file. This is meant to be quick For a more comprehensive and accurate value, use recordType.- Parameters:
pathname
- String- Returns:
- int
-
recordsUpdated
public int recordsUpdated(long startTime, List<String> pathnames, List<Long> updateTimes, List<Integer> recordTypes) Retrieves infomation about record updated since the specified time.Any of the vector parameters may be null if that information is not required. Any of the vectors that are not null are cleared before being populated.
- Parameters:
startTime
- Time after which to report updated records - in Java millisecondspathnames
- The list of pathnames of the records that have been updated - may be null.updateTimes
- The list of update times of the records that have been updated - may be null.recordTypes
- The list of types of the records that have been updated - may be null.- Returns:
- Zero if successful.
-
recordTypes
-
recordType
-
recordType
public int recordType() -
isGridRecord
Determines if record for the given pathname is represents a grid.- Parameters:
pathname
-- Returns:
-
recordExists
-
getLastWriteTimeMillis
public long getLastWriteTimeMillis() -
getLastWriteTimeMillis
-
getLastWriteTime
-
getLastWriteTime
-
getRecordBasics
-
setStartTime
-
setEndTime
-
setTimeWindow
-
setTimeWindow
-
setDefaultTimeWindow
-
setDefaultTimeWindow
-
startTime
-
arrayStartTime
-
endTime
-
arrayEndTime
-
isTimeWindowSet
public boolean isTimeWindowSet() -
setLocalUnitSystem
public void setLocalUnitSystem(int localUnitSystem) -
localUnitSystem
public int localUnitSystem() -
convertUnits
public static int convertUnits(double[] data, int number, int fromUnitSyst, int toUnitSyst, stringContainer units) -
convertDoubleUnits
public static int convertDoubleUnits(double[] data, int number, int fromUnits, int toUnits) -
status
public void status() -
readRawBytes
public byte[] readRawBytes() -
readRawBytes
public byte[] readRawBytes(int[] internalHeader, int limitInternalHeader, int[] numberInternalHeader, int[] compressionHeader, int limitCompressionHeader, int[] numberCompressionHeader, int[] userHeader, int limitUserHeader, int[] numberUserHeader, int[] stat) -
readRawRecord
-
writeRawRecord
-
readRawShorts
public short[] readRawShorts() -
readRawShorts
public short[] readRawShorts(int[] internalHeader, int limitInternalHeader, int[] numberInternalHeader, int[] compressionHeader, int limitCompressionHeader, int[] numberCompressionHeader, int[] userHeader, int limitUserHeader, int[] numberUserHeader, int[] stat)
-