cz.hdf.cdnavigator
Class FullTextParse

java.lang.Object
  extended by cz.hdf.cdnavigator.FullTextParse

public class FullTextParse
extends java.lang.Object

Parse fulltext string to words and operators.

Author:
hunter

Field Summary
private  int index
          index to actual word
static int OPERATOR_AND
          operator and
static int OPERATOR_OR
          operator or
private  java.util.List operators
          parsed operators
private  java.util.List words
          parsed words
 
Constructor Summary
FullTextParse()
          Initialize class.
 
Method Summary
 int getNextOperator()
          Return actual operator for actual word.
 java.lang.String getNextWord()
          Return actual word and shift words index to next word.
private  int getOperator(java.lang.String _word)
          Get operator for this word.
 boolean hasNextWord()
          Exist next word?
 void initialize(java.lang.String _fullText)
          Parse fulltext string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPERATOR_AND

public static final int OPERATOR_AND
operator and

See Also:
Constant Field Values

OPERATOR_OR

public static final int OPERATOR_OR
operator or

See Also:
Constant Field Values

words

private java.util.List words
parsed words


operators

private java.util.List operators
parsed operators


index

private int index
index to actual word

Constructor Detail

FullTextParse

public FullTextParse()
Initialize class.

Method Detail

initialize

public void initialize(java.lang.String _fullText)
Parse fulltext string.

Parameters:
_fullText -

getOperator

private int getOperator(java.lang.String _word)
Get operator for this word. If next word is not a operator, than return -1.

Parameters:
_word -
Returns:

getNextWord

public java.lang.String getNextWord()
Return actual word and shift words index to next word.

Returns:

getNextOperator

public int getNextOperator()
Return actual operator for actual word.

Returns:

hasNextWord

public boolean hasNextWord()
Exist next word?

Returns:


CDnavigator JavaDoc, HDF company www.hdf.cz