Package com.yahoo.document.select
Class DocumentSelector
java.lang.Object
com.yahoo.document.select.DocumentSelector
A document selector is a filter which accepts or rejects documents
based on their type and content. A document selector has a textual
representation which is called the
document selection language.
Document selectors are multithread safe.
- Author:
- bratseth
-
Constructor Summary
ConstructorDescriptionDocumentSelector
(String selector) Creates a document selector from a Document Selection Language string -
Method Summary
Modifier and TypeMethodDescriptionReturns true if the document referenced by this document operation is accepted by this selectorReturns true if the document referenced by this context is accepted by this selectorReturns the list of different variables resulting in a true state for this expressiontoString()
Returns this selector as a Document Selection Language stringvoid
Visits the expression tree
-
Constructor Details
-
DocumentSelector
Creates a document selector from a Document Selection Language string- Parameters:
selector
- the string to parse as a selector- Throws:
ParseException
- Thrown if the string could not be parsed
-
-
Method Details
-
accepts
Returns true if the document referenced by this document operation is accepted by this selector- Parameters:
op
- a document operation- Returns:
- true if the document is accepted
- Throws:
RuntimeException
- if the evaluation enters an illegal state
-
accepts
Returns true if the document referenced by this context is accepted by this selector- Parameters:
context
- the context to match in- Returns:
- true if the document is accepted
- Throws:
RuntimeException
- if the evaluation enters an illegal state
-
getMatchingResultList
Returns the list of different variables resulting in a true state for this expression- Parameters:
op
- the document to evaluate- Returns:
- true if the document is accepted
- Throws:
RuntimeException
- if the evaluation enters an illegal state
-
toString
Returns this selector as a Document Selection Language string -
visit
Visits the expression tree
-