com.primus.searchstudio
Class SpellingTerm

java.lang.Object
  extended by com.primus.searchstudio.SpellingTerm
All Implemented Interfaces:
java.io.Serializable

public class SpellingTerm
extends java.lang.Object
implements java.io.Serializable

Spelling term value object.

See Also:
Serialized Form

Field Summary
protected  int length
           
protected  int offset
           
protected  java.lang.String suggestion
           
protected  java.lang.String text
           
 
Constructor Summary
protected SpellingTerm(java.lang.String suggestion, int offset, int length)
          Constructs new term with specified parameters.
  SpellingTerm(java.lang.String text, java.lang.String suggestion, int offset, int length)
          Constructs new term with specified parameters.
 
Method Summary
 int getLength()
          Get term length used in the initial query.
 int getOffset()
          Get term offset in the initial query.
 java.lang.String getSuggestion()
          Get spell checker suggested text.
 java.lang.String getText()
          Get spell checker initial text.
 boolean isUnknown()
          Indicates whether this term is "unknown".
 boolean isUnsearchable()
          Indicates whether this term is "unsearchable".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

protected int offset

length

protected int length

suggestion

protected java.lang.String suggestion

text

protected java.lang.String text
Constructor Detail

SpellingTerm

protected SpellingTerm(java.lang.String suggestion,
                       int offset,
                       int length)
Constructs new term with specified parameters.

Parameters:
suggestion - text suggested by spell checker
offset - text offset
length - text length

SpellingTerm

public SpellingTerm(java.lang.String text,
                    java.lang.String suggestion,
                    int offset,
                    int length)
Constructs new term with specified parameters.

Parameters:
text - current term text
suggestion - text suggested by spell checker
offset - text offset
length - text length
Method Detail

getSuggestion

public java.lang.String getSuggestion()
Get spell checker suggested text.

Returns:
suggestion string.

getText

public java.lang.String getText()
Get spell checker initial text.

Returns:
suggestion string.

getOffset

public int getOffset()
Get term offset in the initial query.

Returns:
term offset.

getLength

public int getLength()
Get term length used in the initial query.

Returns:
term length.

isUnknown

public boolean isUnknown()
Indicates whether this term is "unknown".

Returns:
true if term is "unknown" or false otherwise.

isUnsearchable

public boolean isUnsearchable()
Indicates whether this term is "unsearchable".

Returns:
true if term is "unsearchable" or false otherwise.