chemaxon.formats.recognizer
Class PDBRecognizer

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

public class PDBRecognizer
extends Recognizer

PDB format recognizer.

Since:
Marvin 5.0, 06/08/2007
Version:
5.0, 10/15/2007
Author:
Miklos Vargyas, Peter Csizmadia

Field Summary
static int CAN_BE
          Line can be in the given format.
static int NO
          Line is not in the given format.
static int SURE
          Line is surely in the given format.
 
Constructor Summary
PDBRecognizer(java.lang.String fmt)
          Creates an PDB format recognizer.
 
Method Summary
 boolean needsMore()
          Should we read more lines?
static int testLine(java.lang.String line)
          Checks if the given parameter is a PDB record name.
static int testRecord(java.lang.String recName)
          Checks if the given parameter is a PDB record name.
 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
 

Field Detail

NO

public static final int NO
Line is not in the given format. Return value for testLine methods.

See Also:
Constant Field Values

CAN_BE

public static final int CAN_BE
Line can be in the given format. Return value for testLine methods.

See Also:
Constant Field Values

SURE

public static final int SURE
Line is surely in the given format. Return value for testLine methods.

See Also:
Constant Field Values
Constructor Detail

PDBRecognizer

public PDBRecognizer(java.lang.String fmt)
Creates an PDB 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

testLine

public static int testLine(java.lang.String line)
Checks if the given parameter is a PDB record name.

Parameters:
line - the line
Returns:
SURE if it is surely a PDB line, CAN_BE if it can be a PDB line, NO otherwise

testRecord

public static int testRecord(java.lang.String recName)
Checks if the given parameter is a PDB record name.

Parameters:
recName - a potential PDB record name
Returns:
SURE if it is surely a PDB line, CAN_BE if it can be a PDB line, NO otherwise