Class HecDSSUtilities

All Implemented Interfaces:
HecDssListener, IHecDSSUtilities, Cloneable, EventListener

public class HecDSSUtilities extends HecDataManager implements IHecDSSUtilities
HecDSSUtilities is a HecDataManager with utility features such as squeezing, and copying records between DSS files
  • 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 interface IHecDSSUtilities
    • checkFile

      public int checkFile()
    • delete

      public int delete(List<String> pathnameList)
      Specified by:
      delete in interface IHecDSSUtilities
    • getDeletedRecords

      public List<String> getDeletedRecords()
    • undelete

      public int undelete(List<String> pathnames)
      Specified by:
      undelete in interface IHecDSSUtilities
    • undoLastDelete

      public int undoLastDelete()
      Specified by:
      undoLastDelete in interface IHecDSSUtilities
    • copyRecordsInto

      public int copyRecordsInto(HecDataManager fromDataManager, List<String> pathnameList)
    • copyRecordsInto

      public int copyRecordsInto(String fromDSSFilename, List<String> pathnameList)
      Specified by:
      copyRecordsInto in interface IHecDSSUtilities
    • copyRecordsFrom

      public int copyRecordsFrom(HecDataManager toDataManager, List<String> pathnameList)
    • copyRecordsFrom

      public int copyRecordsFrom(HecDataManager toDataManager, List<String> pathnameListFrom, List<String> pathnameListTo)
    • copyRecordsFrom

      public int copyRecordsFrom(String toDSSFilename, List<String> pathnameList)
      Description copied from interface: IHecDSSUtilities
      copyRecordsFrom copies from HecDSSUtilities instance to the toDSSFilename
      Specified by:
      copyRecordsFrom in interface IHecDSSUtilities
      Parameters:
      toDSSFilename - destination of records
      pathnameList - list of paths to copy
      Returns:
      returns the number of records copied.
    • copyFile

      public int copyFile(HecDataManager toDataManager)
    • copyFile

      public int copyFile(String toDSSFilename)
      Specified by:
      copyFile in interface IHecDSSUtilities
    • getLastDeletePathnames

      public Vector getLastDeletePathnames()
      Specified by:
      getLastDeletePathnames in interface IHecDSSUtilities
    • copyRecords

      protected int copyRecords(int[] fromDSSTable, int[] toDSSTable, Vector pathnameList)
      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 ifltab
      toDSSTable - destination ifltab
      pathnameListfrom - list of paths in source
      pathnameListTo - path name to save in destination
      Returns:
      returns the number of records copied.
    • duplicateRecords

      public int duplicateRecords(List<String> pathnameList, List<String> newPathnameList)
      Specified by:
      duplicateRecords in interface IHecDSSUtilities
    • renameRecords

      public int renameRecords(List<String> pathnameList, List<String> newPathnameList)
      Specified by:
      renameRecords in interface IHecDSSUtilities
    • convertVersion

      public int convertVersion(String convertFileName)
    • squeeze

      public int squeeze()
      Specified by:
      squeeze in interface IHecDSSUtilities
    • squeeze

      public int squeeze(boolean onlyIfNeeded)
    • cancelSqueeze

      public int cancelSqueeze()
      Specified by:
      cancelSqueeze in interface IHecDSSUtilities
    • squeezeNeeded

      public boolean squeezeNeeded()
    • cancelProcess

      public void cancelProcess()
      Specified by:
      cancelProcess in interface IHecDSSUtilities
    • getCondensedCatalog

      public Vector<CondensedReference> getCondensedCatalog()
      Specified by:
      getCondensedCatalog in interface IHecDSSUtilities
    • getCondensedCatalog

      public Vector<CondensedReference> getCondensedCatalog(String[] sortedPathnames, boolean querryTimes)
    • checkForSevereDssError

      public boolean checkForSevereDssError()
      Specified by:
      checkForSevereDssError in interface IHecDSSUtilities
    • readRawShorts

      public short[] readRawShorts(String pathname)
      Specified by:
      readRawShorts in interface IHecDSSUtilities
    • dss_zset

      public void dss_zset(String parameter, String alpha, int number)
      Specified by:
      dss_zset in interface IHecDSSUtilities
    • dss_zquery

      public void dss_zquery(String parameter, stringContainer alpha, int[] numb)
      Specified by:
      dss_zquery in interface IHecDSSUtilities