|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.di.mg4j.query.nodes.CheckForSelectQueryVisitor
public class CheckForSelectQueryVisitor
A QueryBuilderVisitor
that
returns Boolean.FALSE
only if the visited query contains a Select
node
that does not lie in the aligner of an Align
query (as in that case
the index is not part of the answer).
Field Summary | |
---|---|
String |
errorMessage
|
Constructor Summary | |
---|---|
CheckForSelectQueryVisitor(String defaultIndex)
|
Method Summary | |
---|---|
QueryBuilderVisitor<Set<String>> |
copy()
|
Set<String>[] |
newArray(int len)
Builds an array of given length of type T . |
QueryBuilderVisitor<Set<String>> |
prepare()
Prepares the internal state of this visitor for a(nother) visit. |
Set<String> |
visit(False node)
Visits False . |
Set<String> |
visit(Prefix node)
Visits a Prefix . |
Set<String> |
visit(Range node)
Visits a Range . |
Set<String> |
visit(Term node)
Visits a Term . |
Set<String> |
visit(True node)
Visits True . |
Set<String> |
visitPost(Align node,
Set<String>[] v)
Visits an Align node after recursing into the corresponding subtree. |
Set<String> |
visitPost(And node,
Set<String>[] v)
Visits an And node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Consecutive node,
Set<String>[] v)
Visits a Consecutive node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Difference node,
Set<String>[] v)
Visits an Difference node after recursing into the corresponding subtree. |
Set<String> |
visitPost(LowPass node,
Set<String> v)
Visits a LowPass node after recursing into the corresponding subtree. |
Set<String> |
visitPost(MultiTerm node,
Set<String>[] v)
Visits a MultiTerm node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Not node,
Set<String> v)
Visits a Not node after recursing into the corresponding subtree. |
Set<String> |
visitPost(OrderedAnd node,
Set<String>[] v)
Visits an OrderedAnd node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Or node,
Set<String>[] v)
Visits an Or node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Remap node,
Set<String> v)
Visits a Remap node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Select node,
Set<String> v)
Visits a Select node after recursing into the corresponding subtree. |
Set<String> |
visitPost(Weight node,
Set<String> v)
Visits a Weight node after recursing into the corresponding subtree. |
boolean |
visitPre(Align node)
Visits an Align node before recursing into the corresponding subtree. |
boolean |
visitPre(And node)
Visits an And node before recursing into the corresponding subtree. |
boolean |
visitPre(Consecutive node)
Visits a Consecutive node before recursing into the corresponding subtree. |
boolean |
visitPre(Difference node)
Visits an Difference node before recursing into the corresponding subtree. |
boolean |
visitPre(LowPass node)
Visits a LowPass node before recursing into the corresponding subtree. |
boolean |
visitPre(MultiTerm node)
Visits a MultiTerm node before recursing into the corresponding subtree. |
boolean |
visitPre(Not node)
Visits a Not node before recursing into the corresponding subtree. |
boolean |
visitPre(Or node)
Visits an Or node before recursing into the corresponding subtree. |
boolean |
visitPre(OrderedAnd node)
Visits an OrderedAnd node before recursing into the corresponding subtree. |
boolean |
visitPre(Remap node)
Visits a Remap node before recursing into the corresponding subtree. |
boolean |
visitPre(Select node)
Visits a Select node before recursing into the corresponding subtree. |
boolean |
visitPre(Weight node)
Visits a Weight 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 |
Field Detail |
---|
public String errorMessage
Constructor Detail |
---|
public CheckForSelectQueryVisitor(String defaultIndex)
Method Detail |
---|
public QueryBuilderVisitor<Set<String>> prepare()
QueryBuilderVisitor
By specification, it must be safe to call this method any number of times.
prepare
in interface QueryBuilderVisitor<Set<String>>
public Set<String>[] newArray(int len)
QueryBuilderVisitor
T
.
Because of erasure, generic classes in Java cannot allocate arrays
of generic types. This impossibility can be a problem if for some reason
the visitPost()
methods expect an actual array of
type T
. This method must provide an array of given length
that is an acceptable input for all visitPost()
methods.
Note that by declaring an implementing class of this interface
that has a sole constructor accepting an argument of type Class<T>
,
you will force the user to provide the class of the generic type, opening
the way for the reflective methods in Array
.
newArray
in interface QueryBuilderVisitor<Set<String>>
len
- the required array length.
T
of length len
.public QueryBuilderVisitor<Set<String>> copy()
copy
in interface QueryBuilderVisitor<Set<String>>
copy
in interface FlyweightPrototype<QueryBuilderVisitor<Set<String>>>
public boolean visitPre(And node) throws QueryBuilderVisitorException
QueryBuilderVisitor
And
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Consecutive node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Consecutive
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(LowPass node) throws QueryBuilderVisitorException
QueryBuilderVisitor
LowPass
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Not node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Not
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Or node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Or
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(OrderedAnd node) throws QueryBuilderVisitorException
QueryBuilderVisitor
OrderedAnd
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Align node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Align
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(MultiTerm node) throws QueryBuilderVisitorException
QueryBuilderVisitor
MultiTerm
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Select node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Select
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Remap node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Remap
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Weight node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Weight
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Difference node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Difference
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Set<String>>
node
- the node to be visited.
QueryBuilderVisitorException
public Set<String> visitPost(And node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
And
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the array of results returned by subnodes.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Consecutive node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Consecutive
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the array of results returned by subnodes.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(LowPass node, Set<String> v) throws QueryBuilderVisitorException
QueryBuilderVisitor
LowPass
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the of result returned by the sole subnode.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Not node, Set<String> v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Not
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the of result returned by the sole subnode.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Or node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Or
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(OrderedAnd node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
OrderedAnd
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the array of results returned by subnodes.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Align node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Align
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the array of results returned by subnodes.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(MultiTerm node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
MultiTerm
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the of result returned by the sole subnode.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Select node, Set<String> v)
QueryBuilderVisitor
Select
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the of result returned by the sole subnode.
subNodeResult
) if the visit should continue, or null
.public Set<String> visitPost(Remap node, Set<String> v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Remap
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the of result returned by the sole subnode.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Weight node, Set<String> v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Weight
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the of result returned by the sole subnode.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visitPost(Difference node, Set<String>[] v) throws QueryBuilderVisitorException
QueryBuilderVisitor
Difference
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Set<String>>
node
- the internal node to be visited.v
- the array of results returned by subnodes.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visit(Term node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Term
.
visit
in interface QueryBuilderVisitor<Set<String>>
node
- the leaf to be visited.
QueryBuilderVisitorException
public Set<String> visit(Prefix node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Prefix
.
visit
in interface QueryBuilderVisitor<Set<String>>
node
- the leaf to be visited.
subNodeResult
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Set<String> visit(Range node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Range
.
visit
in interface QueryBuilderVisitor<Set<String>>
node
- the leaf to be visited.
QueryBuilderVisitorException
public Set<String> visit(True node) throws QueryBuilderVisitorException
QueryBuilderVisitor
True
.
visit
in interface QueryBuilderVisitor<Set<String>>
node
- the leaf to be visited.
QueryBuilderVisitorException
public Set<String> visit(False node) throws QueryBuilderVisitorException
QueryBuilderVisitor
False
.
visit
in interface QueryBuilderVisitor<Set<String>>
node
- the leaf to be visited.
QueryBuilderVisitorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |