googlesearch
Class NotQuery
java.lang.Object
googlesearch.Query
googlesearch.CompositeQuery
googlesearch.NotQuery
public class NotQuery
- extends CompositeQuery
A query that specifies things that should not appear on the page. Note that a
not query here is always exact.
- Author:
- jbergin
Constructor Summary |
NotQuery(Query left,
Query notPart)
Create a query of the form left -notPart. |
Method Summary |
java.lang.String |
buildSearchString(java.util.List<Query> start,
java.util.List<Query> finish)
Used by getSearchString to build up the query string recursively from the
parts. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NotQuery
public NotQuery(Query left,
Query notPart)
- Create a query of the form left -notPart.
- Parameters:
left
- the basic query to be modifiednotPart
- the keyword phrase to be excluded.
buildSearchString
public java.lang.String buildSearchString(java.util.List<Query> start,
java.util.List<Query> finish)
- Description copied from class:
Query
- Used by getSearchString to build up the query string recursively from the
parts. Note that the work is done on the unwinding phase of the
recursion. Those query fragments that must appear first or last in a
query string defer being added to the string until the end, by putting a
reference to themselves intoone of the two lists. These lists are then
processed at the end after some verification.
- Specified by:
buildSearchString
in class Query
- Parameters:
start
- the list of query objects that must come first in a Google
queryfinish
- the list of query objects that must come last in a Google
query. e.g. site:
- Returns:
- the query string