chemaxon.formats.recognizer
Class JTFRecognizer

java.lang.Object
  extended by chemaxon.formats.recognizer.Recognizer
      extended by chemaxon.formats.recognizer.JTFRecognizer

public class JTFRecognizer
extends Recognizer

JTF format recognizer.

Since:
Marvin 5.0, 06/08/2007
Version:
5.0, 10/15/2007
Author:
Szilard Dorant, Peter Csizmadia

Constructor Summary
JTFRecognizer(java.lang.String fmt)
          Creates a JTF format recognizer.
 
Method Summary
static boolean canBeJTFHeader(java.lang.String line)
          Determines if a String is valid as the first line of a JTF file.
 boolean needsMore()
          Should we read more lines?
 void tryToRecognize(java.lang.String line, int linenum, RecognizerList reclist)
          Tries to recognize a line.
 
Methods inherited from class chemaxon.formats.recognizer.Recognizer
getLastProcessedLineNum, getPriority, isLastLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTFRecognizer

public JTFRecognizer(java.lang.String fmt)
Creates a JTF format recognizer.

Parameters:
fmt - the codename of the format
Method Detail

tryToRecognize

public void tryToRecognize(java.lang.String line,
                           int linenum,
                           RecognizerList reclist)
Tries to recognize a line. If a format becomes impossible, then it is removed from the set of possible formats.

Specified by:
tryToRecognize in class Recognizer
Parameters:
line - the line
linenum - the line number
reclist - the list of recognizers

needsMore

public boolean needsMore()
Should we read more lines?

Specified by:
needsMore in class Recognizer
Returns:
true if more lines are needed, false otherwise

canBeJTFHeader

public static boolean canBeJTFHeader(java.lang.String line)
Determines if a String is valid as the first line of a JTF file.

Parameters:
line - a line of the file
Returns:
true, if the line can be a JTF header