Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/KorAPQuery.R |
| 3 | \docType{class} |
| 4 | \name{KorAPQuery-class} |
| 5 | \alias{KorAPQuery-class} |
| 6 | \alias{KorAPQuery} |
| 7 | \alias{initialize,KorAPQuery-method} |
| 8 | \alias{fetchNext,KorAPQuery-method} |
| 9 | \alias{fetchNext} |
| 10 | \alias{fetchAll,KorAPQuery-method} |
| 11 | \alias{fetchAll} |
| 12 | \alias{fetchRest,KorAPQuery-method} |
| 13 | \alias{fetchRest} |
| 14 | \alias{format.KorAPQuery} |
| 15 | \alias{show,KorAPQuery-method} |
| 16 | \title{Class KorAPQuery} |
| 17 | \usage{ |
Marc Kupietz | b897218 | 2019-09-20 21:33:46 +0200 | [diff] [blame] | 18 | \S4method{initialize}{KorAPQuery}(.Object, korapConnection = NULL, |
| 19 | request = NULL, vc = "", totalResults = 0, nextStartIndex = 0, |
| 20 | fields = c("corpusSigle", "textSigle", "pubDate", "pubPlace", |
| 21 | "availability", "textClass", "snippet"), requestUrl = "", |
| 22 | webUIRequestUrl = "", apiResponse = NULL, hasMoreMatches = FALSE, |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 23 | collectedMatches = NULL) |
| 24 | |
| 25 | \S4method{fetchNext}{KorAPQuery}(kqo, offset = kqo@nextStartIndex, |
Marc Kupietz | f6f7131 | 2019-09-23 18:35:27 +0200 | [diff] [blame^] | 26 | maxFetch = maxResultsPerPage, verbose = kqo@korapConnection@verbose) |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 27 | |
Marc Kupietz | f6f7131 | 2019-09-23 18:35:27 +0200 | [diff] [blame^] | 28 | \S4method{fetchAll}{KorAPQuery}(kqo, |
| 29 | verbose = kqo@korapConnection@verbose) |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 30 | |
Marc Kupietz | f6f7131 | 2019-09-23 18:35:27 +0200 | [diff] [blame^] | 31 | \S4method{fetchRest}{KorAPQuery}(kqo, |
| 32 | verbose = kqo@korapConnection@verbose) |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 33 | |
| 34 | \method{format}{KorAPQuery}(x, ...) |
| 35 | |
| 36 | \S4method{show}{KorAPQuery}(object) |
| 37 | } |
| 38 | \arguments{ |
| 39 | \item{.Object}{…} |
| 40 | |
Marc Kupietz | b897218 | 2019-09-20 21:33:46 +0200 | [diff] [blame] | 41 | \item{korapConnection}{KorAPConnection object} |
| 42 | |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 43 | \item{request}{query part of the request URL} |
| 44 | |
| 45 | \item{vc}{definition of a virtual corpus} |
| 46 | |
| 47 | \item{totalResults}{number of hits the query has yielded} |
| 48 | |
| 49 | \item{nextStartIndex}{at what index to start the next fetch of query results} |
| 50 | |
| 51 | \item{fields}{what data / metadata fields should be collected} |
| 52 | |
| 53 | \item{requestUrl}{complete URL of the API request} |
| 54 | |
| 55 | \item{webUIRequestUrl}{URL of a web frontend request corresponding to the API request} |
| 56 | |
| 57 | \item{apiResponse}{data-frame representation of the JSON response of the API request} |
| 58 | |
| 59 | \item{hasMoreMatches}{boolean that signals if more query results can be fetched} |
| 60 | |
| 61 | \item{collectedMatches}{matches already fetched from the KorAP-API-server} |
| 62 | |
| 63 | \item{kqo}{object obtained from \code{\link{corpusQuery}}} |
| 64 | |
| 65 | \item{offset}{start offset for query results to fetch} |
| 66 | |
| 67 | \item{maxFetch}{maximum number of query results to fetch} |
| 68 | |
| 69 | \item{verbose}{print progress information if true} |
| 70 | |
| 71 | \item{x}{KorAPQuery object} |
| 72 | |
| 73 | \item{...}{further arguments passed to or from other methods} |
| 74 | |
| 75 | \item{object}{KorAPQuery object} |
| 76 | } |
| 77 | \value{ |
| 78 | The \code{kqo} input object with updated slots \code{collectedMatches}, \code{apiResponse}, \code{nextStartIndex}, \code{hasMoreMatches} |
| 79 | } |
| 80 | \description{ |
| 81 | \code{KorAPQuery} objetcs represent the current state of a query to a KorAP server. |
| 82 | New \code{KorAPQuery} objects are typically created by the \code{\link{corpusQuery}} method. |
| 83 | } |
| 84 | \examples{ |
| 85 | q <- fetchAll(corpusQuery(new("KorAPConnection"), "Ameisenplage")) |
| 86 | q@collectedMatches |
| 87 | |
| 88 | q <- fetchRest(fetchNext(corpusQuery(new("KorAPConnection"), "Ameisenplage"))) |
| 89 | q@collectedMatches |
| 90 | |
| 91 | } |
| 92 | \references{ |
| 93 | \url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026} |
| 94 | } |