net.talvi.puffinplot.data.file
Class TwoGeeLoader

java.lang.Object
  extended by net.talvi.puffinplot.data.file.TwoGeeLoader
All Implemented Interfaces:
FileLoader

public class TwoGeeLoader
extends java.lang.Object

A loader for data files produced by the Long Core software supplied with 2G Enterprises magnetometers.


Nested Class Summary
static class TwoGeeLoader.Protocol
          A measurement protocol.
 
Field Summary
protected  java.util.List<Datum> data
           
protected  java.util.List<java.lang.String> messages
           
 
Constructor Summary
TwoGeeLoader(java.io.File file, TwoGeeLoader.Protocol protocol, Vec3 sensorLengths, boolean usePolarMoment)
          Creates a new 2G loader using the supplied parameters.
 
Method Summary
protected  void addDatum(Datum d)
           
protected  void addMessage(java.lang.String message, java.lang.Object... args)
           
 java.util.List<Datum> getData()
          Returns the data points read from the file.
 java.util.List<java.lang.String> getExtraLines()
          Returns any lines in the file which were not handled by the loader.
 java.util.List<java.lang.String> getMessages()
          Returns any messages produced during the loading process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messages

protected java.util.List<java.lang.String> messages

data

protected java.util.List<Datum> data
Constructor Detail

TwoGeeLoader

public TwoGeeLoader(java.io.File file,
                    TwoGeeLoader.Protocol protocol,
                    Vec3 sensorLengths,
                    boolean usePolarMoment)
Creates a new 2G loader using the supplied parameters.

Parameters:
file - the file to read
protocol - the measurement protocol which was used to create the data
sensorLengths - the effective sensor lengths (only used for long core data)
Method Detail

addMessage

protected void addMessage(java.lang.String message,
                          java.lang.Object... args)

addDatum

protected void addDatum(Datum d)

getData

public java.util.List<Datum> getData()
Description copied from interface: FileLoader
Returns the data points read from the file.

Specified by:
getData in interface FileLoader
Returns:
the data points read from the file

getExtraLines

public java.util.List<java.lang.String> getExtraLines()
Description copied from interface: FileLoader
Returns any lines in the file which were not handled by the loader.

Specified by:
getExtraLines in interface FileLoader
Returns:
any lines in the file which were not handled by the loader

getMessages

public java.util.List<java.lang.String> getMessages()
Description copied from interface: FileLoader
Returns any messages produced during the loading process.

Specified by:
getMessages in interface FileLoader
Returns:
any messages produced during the loading process