Last update: 2011-06-23

org.proteios.io
Class RobotFileSpotXY

java.lang.Object
  extended by org.proteios.io.RobotFileSpotXY

public class RobotFileSpotXY
extends Object

This class imports gel spot coordinates from a Spot Handling Workstation log file.

Author:
olle

Constructor Summary
RobotFileSpotXY(File inputFile)
          Constructor that takes a Proteios File as parameter.
RobotFileSpotXY(InputStream xmlInputStream)
          Constructor that takes a robot XML input stream as parameter.
 
Method Summary
 List<Float> getSpotXs(List<String> spotIds, List<String> gelIds)
          Get list of spot x coordinates for lists of spot ids and gel ids.
 List<Float> getSpotYs(List<String> spotIds, List<String> gelIds)
          Get list of spot Y coordinates for lists of spot ids and gel ids.
 String getXsdFilePath()
          Get XSD schema file to validate against.
 boolean importable()
          Validates first element of input stream.
 void setXsdFilePath(String xsdFilePath)
          Set XSD schema file to validate against.
 boolean valid()
          Validates spot picker XML input stream against current XSD file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RobotFileSpotXY

public RobotFileSpotXY(File inputFile)
Constructor that takes a Proteios File as parameter. If this constructor is used, the file will always be read from the beginning when the public functions are called.

Parameters:
inputFile - InputFile robot XML File.

RobotFileSpotXY

public RobotFileSpotXY(InputStream xmlInputStream)
Constructor that takes a robot XML input stream as parameter. If this constructor is used the stream will not be reset automatically between calls to public functions

Parameters:
xmlInputStream - InputStream robot XML input stream.
Method Detail

getXsdFilePath

public String getXsdFilePath()
Get XSD schema file to validate against.

Returns:
xsdFilePath String with path for XSD schema file.

setXsdFilePath

public void setXsdFilePath(String xsdFilePath)
Set XSD schema file to validate against.

Parameters:
xsdFilePath - String with path for XSD schema file.

valid

public boolean valid()
              throws javax.xml.stream.XMLStreamException,
                     SAXException
Validates spot picker XML input stream against current XSD file.

Returns:
True if the mzData XML input stream is valid, else false
Throws:
javax.xml.stream.XMLStreamException - If there is an XML Stream related error
SAXException

importable

public boolean importable()
Validates first element of input stream.

Returns:
True if the input stream is valid, else false

getSpotXs

public List<Float> getSpotXs(List<String> spotIds,
                             List<String> gelIds)
Get list of spot x coordinates for lists of spot ids and gel ids. If gel id list is set to null the spot coordinates from any matching spots will be imported. This can be wrong if there is more than one pick gel with overlapping spot ids

Parameters:
spotIds - List list of target spot ids.
gelIds - List list of target gel ids.
Returns:
List list of spot X pixel coordinates

getSpotYs

public List<Float> getSpotYs(List<String> spotIds,
                             List<String> gelIds)
Get list of spot Y coordinates for lists of spot ids and gel ids. If gel id list is set to null the spot coordinates from any matching spots will be imported. This can be wrong if there is more than one pick gel with overlapping spot ids.

Parameters:
spotIds - List list of target spot ids.
gelIds - List list of target gel ids.
Returns:
List list of spot Y pixel coordinates

Last update: 2011-06-23