Class TrueTermsCollectionVisitor
- java.lang.Object
-
- it.unimi.di.big.mg4j.search.visitor.AbstractDocumentIteratorVisitor
-
- it.unimi.di.big.mg4j.search.visitor.TrueTermsCollectionVisitor
-
- All Implemented Interfaces:
DocumentIteratorVisitor<Boolean>
public class TrueTermsCollectionVisitor extends AbstractDocumentIteratorVisitor
A visitor collecting terms that satisfy a query for the current document.True terms are terms reachable by true paths. This visitor collects true terms are exposes them in the public
trueTerms
variable, in the order in which they appear in a visit of the iterator.
-
-
Constructor Summary
Constructors Constructor Description TrueTermsCollectionVisitor()
Creates a new visitor collecting true terms.
-
Method Summary
Modifier and Type Method Description AbstractDocumentIteratorVisitor
prepare()
Prepares the internal state of this visitor for a(nother) visit.String
toString()
Boolean
visit(IndexIterator indexIterator)
Visits anIndexIterator
leaf.Boolean
visit(MultiTermIndexIterator multiTermIndexIterator)
Visits aMultiTermIndexIterator
leaf.
-
-
-
Method Detail
-
prepare
public AbstractDocumentIteratorVisitor prepare()
Description copied from interface:DocumentIteratorVisitor
Prepares the internal state of this visitor for a(nother) visit.By specification, it must be safe to call this method any number of times.
- Specified by:
prepare
in interfaceDocumentIteratorVisitor<Boolean>
- Overrides:
prepare
in classAbstractDocumentIteratorVisitor
- Returns:
- this visitor.
-
visit
public Boolean visit(IndexIterator indexIterator) throws IOException
Description copied from interface:DocumentIteratorVisitor
Visits anIndexIterator
leaf.- Parameters:
indexIterator
- the leaf to be visited.- Returns:
- an appropriate return value if the visit should continue, or
null
. - Throws:
IOException
-
visit
public Boolean visit(MultiTermIndexIterator multiTermIndexIterator) throws IOException
Description copied from interface:DocumentIteratorVisitor
Visits aMultiTermIndexIterator
leaf.- Specified by:
visit
in interfaceDocumentIteratorVisitor<Boolean>
- Overrides:
visit
in classAbstractDocumentIteratorVisitor
- Parameters:
multiTermIndexIterator
- the leaf to be visited.- Returns:
- an appropriate return value if the visit should continue, or
null
. - Throws:
IOException
-
-