Class HecDss

java.lang.Object
hec.hecmath.DSSFile
hec.heclib.dss.HecDss
Direct Known Subclasses:
HecDss

public class HecDss extends DSSFile
HecDss objects are used to retrieve and store data sets in a DSS file, as well as several utility functions for DSS files. Data is retrieved and stored using DataContainers. DataContainers are simple classes that are database independent and are how most Hec classes exchange data.
  • Constructor Details

  • Method Details

    • open

      public static HecDss open(String dssFileName) throws Exception
      Throws:
      Exception
    • open

      public static HecDss open(String dssFileName, int dssVersion) throws Exception
      Throws:
      Exception
    • open

      public static HecDss open(String dssFileName, String timeWindow) throws Exception
      Throws:
      Exception
    • open

      public static HecDss open(String dssFileName, String startTime, String endTime) throws Exception
      Throws:
      Exception
    • open

      public static HecDss open(String dssFileName, boolean mustExist) throws Exception
      Throws:
      Exception
    • open

      public static HecDss open(String dssFileName, boolean mustExist, boolean isRemote) throws Exception
      Throws:
      Exception
    • open

      public static HecDss open(String dssFileName, boolean mustExist, boolean isRemote, int dssVersion) throws Exception
      Throws:
      Exception
    • getDssFilename

      public static boolean getDssFilename(String inputFilename, stringContainer outputFilename, boolean alwaysGetCanonical) throws IOException
      Retrieves the path for an input DSS file name, adding the ".dss" extension if necessary
      Parameters:
      inputFilename - The relative or absolute path of a DSS file, with or without the extension
      outputFilename - The (possibly absolute) path of the DSS file with the extension
      alwaysGetCanonical - Specifies whether to retrieve the absolute path for the DSS file even if the file doesn't exist.
      Returns:
      Whether the DSS file exists
      Throws:
      IOException
    • isOpened

      public boolean isOpened()
    • get

      public DataContainer get(String pathname) throws Exception
      Throws:
      Exception
    • get

      public DataContainer get(String pathname, String startTime, String endTime) throws Exception
      Throws:
      Exception
    • get

      public DataContainer get(String pathname, boolean readEntireSet) throws Exception
      Throws:
      Exception
    • get

      public DataContainer get(DSSIdentifier dssId) throws Exception
      Throws:
      Exception
    • get

      protected DataContainer get(DataReference dataSet) throws Exception
      Throws:
      Exception
    • put

      public void put(DataContainer dataContainer) throws Exception
      Throws:
      Exception
    • put

      public void put(DataContainerTransformer rsc) throws Exception
      Throws:
      Exception
    • getTimeSeriesExtents

      public boolean getTimeSeriesExtents(String pathname, HecTime start, HecTime end)
      Gets the time of the first data and last data in a data set, (not just a single pathname)
      Parameters:
      pathname - String
      start - HecTime - time of first piece of data
      end - HecTime - time of last piece of data
      Returns:
      boolean - true if found and time series; false if not TS
    • recordExists

      public boolean recordExists(String pathname)
      Description copied from class: DSSFile
      check to see if the record specified by pathname exists in this file
      Overrides:
      recordExists in class DSSFile
      Parameters:
      pathname - the DSS pathname to check
      Returns:
      true if the record exists.
    • getPathnameList

      public Vector getPathnameList()
      Gets a unsorted list of all pathnames in the file (This can be time consuming, so don't do often)
      Returns:
      Vector of strings with pathnames
    • getCondensedCatalog

      public List<CondensedReference> getCondensedCatalog()
      Returns a condensed list of pathnames in the file This means that each data set is in one data reference, which spans all time for that set, regardless of the number of records. This is very intensive, requiring sorting and such, so use sparingly
      Returns:
      Vector
    • checkForError

      protected void checkForError() throws Exception
      Throws:
      Exception