atg.search.routing.command.search
Class QueryTerm

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.search.QueryTerm
All Implemented Interfaces:
java.io.Serializable

public class QueryTerm
extends atg.search.routing.command.SearchXMLObject

Represents a query term.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
QueryTerm()
           
 
Method Summary
 void addStem(atg.search.routing.command.search.Stem stem)
          Sets the index term stem
 boolean equals(java.lang.Object pObject)
           
 int getAdjacency()
          Indicates whether the term has adjacency constraints to the previous term
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
protected  void getBodyXML(java.lang.StringBuilder sb)
           
 java.lang.String getBroken()
          Returns what the term's broken attribute is: no, first, middle, last.
 Case getCase()
          Indicates how the term is case constrained
 java.lang.String getContext()
          Returns what dictionary adaptors were used for expansions
 java.lang.String getCorrection()
          Deprecated. see getCorrections()
 java.util.List<java.lang.String> getCorrections()
          Returns the list of corrections
 Expansions getExpansions()
          Returns the List of Expansions of this query term
 java.lang.String getExptype()
          Indicates what type (POS) of expansion was used
 int getFreq()
          Returns the term frequency
 int getIdx()
          Returns the index of term
 java.lang.String getMorphEndings()
          Returns the morphological endings and prefixes removed from the index term
 java.lang.String getNorm()
          Returns the normalized form of term
 TermOp getOp()
          Returns the simple boolean operator of term
 java.lang.String getPostag()
          Returns what surface POS was assigned to this term
 java.lang.String getQuote()
          Returns the quote
 java.lang.String getRequestTag()
           
 SpellingType getSpelling()
          Indicates whether the term was spell corrected, either with the internal or wintertree checkers
 java.util.List<atg.search.routing.command.search.Stem> getStems()
          Returns the List of Stems--index terms of the query term
 java.lang.String getText()
          Returns the text of term
 int getWeight()
          Returns the term weight
 int hashCode()
           
 boolean isDisconnected()
          Indicates whether the term is connected to the prior term
 boolean isExpand()
          Indicates whether the term is expandable
 boolean isMorph()
          Indicates whether the term is morphologically constrained
 boolean isOrdered()
          Indicates whether the term is order constrained to the previous term
 boolean isPhraseExpand()
          Indicates whether the term is phrase expandable only
 boolean isWildcard()
          Indicates whether the term was a wildcard
 void setAdjacency(int adjacency)
          Sets whether the term has adjacency constraints to the previous term
 void setBroken(java.lang.String broken)
          Sets what the term's broken attribute is: no, first, middle, last.
 void setCase(Case pCase)
          Sets how the term is case constrained
 void setContext(java.lang.String context)
          Sets what dictionary adaptors were used for expansions
 void setCorrections(java.util.List<java.lang.String> pCorrections)
          Sets the spell-corrected terms
 void setDisconnected(boolean pDisconnected)
          Sets whether the term is connected to the prior term
 void setExpand(boolean expand)
          Sets whether the term is expandable
 void setExpansions(Expansions expansions)
          Sets the List of Expansions of this query term
 void setExptype(java.lang.String exptype)
          Sets what type (POS) of expansion was used
 void setFreq(int freq)
          Sets the term frequency
 void setIdx(int idx)
          Sets the index of term
 void setMorph(boolean morph)
          Sets whether the term is morphologically constrained
 void setMorphEndings(java.lang.String morphEndings)
          Sets the morphological endings and prefixes removed from the index term
 void setNorm(java.lang.String pNorm)
          Sets the normalized form of term
 void setOp(TermOp op)
          Sets the simple boolean operator of term
 void setOrdered(boolean ordered)
          Sets whether the term is order constrained to the previous term
 void setPhraseExpand(boolean phraseExpand)
          Sets whether the term is phrase expandable only
 void setPostag(java.lang.String postag)
          Sets what surface POS was assigned to this term
 void setQuote(java.lang.String pQuote)
          Sets the quote
 void setSpelling(SpellingType spelling)
          Sets whether the term was spell corrected, either with the internal or wintertree checkers
 void setStems(java.util.List<atg.search.routing.command.search.Stem> stems)
          Sets the List of Stems--index terms of the query term
 void setText(java.lang.String text)
          Sets the text of term
 void setWeight(int weight)
          Sets the term weight
 void setWildcard(boolean pWildcard)
          Sets whether the term was a wildcard
 
Methods inherited from class atg.search.routing.command.SearchXMLObject
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

QueryTerm

public QueryTerm()
Method Detail

equals

public boolean equals(java.lang.Object pObject)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getIdx

public int getIdx()
Returns the index of term

Returns:
Index of term

setIdx

public void setIdx(int idx)
Sets the index of term

Parameters:
idx - Index of term

getOp

public TermOp getOp()
Returns the simple boolean operator of term

Returns:
Simple boolean operator of term

setOp

public void setOp(TermOp op)
Sets the simple boolean operator of term

Parameters:
op - Simple boolean operator of term

getWeight

public int getWeight()
Returns the term weight

Returns:
term weight

setWeight

public void setWeight(int weight)
Sets the term weight

Parameters:
weight - term weight

isDisconnected

public boolean isDisconnected()
Indicates whether the term is connected to the prior term

Returns:
whether the term is connected to the prior term

setDisconnected

public void setDisconnected(boolean pDisconnected)
Sets whether the term is connected to the prior term

Parameters:
pDisconnected - whether the term is connected to the prior term

getFreq

public int getFreq()
Returns the term frequency

Returns:
term frequency

setFreq

public void setFreq(int freq)
Sets the term frequency

Parameters:
freq - term frequency

isExpand

public boolean isExpand()
Indicates whether the term is expandable

Returns:
Whether the term is expandable

setExpand

public void setExpand(boolean expand)
Sets whether the term is expandable

Parameters:
expand - Whether the term is expandable

isPhraseExpand

public boolean isPhraseExpand()
Indicates whether the term is phrase expandable only

Returns:
Whether the term is phrase expandable only

setPhraseExpand

public void setPhraseExpand(boolean phraseExpand)
Sets whether the term is phrase expandable only

Parameters:
phraseExpand - Whether the term is phrase expandable only

isWildcard

public boolean isWildcard()
Indicates whether the term was a wildcard

Returns:
whether the term was a wildcard

setWildcard

public void setWildcard(boolean pWildcard)
Sets whether the term was a wildcard

Parameters:
pWildcard - whether the term was a wildcard

isMorph

public boolean isMorph()
Indicates whether the term is morphologically constrained

Returns:
Whether the term is morphologically constrained

setMorph

public void setMorph(boolean morph)
Sets whether the term is morphologically constrained

Parameters:
morph - Whether the term is morphologically constrained

isOrdered

public boolean isOrdered()
Indicates whether the term is order constrained to the previous term

Returns:
Whether the term is order constrained to the previous term

setOrdered

public void setOrdered(boolean ordered)
Sets whether the term is order constrained to the previous term

Parameters:
ordered - Whether the term is order constrained to the previous term

getAdjacency

public int getAdjacency()
Indicates whether the term has adjacency constraints to the previous term

Returns:
Whether the term has adjacency constraints to the previous term

setAdjacency

public void setAdjacency(int adjacency)
Sets whether the term has adjacency constraints to the previous term

Parameters:
adjacency - Whether the term has adjacency constraints to the previous term

getBroken

public java.lang.String getBroken()
Returns what the term's broken attribute is: no, first, middle, last. For terms like airfare -> air, fare

Returns:
What the term's broken attribute is: no, first, middle, last. For terms like airfare -> air, fare

setBroken

public void setBroken(java.lang.String broken)
Sets what the term's broken attribute is: no, first, middle, last. For terms like airfare -> air, fare

Parameters:
broken - Sets the terms' broken attribute

getExptype

public java.lang.String getExptype()
Indicates what type (POS) of expansion was used

Returns:
What type (POS) of expansion was used

setExptype

public void setExptype(java.lang.String exptype)
Sets what type (POS) of expansion was used

Parameters:
exptype - What type (POS) of expansion was used

getContext

public java.lang.String getContext()
Returns what dictionary adaptors were used for expansions

Returns:
What dictionary adaptors were used for expansions

setContext

public void setContext(java.lang.String context)
Sets what dictionary adaptors were used for expansions

Parameters:
context - What dictionary adaptors were used for expansions

getPostag

public java.lang.String getPostag()
Returns what surface POS was assigned to this term

Returns:
What surface POS was assigned to this term

setPostag

public void setPostag(java.lang.String postag)
Sets what surface POS was assigned to this term

Parameters:
postag - What surface POS was assigned to this term

getMorphEndings

public java.lang.String getMorphEndings()
Returns the morphological endings and prefixes removed from the index term

Returns:
The morphological endings and prefixes removed from the index term

setMorphEndings

public void setMorphEndings(java.lang.String morphEndings)
Sets the morphological endings and prefixes removed from the index term

Parameters:
morphEndings - The morphological endings and prefixes removed from the index term

getSpelling

public SpellingType getSpelling()
Indicates whether the term was spell corrected, either with the internal or wintertree checkers

Returns:
Whether the term was spell corrected, either with the internal or wintertree checkers

setSpelling

public void setSpelling(SpellingType spelling)
Sets whether the term was spell corrected, either with the internal or wintertree checkers

Parameters:
spelling - Whether the term was spell corrected, either with the internal or wintertree checkers

getText

public java.lang.String getText()
Returns the text of term

Returns:
text of term

setText

public void setText(java.lang.String text)
Sets the text of term

Parameters:
text - text of term

getCorrection

public java.lang.String getCorrection()
Deprecated. see getCorrections()

Returns the spell-corrected term

Returns:
spell-corrected term

setCorrections

public void setCorrections(java.util.List<java.lang.String> pCorrections)
Sets the spell-corrected terms

Parameters:
pCorrections - spell-corrected term

getCorrections

public java.util.List<java.lang.String> getCorrections()
Returns the list of corrections


getNorm

public java.lang.String getNorm()
Returns the normalized form of term

Returns:
normalized form of term

setNorm

public void setNorm(java.lang.String pNorm)
Sets the normalized form of term

Parameters:
pNorm - normalized form of term

getStems

public java.util.List<atg.search.routing.command.search.Stem> getStems()
Returns the List of Stems--index terms of the query term

Returns:
List of Stems--index terms of the query term

setStems

public void setStems(java.util.List<atg.search.routing.command.search.Stem> stems)
Sets the List of Stems--index terms of the query term

Parameters:
stems - List of Stems--index terms of the query term

addStem

public void addStem(atg.search.routing.command.search.Stem stem)
Sets the index term stem

Parameters:
stem - index term stem

getExpansions

public Expansions getExpansions()
Returns the List of Expansions of this query term

Returns:
List of Expansions of this query term

setExpansions

public void setExpansions(Expansions expansions)
Sets the List of Expansions of this query term

Parameters:
expansions - List of Expansions of this query term

setCase

public void setCase(Case pCase)
Sets how the term is case constrained

Parameters:
pCase - how the term is case constrained

getCase

public Case getCase()
Indicates how the term is case constrained

Returns:
how the term is case constrained

getRequestTag

public java.lang.String getRequestTag()
Specified by:
getRequestTag in class atg.search.routing.command.SearchXMLObject

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder sb)
                        throws atg.search.routing.command.IncompleteCommandException
Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

getBodyXML

protected void getBodyXML(java.lang.StringBuilder sb)
                   throws atg.search.routing.command.IncompleteCommandException
Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

setQuote

public void setQuote(java.lang.String pQuote)
Sets the quote

Parameters:
pQuote - the quote

getQuote

public java.lang.String getQuote()
Returns the quote

Returns:
the quote