|
|||||||||
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.AbstractTermExpander
public abstract class AbstractTermExpander
A query transformer that just requires implementing a method that expands terms (e.g., into disjunctive queries).
To implement more sophisticated behaviours, you can subclass the internal
class AbstractTermExpander.ExpanderVisitor
, and override the method
expanderVisitor()
so that it returns a (possibly cached) instance of
your own visitor class (see, for an example, MultiIndexTermExpander
).
Nested Class Summary | |
---|---|
protected class |
AbstractTermExpander.ExpanderVisitor
|
Constructor Summary | |
---|---|
AbstractTermExpander()
|
Method Summary | |
---|---|
abstract Query |
expand(Prefix prefix)
Expands a prefix. |
abstract Query |
expand(Term term)
Expands a single term. |
protected AbstractTermExpander.ExpanderVisitor |
expanderVisitor()
Returns a new expander visitor. |
Query |
transform(Query query)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTermExpander()
Method Detail |
---|
protected AbstractTermExpander.ExpanderVisitor expanderVisitor()
public Query transform(Query query)
transform
in interface QueryTransformer
public abstract Query expand(Term term)
term
- a term to be expanded.
public abstract Query expand(Prefix prefix)
prefix
- the prefix to be expanded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |