public class TreeClause extends DocFilter
Constructor and Description |
---|
TreeClause() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DataRecord rec)
Return whether the DataRecord is accepted by this filter.
|
void |
addTerm(DocFilter term)
Add a term to this tree clause.
|
void |
addTerms(java.util.Set<DocFilter> queryTerms)
Add a set of terms to this clause
|
void |
clearTerms()
Remove all terms from this TreeClause.
|
boolean |
equals(java.lang.Object obj)
Determine whether another object is equal to this one.
|
java.util.Set<DocFilter> |
getTerms()
Get the set of terms for this clause
|
int |
hashCode()
Return the hash code for this MatchFilter
|
boolean |
isAnd()
Return whether this tree is an AND tree.
|
boolean |
isFlat()
Return whether this Boolean clause is flat.
|
protected boolean |
matchDoc(DocData doc)
Return whether the represented document is accepted by this filter.
|
void |
setAnd(boolean andFlag)
Set whether this tree is an AND tree or an OR tree.
|
java.lang.String |
toString()
Convert this query tree to its string representation
|
java.lang.String |
toTagString()
Return a string representation, replacing any clauses with their tags
|
accept, filterDocuments, getTag, setTag
filterRecords
public boolean accept(DataRecord rec)
accept
in class DataFilter
rec
- the data record to match.public void addTerm(DocFilter term)
term
- the term to add to this clausepublic void addTerms(java.util.Set<DocFilter> queryTerms)
queryTerms
- the terms to addpublic void clearTerms()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to comparepublic java.util.Set<DocFilter> getTerms()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isAnd()
public boolean isFlat()
protected boolean matchDoc(DocData doc)
public void setAnd(boolean andFlag)
andFlag
- true if the tree is an AND tree. True by default.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toTagString()