blob: c1fc1855e635fb0050058018368bf1bf13dcde53 [file] [log] [blame]
Marc Kupietze95108e2019-09-18 13:23:58 +02001% 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 Kupietzb8972182019-09-20 21:33:46 +020018\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 Kupietze95108e2019-09-18 13:23:58 +020023 collectedMatches = NULL)
24
25\S4method{fetchNext}{KorAPQuery}(kqo, offset = kqo@nextStartIndex,
26 maxFetch = maxResultsPerPage, verbose = FALSE)
27
28\S4method{fetchAll}{KorAPQuery}(kqo, verbose = FALSE)
29
30\S4method{fetchRest}{KorAPQuery}(kqo, verbose = FALSE)
31
32\method{format}{KorAPQuery}(x, ...)
33
34\S4method{show}{KorAPQuery}(object)
35}
36\arguments{
37\item{.Object}{}
38
Marc Kupietzb8972182019-09-20 21:33:46 +020039\item{korapConnection}{KorAPConnection object}
40
Marc Kupietze95108e2019-09-18 13:23:58 +020041\item{request}{query part of the request URL}
42
43\item{vc}{definition of a virtual corpus}
44
45\item{totalResults}{number of hits the query has yielded}
46
47\item{nextStartIndex}{at what index to start the next fetch of query results}
48
49\item{fields}{what data / metadata fields should be collected}
50
51\item{requestUrl}{complete URL of the API request}
52
53\item{webUIRequestUrl}{URL of a web frontend request corresponding to the API request}
54
55\item{apiResponse}{data-frame representation of the JSON response of the API request}
56
57\item{hasMoreMatches}{boolean that signals if more query results can be fetched}
58
59\item{collectedMatches}{matches already fetched from the KorAP-API-server}
60
61\item{kqo}{object obtained from \code{\link{corpusQuery}}}
62
63\item{offset}{start offset for query results to fetch}
64
65\item{maxFetch}{maximum number of query results to fetch}
66
67\item{verbose}{print progress information if true}
68
69\item{x}{KorAPQuery object}
70
71\item{...}{further arguments passed to or from other methods}
72
73\item{object}{KorAPQuery object}
74}
75\value{
76The \code{kqo} input object with updated slots \code{collectedMatches}, \code{apiResponse}, \code{nextStartIndex}, \code{hasMoreMatches}
77}
78\description{
79\code{KorAPQuery} objetcs represent the current state of a query to a KorAP server.
80New \code{KorAPQuery} objects are typically created by the \code{\link{corpusQuery}} method.
81}
82\examples{
83q <- fetchAll(corpusQuery(new("KorAPConnection"), "Ameisenplage"))
84q@collectedMatches
85
86q <- fetchRest(fetchNext(corpusQuery(new("KorAPConnection"), "Ameisenplage")))
87q@collectedMatches
88
89}
90\references{
91\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
92}