apollo.dataadapter
Class DataInput

java.lang.Object
  extended by apollo.dataadapter.DataInput

public class DataInput
extends java.lang.Object

This lumps together DataInputType and getInput String in ApolloDataAdapterI. This deals with location strings, which lump together chrom, start and end At the moment its assumed location strings are of the ilk "chrom#:start-end" The other apollo location format of "Chr chrom# start end" needs to be dealt with at some point as well.


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
DataInput(DataInputType inputType)
           
DataInput(DataInputType inputType, java.lang.String inputString)
           
DataInput(java.lang.String inputString)
           
DataInput(java.lang.String soType, java.lang.String inputString)
           
DataInput(java.lang.String chrom, java.lang.String start, java.lang.String end)
           
DataInput(java.lang.String chrom, java.lang.String start, java.lang.String end, java.lang.String seqType)
          Constructor for a location with Strings for chrom, start, & end & so type
 
Method Summary
 java.lang.String getFilename()
           
 java.lang.String getInputString()
           
 Region getRegion()
           
 java.lang.String getSeqId()
          So for all input types except BASEPAIR_RANGE/regions the "seqId" is the input string itself.
 java.lang.String getSequenceFilename()
           
 java.lang.String getSoType()
           
 DataInputType getType()
           
 boolean hasInput()
           
 boolean hasSequenceFilename()
           
 boolean isFile()
           
 boolean isRegion()
          Returns true if DataInputType is BASEPAIR_RANGE
 void makeDataTypeRegion()
           
 void setInputString(java.lang.String inputString)
           
 void setSequenceFilename(java.lang.String sequenceFilename)
           
 void setSoType(java.lang.String soType)
           
 void setType(DataInputType type)
           
 void setTypeToFileOrUrl()
          if file starts with http: then its really an url so correct the type this should only be used for types that are either file or url - none others file adapters in other words
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

DataInput

public DataInput(DataInputType inputType,
                 java.lang.String inputString)

DataInput

public DataInput(java.lang.String soType,
                 java.lang.String inputString)

DataInput

public DataInput(java.lang.String chrom,
                 java.lang.String start,
                 java.lang.String end)

DataInput

public DataInput(java.lang.String chrom,
                 java.lang.String start,
                 java.lang.String end,
                 java.lang.String seqType)
Constructor for a location with Strings for chrom, start, & end & so type


DataInput

public DataInput(DataInputType inputType)

DataInput

public DataInput(java.lang.String inputString)
Method Detail

setTypeToFileOrUrl

public void setTypeToFileOrUrl()
if file starts with http: then its really an url so correct the type this should only be used for types that are either file or url - none others file adapters in other words


getType

public DataInputType getType()

getSoType

public java.lang.String getSoType()

setSoType

public void setSoType(java.lang.String soType)

getInputString

public java.lang.String getInputString()

getSeqId

public java.lang.String getSeqId()
So for all input types except BASEPAIR_RANGE/regions the "seqId" is the input string itself. For a Region the chromosome is the seq id. This may be too database/chado specific and if so i could take it out of here.


setType

public void setType(DataInputType type)

setInputString

public void setInputString(java.lang.String inputString)

isFile

public boolean isFile()

getFilename

public java.lang.String getFilename()

isRegion

public boolean isRegion()
Returns true if DataInputType is BASEPAIR_RANGE


makeDataTypeRegion

public void makeDataTypeRegion()

getRegion

public Region getRegion()

hasInput

public boolean hasInput()

setSequenceFilename

public void setSequenceFilename(java.lang.String sequenceFilename)

hasSequenceFilename

public boolean hasSequenceFilename()

getSequenceFilename

public java.lang.String getSequenceFilename()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object