A BasicQueryNode is an implementation of QueryNode.
It also implements QueryIndexGenerator and RWTupleStructure (it is its own
TupleStructure).
addCalculatedField
public CalculatedField addCalculatedField(String name,
PType type,
Expression exp)
throws MedorException
Creates and adds a CalculatedField to the TupleStructure of the
QueryNode.
- addCalculatedField in interface QueryNode
name
- is the name of the Field to be added.type
- is the PType of the Field to be added.exp
- is the Expression for calculating the new Field.
- the newly created CalculatedField
MedorException
- when a Field with the same name already exists.
addChild
protected void addChild(QueryTree qt)
addField
protected void addField(Field f)
Adds a Field to the current RWTupleStructure
f
- The Field to be added.
addPropagatedField
public PropagatedField addPropagatedField(String name,
PType type,
QueryTreeField[] anc)
throws MedorException
Creates and adds a PropagatedField to the TupleStructure of the
QueryNode.
name
- is the name of the Field to be added.type
- is the PType of the Field to be added.anc
- are the origin Fields for the PropagatedField to be created.
- the newly created PropagatedField
MedorException
- when a Field with the same name already exists.
clone
public Object clone(Object clone,
Map obj2clone)
throws CloneNotSupportedException
- clone in interface BasicQueryTree
getFieldName
protected String getFieldName(String nodeName,
String fieldName)
getQueryFilter
public Expression getQueryFilter()
Retrieves the filter associated to the QueryTree. This filter is
represented by an Expression.
- getQueryFilter in interface FilteredQueryTree
- the query filter Expression associated to the QueryNode.
Expression
removeField
public QueryTreeField removeField(String name)
throws MedorException
Removes a Field.
- removeField in interface QueryNode
name
- is the name of the Field to be removed.
- the Field which has been removed, or null if no such Field could
be removed.
setQueryFilter
public void setQueryFilter(Expression filter)
throws UnsupportedOperationException
The setQueryFilter method will be overwritten for implementations
which do not support the operation.
- setQueryFilter in interface FilteredQueryTree
updateChildren
protected void updateChildren()
Updates the list of children by screening all Fields and the
query filter.