|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.gsaapi.GSAQuery.GSAQueryTerm
This class is required because the GSA query term supports a "special
term" syntax. For example, when interacting with a GSA using a browser,
the user can specify:
instrumental music intitle:edu filetype:pdf OR filetype:html
Which means that the user wants to search for PDF or HTML documents having
"edu" in their title and containing both "instrumental" and "music" in
the document contents. This class models these special query term
semantics by providing an attribute for each type of special term.
Constructor Summary | |
GSAQuery.GSAQueryTerm()
|
|
GSAQuery.GSAQueryTerm(java.lang.String queryString)
Search for all the words specified in the query string (words are whitespace delimited in the string) |
Method Summary | |
GSAQuery.GSAQueryTerm |
addFileType(java.lang.String term,
boolean include)
Add a term to filetypes inclusion/exclusion list. |
GSAQuery.GSAQueryTerm |
addInTitle(java.lang.String term,
boolean include)
add a term to titles inclusion/exclusion list. |
GSAQuery.GSAQueryTerm |
addInUrl(java.lang.String term,
boolean include)
add a term to url inclusion/exclusion list. |
void |
setAllInTitle(java.util.List allInTitleTerms)
all the terms specified must be in the page title. |
void |
setAllInUrl(java.util.List allInUrlTerms)
all the terms specified must be in the page url. |
void |
setCachedDocument(java.lang.String docLocation)
search for cached document at specified location. |
void |
setDateRange(long fromDateInJulianDays,
long toDateInJulianDays)
set a daterange filter. |
void |
setExcludeFileType(java.util.List filetype)
Exclude documents with specified file extensions. |
void |
setIncludeFileType(java.util.List filetype)
Restrict search to specified file extensions. |
void |
setInTitle(java.util.List inTitleTerms)
search for the specified strings in title. |
void |
setInUrl(java.util.List inUrlTerms)
search for the specified strings in url. |
void |
setNotInTitle(java.util.List notInTitleTerms)
remove results that contain specified terms in title |
void |
setNotInUrl(java.util.List notInUrlTerms)
|
void |
setQueryString(java.lang.String queryString)
set the queryString. |
void |
setSite(java.lang.String site,
boolean include)
Set the site (domain) for inclusion or exclusion. |
void |
setWebDocument(java.lang.String docLocation)
search for document at specified location. |
void |
setWithLinksTo(java.lang.String link)
search for documents linking to specified document (url string). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GSAQuery.GSAQueryTerm(java.lang.String queryString)
queryString
- public GSAQuery.GSAQueryTerm()
Method Detail |
public void setQueryString(java.lang.String queryString)
queryString
- public void setInTitle(java.util.List inTitleTerms)
inTitleTerms
- public void setNotInTitle(java.util.List notInTitleTerms)
notInTitleTerms
- public GSAQuery.GSAQueryTerm addInTitle(java.lang.String term, boolean include)
term
- String to include/excludeinclude
- true
means include, false
means exclude
public void setAllInTitle(java.util.List allInTitleTerms)
allInTitleTerms
- public void setInUrl(java.util.List inUrlTerms)
inUrlTerms
- public void setNotInUrl(java.util.List notInUrlTerms)
public GSAQuery.GSAQueryTerm addInUrl(java.lang.String term, boolean include)
term
- String to include/excludeinclude
- true
means include, false
means exclude
public void setAllInUrl(java.util.List allInUrlTerms)
allInUrlTerms
- public void setIncludeFileType(java.util.List filetype)
filetype
- The filetypes to restrict the search to.public void setExcludeFileType(java.util.List filetype)
filetype
- The filetypes to exclude from the search.public GSAQuery.GSAQueryTerm addFileType(java.lang.String term, boolean include)
term
- String to include/exclude.include
- true
means include, false
means exclude.
gsaQueryTerm.addFileType("pdf",
true).addFileType("html", true);
public void setSite(java.lang.String site, boolean include)
setSite(null, false)
OR
setSite(null, true)
(The boolean parameter is ignored
if the String parameter is null)
site
- The site/domain name as a stringinclude
- Whether to use the site as an inclusion filter (if true)
or exclusion filter (if false)public void setWebDocument(java.lang.String docLocation)
docLocation
- public void setCachedDocument(java.lang.String docLocation)
docLocation
- public void setWithLinksTo(java.lang.String link)
link
- public void setDateRange(long fromDateInJulianDays, long toDateInJulianDays)
Util.toJulian(java.util.Date)
fromDateInJulianDays
- The begin date (as a Julian Day Number) for the date
range.toDateInJulianDays
- The end date (as a Julian Day Number) for the date range.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© Copyright 2006 Inxight Software, Inc.