Class query.WeightedRanking
All Packages Class Hierarchy This Package Previous Next Index
Class query.WeightedRanking
java.lang.Object
|
+----query.ExpNode
|
+----query.WeightedRanking
- public class WeightedRanking
- extends ExpNode
- implements STARTSnode, RankingNode
An ExpNode that represents a weighted ranking operator in a STARTS
ranking expressin. Weighted Ranking nodes have one child and one
property:
ranking value - a float value that is the weight.
-
WeightedRanking(Query, float)
- Construct a new WeightedRanking node
-
Check()
- Return a new sub-tree that is the result of checking (for both
semantic sanity and source support) the sub-tree that descends
from this WeightedRanking node.
-
ExtractTerms(Vector)
- Recurse from this sub-tree to extract the terms in the sub-tree
-
GetRankingValue()
- Return the ranking value of this node
-
TranslateToRanking()
- Return the sub-tree that represents the source-specific
translation of this weighted ranking sub-tree
-
Unparse()
- Return the string representation of the sub-tree descending
from the WeightedRanking node
WeightedRanking
public WeightedRanking(Query query,
float rankingValue)
- Construct a new WeightedRanking node
- Parameters:
- query - The query context of this node
- rankingValue - The weight of the node
GetRankingValue
public float GetRankingValue()
- Return the ranking value of this node
- Returns:
- the ranking value of this node.
Unparse
public String Unparse()
- Return the string representation of the sub-tree descending
from the WeightedRanking node
- Returns:
- String the string equivalent of this WeightedRanking
subtree.
- Overrides:
- Unparse in class ExpNode
Check
public ExpNode Check() throws UnsupportedQueryException
- Return a new sub-tree that is the result of checking (for both
semantic sanity and source support) the sub-tree that descends
from this WeightedRanking node.
- Returns:
- the transformed Weighted Ranking sub-tree as a result
of the check process.
- Throws: UnsupporteQueryException
- if an error is found in the
subtree during the checking process.
TranslateToRanking
public ExpNode TranslateToRanking() throws SourceQueryException
- Return the sub-tree that represents the source-specific
translation of this weighted ranking sub-tree
- Returns:
- the source equivalent ranking sub-tree of this Weighted
ranking sub-tree
- Throws: SourceQueryException
- if an error occurs in the
translation process.
ExtractTerms
public void ExtractTerms(Vector termVector)
- Recurse from this sub-tree to extract the terms in the sub-tree
- Parameters:
- rankingTerms - The vector of terms.
All Packages Class Hierarchy This Package Previous Next Index