chemaxon.formats.recognizer
Class ChimeRecognizer

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

public class ChimeRecognizer
extends Recognizer

Chime format recognizer.

Since:
Marvin 5.0, 06/07/2007
Version:
5.1, 07/29/2008
Author:
Peter Csizmadia

Constructor Summary
ChimeRecognizer(java.lang.String fmt)
          Creates a Chime format recognizer.
 
Method Summary
static boolean canBeChime(java.lang.String s)
          Tests whether a string can be Chime.
 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

ChimeRecognizer

public ChimeRecognizer(java.lang.String fmt)
Creates a Chime 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

canBeChime

public static boolean canBeChime(java.lang.String s)
Tests whether a string can be Chime.

Parameters:
s - the input string
Returns:
true if it can be, false if it cannot be Chime