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

Constructor Index

 o Field(Query, String)
Build a new field using the default attribute set.
 o Field(Query, String, String)
Build a new field specifying the attribute set and field name.

Method Index

 o Check()
Check this field node to see whether it is supported by the source in the query context.
 o ExtractTerms(Vector)
noop for extracting terms from an expnode subtree.
 o GetAttributeSet()
Return the attribute set of this Field
 o GetFieldName()
Return the field name of this node
 o LanguageSupported_p(String)
Predicate answering whether the specfied language is supported for this field.
 o Supported_p()
Predicate answering this field is supported by the source in the query context.
 o TranslateToFilter()
Translate this field node in the context of a source specific filter expression.
 o TranslateToRanking()
Translate this field node in the context of a source specific ranking expression.
 o Unparse()
Return the unparsed string represenation of this field node

Constructors

 o 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.
 o 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

Methods

 o GetFieldName
  public String GetFieldName()
Return the field name of this node
Returns:
the string that is the field name (e.g. title)
 o GetAttributeSet
  public String GetAttributeSet()
Return the attribute set of this Field
Returns:
the String that is the attribute set (e.g., basic-1
 o 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.
 o 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.
 o 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
 o 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
 o 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.
 o 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.
 o 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