Class ASCSpectrumReader.ParsedFile

  • Enclosing class:
    ASCSpectrumReader

    protected class ASCSpectrumReader.ParsedFile
    extends Object
    Class for parsing an ASC file.
    • Field Detail

      • m_ht

        protected Hashtable<String,​String> m_ht
        Name->Value, String->String. ie "Sample ID" -> "994370"
      • m_dp

        protected List m_dp
        vector of 2d double (double[2]) wavenumber,absorbance.
      • lastError

        protected String lastError
        the last error that occurred.
      • m_ForceCommaToPoint

        protected boolean m_ForceCommaToPoint
        whether to force replacing comma with point.
    • Constructor Detail

      • ParsedFile

        protected ParsedFile()
    • Method Detail

      • getLastError

        public String getLastError()
        Returns the last error that occurred.
        Returns:
        the last error
      • getType

        public String getType()
        Returns the type.
        Returns:
        the type
      • getID

        public String getID()
        Returns the ID.
        Returns:
        the ID
      • getNumDatapoints

        public Integer getNumDatapoints()
        Returns the number of data points.
        Returns:
        the number of data points, or null if it can't be parsed
      • getWaveNumberArray

        public double[] getWaveNumberArray()
        Returns the Wave number array.
        Returns:
        the array
      • getProperties

        public Hashtable<String,​String> getProperties()
        get hashtable property data.
        Returns:
        the hashtable
      • getNIRArray

        public double[] getNIRArray()
        Returns the NIR array.
        Returns:
        the array
      • parse

        public boolean parse​(File afile)
        Parses the given file.
        Parameters:
        afile - the file to parse
        Returns:
        true if successfully parsed
      • parse

        public boolean parse​(String in)
        Parses the given string.
        Parameters:
        in - the string to parse
        Returns:
        true if successfully parsed