Class query.Field
All Packages Class Hierarchy This Package Previous Next Index
Class query.Field
java.lang.Object
|
+----query.ExpNode
|
+----query.Field
- public class Field
- extends ExpNode
- implements STARTSnode, FilterNode, RankingNode
An ExpNode that represents a Field node in either a ranking or
filter expression. Field nodes have no children and two properties:
- field name: string
- attribute set: string
-
Field(Query, String)
- Build a new field using the default attribute set.
-
Field(Query, String, String)
- Build a new field specifying the attribute set and field
name.
-
Check()
- Check this field node to see whether it is supported by the
source in the query context.
-
ExtractTerms(Vector)
- noop for extracting terms from an expnode subtree.
-
GetAttributeSet()
- Return the attribute set of this Field
-
GetFieldName()
- Return the field name of this node
-
LanguageSupported_p(String)
- Predicate answering whether the specfied language is supported
for this field.
-
Supported_p()
- Predicate answering this field is supported by the source in
the query context.
-
TranslateToFilter()
- Translate this field node in the context of a source
specific filter expression.
-
TranslateToRanking()
- Translate this field node in the context of a source
specific ranking expression.
-
Unparse()
- Return the unparsed string represenation of this field node
Field
public Field(Query query,
String field)
- Build a new field using the default attribute set.
- Parameters:
- query - the query context of this node
- field - the field name for this field node.
Field
public Field(Query query,
String attributeSet,
String field)
- Build a new field specifying the attribute set and field
name.
- Parameters:
- query - the query context for this node.
- attributeSet - the attribute set
- field - the field name
GetFieldName
public String GetFieldName()
- Return the field name of this node
- Returns:
- the string that is the field name (e.g. title)
GetAttributeSet
public String GetAttributeSet()
- Return the attribute set of this Field
- Returns:
- the String that is the attribute set (e.g.,
basic-1
Supported_p
public boolean Supported_p()
- Predicate answering this field is supported by the source in
the query context.
- Returns:
- true or false depending on wheter this Field is supported
by its Query context.
LanguageSupported_p
public boolean LanguageSupported_p(String language)
- Predicate answering whether the specfied language is supported
for this field.
- Parameters:
- language - the language in ISO format
- Returns:
- true or false depending on whether the input language
is supported for this field.
Unparse
public String Unparse()
- Return the unparsed string represenation of this field node
- Returns:
- the Sting representation of this Field node.
- Overrides:
- Unparse in class ExpNode
Check
public ExpNode Check() throws UnsupportedQueryException
- Check this field node to see whether it is supported by the
source in the query context. If not supported, then
return the "wildcard" field "any". If supported then
return the field node
TranslateToFilter
public ExpNode TranslateToFilter() throws SourceQueryException
- Translate this field node in the context of a source
specific filter expression.
- Returns:
- the sub-tree that is the source translated filter
equivalanet of this Field subtree.
- Throws: SourceQueryException
- if there are translation
errors.
TranslateToRanking
public ExpNode TranslateToRanking() throws SourceQueryException
- Translate this field node in the context of a source
specific ranking expression.
- Returns:
- the subtree that is the source equivalent ranking
expression for this Field sub-tree.
- Throws: SourceQueryException
- if there are translations
errors.
ExtractTerms
public void ExtractTerms(Vector termVector)
- noop for extracting terms from an expnode subtree. Must be
defined since the superclass defines it as abstract, but
nothing ever descends from Fields so do nothing.
All Packages Class Hierarchy This Package Previous Next Index