Class OceanTidesReader

    • Constructor Detail

      • OceanTidesReader

        public OceanTidesReader​(String supportedNames)
        Simple constructor.
        Parameters:
        supportedNames - regular expression for supported files names
    • Method Detail

      • getSupportedNames

        public String getSupportedNames()
        Get the regular expression for supported files names.
        Returns:
        regular expression for supported files names
      • setMaxParseDegree

        public void setMaxParseDegree​(int maxParseDegree)
        Set the degree limit for the next file parsing.
        Parameters:
        maxParseDegree - maximal degree to parse (may be safely set to Integer.MAX_VALUE to parse all available coefficients)
      • getMaxParseDegree

        public int getMaxParseDegree()
        Get the degree limit for the next file parsing.
        Returns:
        degree limit for the next file parsing
      • setMaxParseOrder

        public void setMaxParseOrder​(int maxParseOrder)
        Set the order limit for the next file parsing.
        Parameters:
        maxParseOrder - maximal order to parse (may be safely set to Integer.MAX_VALUE to parse all available coefficients)
      • getMaxParseOrder

        public int getMaxParseOrder()
        Get the order limit for the next file parsing.
        Returns:
        order limit for the next file parsing
      • stillAcceptsData

        public boolean stillAcceptsData()
        Check if the loader still accepts new data.

        This method is used to speed up data loading by interrupting crawling the data sets as soon as a loader has found the data it was waiting for. For loaders that can merge data from any number of sources (for example JPL ephemerides or Earth Orientation Parameters that are split among several files), this method should always return true to make sure no data is left over.

        Specified by:
        stillAcceptsData in interface DataLoader
        Returns:
        true while the loader still accepts new data
      • startParse

        protected void startParse​(String fileName)
        Start parsing.

        This method must be called by subclasses when they start parsing a file

        Parameters:
        fileName - name of the file (or zip entry)
      • canAdd

        public boolean canAdd​(int n,
                              int m)
        Check if coefficients can be added.
        Parameters:
        n - degree of the coefficients
        m - order of the coefficients
        Returns:
        true if coefficients can be added
      • addWaveCoefficients

        protected void addWaveCoefficients​(int doodson,
                                           int n,
                                           int m,
                                           double cPlus,
                                           double sPlus,
                                           double cMinus,
                                           double sMinus,
                                           int lineNumber,
                                           String line)
        Add parsed coefficients.
        Parameters:
        doodson - Doodson number of the current wave
        n - degree of the coefficients
        m - order of the coefficients
        cPlus - C+(n,m)
        sPlus - S+(n,m)
        cMinus - C-(n,m)
        sMinus - S-(n,m)
        lineNumber - number of the parsed line
        line - text of the line
      • endParse

        protected void endParse()
        End parsing.

        This method must be called by subclasses when they end parsing a file

      • getWaves

        public List<OceanTidesWave> getWaves()
        Get the loaded waves.
        Returns:
        loaded waves