LexCheck
2011 Version

gov.nih.nlm.nls.lexCheck.CkLib
Class CheckObject

java.lang.Object
  extended by gov.nih.nlm.nls.lexCheck.CkLib.CheckObject

public class CheckObject
extends java.lang.Object

This class provides a Java object to carry check information.

History:

Version:
V-2011
Author:
NLM Lexical System Development Team

Constructor Summary
CheckObject(java.lang.String startStr, int startErrMsg, int fillerErrMsg, int nextState, java.util.HashSet nextStartStrs, CheckFormat fillerFormat)
          Create a default CheckObject
CheckObject(java.lang.String startStr, int startErrMsg, int fillerErrMsg, int nextState, java.util.HashSet nextStartStrs, CheckFormat fillerFormat, java.lang.String delim)
          Create a default CheckObject
CheckObject(java.lang.String startStr, int startErrMsg, int fillerErrMsg, int nextState, java.util.HashSet nextStartStrs, java.util.HashSet nextLine, CheckFormat fillerFormat)
          Create a default CheckObject
CheckObject(java.lang.String startStr, int startErrMsg, int fillerErrMsg, int nextState, java.util.HashSet nextStartStrs, java.util.HashSet nextLine, CheckFormat fillerFormat, java.lang.String delim)
          Create a default CheckObject
 
Method Summary
 java.lang.String GetDelim()
          Get the deliminator string from this CheckObject
 int GetFillerErrMsg()
          Get the error massage of the filler problem
 CheckFormat GetFillerFormat()
          Get the legal format of a filler
 java.util.HashSet GetNextLine()
          Get the collection of possible strings of next line
 java.util.HashSet GetNextStartStrs()
          Get the collection of possible starting strings of next line
 int GetNextState()
          Get the next checking state
 int GetStartErrMsg()
          Get the error massage of the starting string problem
 java.lang.String GetStartStr()
          Get the legal start string from this CheckObject
 boolean IsNextStartStr(java.lang.String line)
          Check if the starting string of next line is legal
 boolean IsTab()
          Check if the line starts with a tab
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckObject

public CheckObject(java.lang.String startStr,
                   int startErrMsg,
                   int fillerErrMsg,
                   int nextState,
                   java.util.HashSet nextStartStrs,
                   CheckFormat fillerFormat)
Create a default CheckObject

Parameters:
startStr - the start string of a line
startErrMsg - the error msg for the start string problem
fillerErrMsg - the error msg for filler
nextState - the next checking state
nextStartStrs - the possible start string for the next line
fillerFormat - the legal format of filler

CheckObject

public CheckObject(java.lang.String startStr,
                   int startErrMsg,
                   int fillerErrMsg,
                   int nextState,
                   java.util.HashSet nextStartStrs,
                   java.util.HashSet nextLine,
                   CheckFormat fillerFormat)
Create a default CheckObject

Parameters:
startStr - the start string of a line
startErrMsg - the error msg for the start string problem
fillerErrMsg - the error msg for filler
nextState - the next checking state
nextStartStrs - the possible start string for the next line
nextLine - the possible next line
fillerFormat - the legal format of filler

CheckObject

public CheckObject(java.lang.String startStr,
                   int startErrMsg,
                   int fillerErrMsg,
                   int nextState,
                   java.util.HashSet nextStartStrs,
                   CheckFormat fillerFormat,
                   java.lang.String delim)
Create a default CheckObject

Parameters:
startStr - the start string of a line
startErrMsg - the error msg for the start string problem
fillerErrMsg - the error msg for filler
nextState - the next checking state
nextStartStrs - the possible start string for the next line
fillerFormat - the legal format of filler
delim - the deliminator for tokenization

CheckObject

public CheckObject(java.lang.String startStr,
                   int startErrMsg,
                   int fillerErrMsg,
                   int nextState,
                   java.util.HashSet nextStartStrs,
                   java.util.HashSet nextLine,
                   CheckFormat fillerFormat,
                   java.lang.String delim)
Create a default CheckObject

Parameters:
startStr - the start string of a line
startErrMsg - the error msg for the start string problem
fillerErrMsg - the error msg for filler
nextState - the next checking state
nextStartStrs - the possible start string for the next line
nextLine - the possible next line
fillerFormat - the legal format of filler
delim - the deliminator for tokenization
Method Detail

GetStartStr

public java.lang.String GetStartStr()
Get the legal start string from this CheckObject

Returns:
legal start string from this CheckObject

GetDelim

public java.lang.String GetDelim()
Get the deliminator string from this CheckObject

Returns:
the deliminator from this CheckObject

GetStartErrMsg

public int GetStartErrMsg()
Get the error massage of the starting string problem

Returns:
the index of error message for starting string problem

GetFillerErrMsg

public int GetFillerErrMsg()
Get the error massage of the filler problem

Returns:
the index of error message for filler problem

GetNextState

public int GetNextState()
Get the next checking state

Returns:
the next checking state

GetNextStartStrs

public java.util.HashSet GetNextStartStrs()
Get the collection of possible starting strings of next line

Returns:
a hashset collection of possible starting strings of next line

GetNextLine

public java.util.HashSet GetNextLine()
Get the collection of possible strings of next line

Returns:
a hashset collection of possible strings of next line

IsNextStartStr

public boolean IsNextStartStr(java.lang.String line)
Check if the starting string of next line is legal

Returns:
true or false if the start string of next line is legal or not

GetFillerFormat

public CheckFormat GetFillerFormat()
Get the legal format of a filler

Returns:
the legal format of a filler

IsTab

public boolean IsTab()
Check if the line starts with a tab

Returns:
true or false if the line starts with a tab

LexCheck
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine