Package it.unimi.di.big.mg4j.query.nodes
Class AbstractQueryBuilderVisitor<T>
- java.lang.Object
-
- it.unimi.di.big.mg4j.query.nodes.AbstractQueryBuilderVisitor<T>
-
- All Implemented Interfaces:
QueryBuilderVisitor<T>
,FlyweightPrototype<QueryBuilderVisitor<T>>
- Direct Known Subclasses:
AbstractTermExpander.ExpanderVisitor
,DocumentIteratorBuilderVisitor
public abstract class AbstractQueryBuilderVisitor<T> extends Object implements QueryBuilderVisitor<T>
- Author:
- Sebastiano Vigna
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryBuilderVisitor()
-
Method Summary
Modifier and Type Method Description QueryBuilderVisitor<T>
prepare()
No-op.boolean
visitPre(Align node)
Visits anAlign
node before recursing into the corresponding subtree.boolean
visitPre(And node)
Visits anAnd
node before recursing into the corresponding subtree.boolean
visitPre(Annotation node)
Visits aAnnotation
node before recursing into the corresponding subtree.boolean
visitPre(Consecutive node)
Visits aConsecutive
node before recursing into the corresponding subtree.boolean
visitPre(Containment node)
Visits anContainment
node before recursing into the corresponding subtree.boolean
visitPre(Difference node)
Visits aDifference
node before recursing into the corresponding subtree.boolean
visitPre(Inclusion node)
Visits anInclusion
node before recursing into the corresponding subtree.boolean
visitPre(LowPass node)
Visits aLowPass
node before recursing into the corresponding subtree.boolean
visitPre(MultiTerm node)
Visits aMultiTerm
node before recursing into the corresponding subtree.boolean
visitPre(Not node)
Visits aNot
node before recursing into the corresponding subtree.boolean
visitPre(Or node)
Visits anOr
node before recursing into the corresponding subtree.boolean
visitPre(OrderedAnd node)
Visits anOrderedAnd
node before recursing into the corresponding subtree.boolean
visitPre(Remap node)
Visits aRemap
node before recursing into the corresponding subtree.boolean
visitPre(Select node)
Visits aSelect
node before recursing into the corresponding subtree.boolean
visitPre(Weight node)
Visits aWeight
node before recursing into the corresponding subtree.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unimi.di.big.mg4j.query.nodes.QueryBuilderVisitor
copy, newArray, visit, visit, visit, visit, visit, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost, visitPost
-
-
-
-
Method Detail
-
prepare
public QueryBuilderVisitor<T> prepare()
No-op.- Specified by:
prepare
in interfaceQueryBuilderVisitor<T>
- Returns:
- this visitor.
-
visitPre
public boolean visitPre(And node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits anAnd
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Consecutive node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aConsecutive
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(LowPass node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aLowPass
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Annotation node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aAnnotation
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Not node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aNot
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Or node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits anOr
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(OrderedAnd node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits anOrderedAnd
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Align node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits anAlign
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(MultiTerm node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aMultiTerm
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Select node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aSelect
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Remap node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aRemap
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Weight node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aWeight
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Difference node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits aDifference
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Inclusion node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits anInclusion
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
visitPre
public boolean visitPre(Containment node) throws QueryBuilderVisitorException
Description copied from interface:QueryBuilderVisitor
Visits anContainment
node before recursing into the corresponding subtree.- Specified by:
visitPre
in interfaceQueryBuilderVisitor<T>
- Parameters:
node
- the node to be visited.- Returns:
- true if the visit should continue.
- Throws:
QueryBuilderVisitorException
-
-