|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.query.parser.alt.AbstractAlternation
public abstract class AbstractAlternation
Base abstraction class for any Alternation implementation. Contains helper methods that are typically used within the alternation process. Some of these methods inturn delegate to visitor implementations found under the finder package.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface no.sesat.search.query.parser.alt.Alternation |
|---|
Alternation.Context |
| Field Summary | |
|---|---|
protected Alternation.Context |
context
The context to work within. |
| Constructor Summary | |
|---|---|
AbstractAlternation(Alternation.Context cxt)
Creates a new instance of AbstractAlternation |
|
| Method Summary | ||
|---|---|---|
protected
|
createOperatorClause(Clause left,
Clause right,
T replacementFor)
Create a new operator clause, of type opCls, with the left and right children. |
|
protected XorClause |
createXorClause(LinkedList<? extends Clause> alternatives)
Create XorClauses required to present all the alternatives in the query tree. |
|
protected abstract XorClause.Hint |
getAlternationHint()
What XorClause.Hint is used for newly created XorClause alternations. |
|
protected Clause |
leftChild(UnaryClause clause)
return the left child, left or operation. |
|
protected
|
leftOpChild(T clause)
will return null instead of a leafClause |
|
protected
|
parent(T root,
Clause child)
return the parent operation clause of the given child. |
|
protected
|
parents(T root,
Clause child)
return all parents operation clauses of the given child. |
|
protected UnaryClause |
replaceDescendant(BinaryClause root,
BinaryClause newChild,
BinaryClause originalChild,
BinaryClause originalParent)
Build new DoubleOperatorClauses from newChild all the way back up to the root. |
|
protected
|
replaceOperatorClause(Clause newChild,
Clause originalChild,
T originalParent)
Replace the originalChild that exists under the originalParent will the newChild. |
|
protected Clause |
rightChild(BinaryClause clause)
will return right child, leaf or operation. |
|
protected
|
rightOpChild(T clause)
will return null instead of a leafClause |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface no.sesat.search.query.parser.alt.Alternation |
|---|
alternate |
| Field Detail |
|---|
protected final Alternation.Context context
| Constructor Detail |
|---|
public AbstractAlternation(Alternation.Context cxt)
cxt - | Method Detail |
|---|
protected <T extends BinaryClause> T leftOpChild(T clause)
clause -
protected Clause leftChild(UnaryClause clause)
clause -
protected <T extends BinaryClause> T rightOpChild(T clause)
clause -
protected Clause rightChild(BinaryClause clause)
clause -
protected <T extends UnaryClause> T parent(T root,
Clause child)
child - root -
protected <T extends UnaryClause> List<T> parents(T root,
Clause child)
root - child -
protected UnaryClause replaceDescendant(BinaryClause root,
BinaryClause newChild,
BinaryClause originalChild,
BinaryClause originalParent)
root - the root clause. an altered version of this will be returned.newChild - the new child.originalChild - the original child.originalParent - the original parent of the original child. expected to be found under root.
protected <T extends UnaryClause> T replaceOperatorClause(Clause newChild,
Clause originalChild,
T originalParent)
newChild - originalChild - originalParent -
protected <T extends UnaryClause> T createOperatorClause(Clause left,
Clause right,
T replacementFor)
left - right - replacementFor -
protected XorClause createXorClause(LinkedList<? extends Clause> alternatives)
alternatives - what will be leaves of the right-leaning XorClause branch returned
protected abstract XorClause.Hint getAlternationHint()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||