All Packages Class Hierarchy This Package Previous Next Index
Class COM.Lexical.Metaphrase.SearchSpec
java.lang.Object
|
+----COM.Lexical.Metaphrase.SearchSpec
- public final class SearchSpec
- extends java.lang.Object
- implements java.lang.Cloneable
Encapsulates the set of parameters for a Metaphrase
search.
Each parameter is exposed as a Property, in accordance with the
JavaBeans specification. Introspection can therefore be used to
determine the set of search parameters which are supported by a
given version of SearchSpec.
Every get<Property>() method which returns a primitive
type should declare that it throws UndefinedException,
to allow the property to be made optional or obsolete in a future
version(s) without breaking backward-compatibility. (Get
methods which return a reference type can simply return null.)
- Version:
- Authority1.1, 11 Apr 2000
- See Also:
- matches(java.lang.String, COM.Lexical.Metaphrase.SearchSpec)
SearchSpec()
- Constructor for a SearchSpec with the default properties.
clone()
- Return a copy of this SearchSpec.
getByScore()
- Get the current setting of byScore.
getConservativeMatch()
- Get the current setting of conservativeMatch.
getGroupLimit()
- Get the current groupLimit.
getGroupMatches()
- Get the current value of groupMatches.
getLimit()
- Get the limit on the number of Match'es to return.
getMultiplexEnabled()
- Get the current setting of multiplexBuffer.
getSemanticClass()
- Get the current semanticClass restriction.
getShortSearch()
- Get the current setting of shortSearch.
getSource()
- Get the current setting of source.
getSpellCheck()
- Get the current setting of spellCheck.
getTermCompletion()
- Get the current value of termCompletion.
setByScore(boolean)
- Specify if matches should be returned in order of score, rather
than the default chunkFlags-based order.
setConservativeMatch(boolean)
- Specify a very conservative (but still norm-based) match.
setGroupLimit(int)
- Specify the limit for the number matches to be returned within
any GroupMatch.
setGroupMatches(boolean)
- Specify that "equal" matches should be returned as a MatchSet.
setLimit(int)
- Set the limit on the number of Match'es to return.
setMultiplexEnabled(boolean)
- Specify whether to use a MultiplexBuffer for the returned
matches.
setSemanticClass(SemanticClass)
- Restrict matches to concepts with the given SemanticClass.
setShortSearch(boolean)
- Specify if term completion should
"short-circuit".
setSource(Source)
- Specify SourceMatches
for source.
setSpellCheck(boolean)
- Specify if spell correction should be enabled.
setTermCompletion(boolean)
- Specify whether to do term completion.
toString()
- Return a String describing the current settings.
SearchSpec
public SearchSpec()
Constructor for a SearchSpec with the default properties.
setLimit
public void setLimit(int limit)
Set the limit on the number of Match'es to return.
getLimit
public int getLimit() throws UndefinedException
Get the limit on the number of Match'es to return.
- Throws:
- UndefinedException - if limit is undefined.
setShortSearch
public void setShortSearch(boolean shortSearch)
Specify if term completion should
"short-circuit".
getShortSearch
public boolean getShortSearch() throws UndefinedException
Get the current setting of shortSearch.
- Throws:
- UndefinedException - if shortSearch is undefined.
setByScore
public void setByScore(boolean byScore)
Specify if matches should be returned in order of score, rather
than the default chunkFlags-based order.
getByScore
public boolean getByScore() throws UndefinedException
Get the current setting of byScore.
- Throws:
- UndefinedException - if byScore is undefined.
setSpellCheck
public void setSpellCheck(boolean spellCheck)
Specify if spell correction should be enabled.
getSpellCheck
public boolean getSpellCheck() throws UndefinedException
Get the current setting of spellCheck.
- Throws:
- UndefinedException - if spellCheck is undefined.
setConservativeMatch
public void setConservativeMatch(boolean conservativeMatch)
Specify a very conservative (but still norm-based) match.
This disables both term completion and substring matching.
getConservativeMatch
public boolean getConservativeMatch() throws UndefinedException
Get the current setting of conservativeMatch.
- Throws:
- UndefinedException - if conservativeMatch is undefined.
setSource
public void setSource(Source source)
Specify SourceMatches
for source. Set to null to restore the default behavior (matching
to concepts).
getSource
public Source getSource()
Get the current setting of source.
setSemanticClass
public void setSemanticClass(SemanticClass sClass)
Restrict matches to concepts with the given SemanticClass.
- See Also:
- SemanticClassifier
getSemanticClass
public SemanticClass getSemanticClass()
Get the current semanticClass restriction.
setGroupMatches
public void setGroupMatches(boolean b)
Specify that "equal" matches should be returned as a MatchSet.
Matches are "equal" iff they have the same score and chunkFlags.
getGroupMatches
public boolean getGroupMatches() throws UndefinedException
Get the current value of groupMatches.
- Throws:
- UndefinedException - if groupMatches is undefined.
setGroupLimit
public void setGroupLimit(int groupLimit)
Specify the limit for the number matches to be returned within
any GroupMatch.
getGroupLimit
public int getGroupLimit() throws UndefinedException
Get the current groupLimit.
- Throws:
- UndefinedException - if groupLimit is undefined.
setTermCompletion
public void setTermCompletion(boolean b)
Specify whether to do term completion.
getTermCompletion
public boolean getTermCompletion() throws UndefinedException
Get the current value of termCompletion.
- Throws:
- UndefinedException - if termCompletion is undefined.
setMultiplexEnabled
public void setMultiplexEnabled(boolean b)
Specify whether to use a MultiplexBuffer for the returned
matches. Only used for backward compatibility testing.
getMultiplexEnabled
public boolean getMultiplexEnabled() throws UndefinedException
Get the current setting of multiplexBuffer.
- Throws:
- UndefinedException - if multiplexBuffer is undefined.
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Return a copy of this SearchSpec.
toString
public java.lang.String toString()
Return a String describing the current settings.
- Overrides:
- toString in class java.lang.Object
All Packages Class Hierarchy This Package Previous Next Index