Last update: 2011-06-23

org.proteios.io
Class MascotFileReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.InputStreamReader
          extended by org.proteios.io.MascotFileReader
All Implemented Interfaces:
Closeable, Readable, FileTypeInterface, FileValidationInterface, IdentificationFileInterface

public class MascotFileReader
extends InputStreamReader
implements IdentificationFileInterface, FileValidationInterface, FileTypeInterface

All methods assume that the input stream is at the the begining.

Author:
gregory, fredrik

Field Summary
protected static org.apache.log4j.Logger log
          Logger used.
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
MascotFileReader(InputStream in)
           
 
Method Summary
 String getFileType()
           
 String getInputFileName()
           
 boolean importable()
          Deprecated. 
 List<HitInterface> listAllHits()
          (non-Javadoc)
 boolean valid()
          Deprecated. 
 
Methods inherited from class java.io.InputStreamReader
close, getEncoding, read, read, ready
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Logger used. Used to log specific events.

Constructor Detail

MascotFileReader

public MascotFileReader(InputStream in)
Parameters:
in -
Method Detail

getFileType

public String getFileType()
Specified by:
getFileType in interface FileTypeInterface

valid

@Deprecated
public boolean valid()
              throws javax.xml.stream.XMLStreamException,
                     SAXException
Deprecated. 

Validates the entire file against current XSD file.

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

importable

@Deprecated
public final boolean importable()
Deprecated. 

Check if start tag is ok. No further validation.

Specified by:
importable in interface FileValidationInterface

getInputFileName

public String getInputFileName()
Specified by:
getInputFileName in interface IdentificationFileInterface
Returns:
name of file used as input for this search result or null. The filename will be without path.
See Also:
IdentificationFileInterface.getInputFileName()

listAllHits

public List<HitInterface> listAllHits()
(non-Javadoc)

Specified by:
listAllHits in interface IdentificationFileInterface
Returns:
list of hits or empty list if no hits are found
See Also:
IdentificationFileInterface.listAllHits()

Last update: 2011-06-23