org.javaabf
Class ABF2_parser

java.lang.Object
  extended by org.javaabf.AbstractABF_parser
      extended by org.javaabf.ABF2_parser
All Implemented Interfaces:
ABF_parser

public class ABF2_parser
extends AbstractABF_parser


Field Summary
 
Fields inherited from class org.javaabf.AbstractABF_parser
ifile
 
Fields inherited from interface org.javaabf.ABF_parser
ADCNAMELEN, ADCUNITLEN, CACHE_BYTE_SIZE, CHAR, FLOAT, LONG, LONGLONG, SHORT
 
Constructor Summary
ABF2_parser(java.lang.String filename, boolean debug)
           
 
Method Summary
 double[] convertVectorToDoubleArray(java.util.Vector inputVector)
           
 int[] convertVectorToIntArray(java.util.Vector inputVector)
           
 java.lang.String[] convertVectorToStringArray(java.util.Vector inputVector)
           
 ABF_ADCInfo[] getABF2ADCInfo(ABF_Section ADCSection)
           
 ABF_FileInfo getABF2FileInfo()
           
 float getABFVersion()
           
 long getAbsoluteTime(long row)
          Returns the absolute time for the sample row in milliseconds"""
 int[] getChannelIndices()
          Returns a list of the channel indices, which is simply the order in which the channels appear in the file."""
 java.lang.String[] getChannelNames()
           
 int[] getChannelNumbers()
           
 java.lang.String[] getChannelUnits()
           
 java.lang.String getChunk(long index, long secondIndex)
           
 java.lang.String getDataFormat()
           
 long getExperimentDuration()
          Returns the duration of the experiment in milliseconds"""
 ABF_Section getNextABF_Section()
           
 char getNextChar()
           
 long getNextMYGUID()
           
 int getNumberOfActualEpisodes()
           
 int getNumberOfADC()
           
 int getNumberOfEpisodes()
           
 long getNumberOfRows()
          """Returns the number of sample rows."""
 long getNumberOfSamplesPerEpisode()
           
 java.lang.String getOperationMode()
           
 ABF_ProtocolInfo getProtocolInfo(ABF_Section ProtocolSection)
           
 long getRelativeTime(long row)
          Returns the time relative to the start of the experiment in milliseconds"""
 long getRowNumberByAbsoluteTime(double time)
          """Returns the row number for the absolute time (assuming ms)."""
 long getRowNumberByRelativeTime(double time)
          """Returns the row number for the relative time (assuming ms)."""
 double getSamplingRate()
           
 short getSizeOfNumberInBytes()
          Returns 2 for integers && 4 for floating point, depending on the data format."""
 long getStartTime()
          Returns the start of the file in milliseconds"""
 void loadMetaData()
           
 void parseABF2Header()
           
 double scaleDatum(double datum, int channel)
          Could be problematic
 
Methods inherited from class org.javaabf.AbstractABF_parser
getChannelData, getChannelData, getChannelData, getChannelDataByEpoch, getChannelNumberByIndex, getComments, getComments, getComments, getCommentsByPattern, getData, getEpochsByCommentPattern, getNextBool, getNextEpoch, getNextFloat, getNextLong, getNextLongLong, getNextShort, getNextUnsignedInt, getNextUnsignedLong, getNextUnsignedShort, getPreviousEpoch, getRow, getTags, loadInitialCache, reloadCache, reloadCache, resetCursor, setABFVersion, setCurrentRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ABF2_parser

public ABF2_parser(java.lang.String filename,
                   boolean debug)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getABFVersion

public float getABFVersion()
Specified by:
getABFVersion in interface ABF_parser
Overrides:
getABFVersion in class AbstractABF_parser

getSamplingRate

public double getSamplingRate()
Specified by:
getSamplingRate in interface ABF_parser
Overrides:
getSamplingRate in class AbstractABF_parser

getNumberOfEpisodes

public int getNumberOfEpisodes()
Specified by:
getNumberOfEpisodes in interface ABF_parser
Overrides:
getNumberOfEpisodes in class AbstractABF_parser

parseABF2Header

public void parseABF2Header()
                     throws java.io.IOException
Throws:
java.io.IOException

getNumberOfActualEpisodes

public int getNumberOfActualEpisodes()
Specified by:
getNumberOfActualEpisodes in interface ABF_parser
Specified by:
getNumberOfActualEpisodes in class AbstractABF_parser

loadMetaData

public void loadMetaData()
                  throws java.io.IOException
Throws:
java.io.IOException

getSizeOfNumberInBytes

public short getSizeOfNumberInBytes()
Returns 2 for integers && 4 for floating point, depending on the data format."""

Specified by:
getSizeOfNumberInBytes in interface ABF_parser
Overrides:
getSizeOfNumberInBytes in class AbstractABF_parser

getNumberOfADC

public int getNumberOfADC()
Specified by:
getNumberOfADC in interface ABF_parser
Specified by:
getNumberOfADC in class AbstractABF_parser

getOperationMode

public java.lang.String getOperationMode()
Specified by:
getOperationMode in interface ABF_parser
Specified by:
getOperationMode in class AbstractABF_parser

getABF2ADCInfo

public ABF_ADCInfo[] getABF2ADCInfo(ABF_Section ADCSection)
                             throws java.io.IOException
Throws:
java.io.IOException

getProtocolInfo

public ABF_ProtocolInfo getProtocolInfo(ABF_Section ProtocolSection)
                                 throws java.io.IOException
Throws:
java.io.IOException

getNextChar

public char getNextChar()
                 throws java.io.IOException
Overrides:
getNextChar in class AbstractABF_parser
Throws:
java.io.IOException

scaleDatum

public double scaleDatum(double datum,
                         int channel)
Could be problematic

Overrides:
scaleDatum in class AbstractABF_parser

getNextMYGUID

public long getNextMYGUID()
                   throws java.io.IOException
Overrides:
getNextMYGUID in class AbstractABF_parser
Throws:
java.io.IOException

getNextABF_Section

public ABF_Section getNextABF_Section()
                               throws java.io.IOException
Overrides:
getNextABF_Section in class AbstractABF_parser
Throws:
java.io.IOException

getDataFormat

public java.lang.String getDataFormat()
Specified by:
getDataFormat in interface ABF_parser
Overrides:
getDataFormat in class AbstractABF_parser

getABF2FileInfo

public ABF_FileInfo getABF2FileInfo()
                             throws java.io.IOException
Throws:
java.io.IOException

getStartTime

public long getStartTime()
Returns the start of the file in milliseconds"""

Specified by:
getStartTime in interface ABF_parser
Specified by:
getStartTime in class AbstractABF_parser

getChunk

public java.lang.String getChunk(long index,
                                 long secondIndex)
                          throws java.io.IOException
Overrides:
getChunk in class AbstractABF_parser
Throws:
java.io.IOException

getNumberOfSamplesPerEpisode

public long getNumberOfSamplesPerEpisode()
Specified by:
getNumberOfSamplesPerEpisode in interface ABF_parser
Overrides:
getNumberOfSamplesPerEpisode in class AbstractABF_parser

getExperimentDuration

public long getExperimentDuration()
Returns the duration of the experiment in milliseconds"""

Specified by:
getExperimentDuration in interface ABF_parser
Overrides:
getExperimentDuration in class AbstractABF_parser

getChannelNames

public java.lang.String[] getChannelNames()
                                   throws java.io.IOException
Specified by:
getChannelNames in interface ABF_parser
Specified by:
getChannelNames in class AbstractABF_parser
Throws:
java.io.IOException

getChannelUnits

public java.lang.String[] getChannelUnits()
                                   throws java.io.IOException
Specified by:
getChannelUnits in interface ABF_parser
Specified by:
getChannelUnits in class AbstractABF_parser
Throws:
java.io.IOException

getChannelNumbers

public int[] getChannelNumbers()
Specified by:
getChannelNumbers in interface ABF_parser
Specified by:
getChannelNumbers in class AbstractABF_parser

getChannelIndices

public int[] getChannelIndices()
Returns a list of the channel indices, which is simply the order in which the channels appear in the file."""

Specified by:
getChannelIndices in interface ABF_parser
Overrides:
getChannelIndices in class AbstractABF_parser

getAbsoluteTime

public long getAbsoluteTime(long row)
Returns the absolute time for the sample row in milliseconds"""

Specified by:
getAbsoluteTime in interface ABF_parser
Overrides:
getAbsoluteTime in class AbstractABF_parser

getRelativeTime

public long getRelativeTime(long row)
Returns the time relative to the start of the experiment in milliseconds"""

Specified by:
getRelativeTime in interface ABF_parser
Overrides:
getRelativeTime in class AbstractABF_parser

getNumberOfRows

public long getNumberOfRows()
"""Returns the number of sample rows."""

Specified by:
getNumberOfRows in interface ABF_parser
Overrides:
getNumberOfRows in class AbstractABF_parser

getRowNumberByAbsoluteTime

public long getRowNumberByAbsoluteTime(double time)
"""Returns the row number for the absolute time (assuming ms)."""

Specified by:
getRowNumberByAbsoluteTime in interface ABF_parser
Overrides:
getRowNumberByAbsoluteTime in class AbstractABF_parser

getRowNumberByRelativeTime

public long getRowNumberByRelativeTime(double time)
"""Returns the row number for the relative time (assuming ms)."""

Specified by:
getRowNumberByRelativeTime in interface ABF_parser
Overrides:
getRowNumberByRelativeTime in class AbstractABF_parser

convertVectorToIntArray

public int[] convertVectorToIntArray(java.util.Vector inputVector)

convertVectorToDoubleArray

public double[] convertVectorToDoubleArray(java.util.Vector inputVector)

convertVectorToStringArray

public java.lang.String[] convertVectorToStringArray(java.util.Vector inputVector)