blob: 68d89075340f5e14f4887c06aa230c90ba9e62e8 [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{
18\S4method{initialize}{KorAPQuery}(.Object, request = NULL, vc = "",
19 totalResults = 0, nextStartIndex = 0, fields = c("corpusSigle",
20 "textSigle", "pubDate", "pubPlace", "availability", "textClass",
21 "snippet"), requestUrl = "", webUIRequestUrl = "",
22 apiResponse = NULL, hasMoreMatches = FALSE,
23 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
39\item{request}{query part of the request URL}
40
41\item{vc}{definition of a virtual corpus}
42
43\item{totalResults}{number of hits the query has yielded}
44
45\item{nextStartIndex}{at what index to start the next fetch of query results}
46
47\item{fields}{what data / metadata fields should be collected}
48
49\item{requestUrl}{complete URL of the API request}
50
51\item{webUIRequestUrl}{URL of a web frontend request corresponding to the API request}
52
53\item{apiResponse}{data-frame representation of the JSON response of the API request}
54
55\item{hasMoreMatches}{boolean that signals if more query results can be fetched}
56
57\item{collectedMatches}{matches already fetched from the KorAP-API-server}
58
59\item{kqo}{object obtained from \code{\link{corpusQuery}}}
60
61\item{offset}{start offset for query results to fetch}
62
63\item{maxFetch}{maximum number of query results to fetch}
64
65\item{verbose}{print progress information if true}
66
67\item{x}{KorAPQuery object}
68
69\item{...}{further arguments passed to or from other methods}
70
71\item{object}{KorAPQuery object}
72}
73\value{
74The \code{kqo} input object with updated slots \code{collectedMatches}, \code{apiResponse}, \code{nextStartIndex}, \code{hasMoreMatches}
75}
76\description{
77\code{KorAPQuery} objetcs represent the current state of a query to a KorAP server.
78New \code{KorAPQuery} objects are typically created by the \code{\link{corpusQuery}} method.
79}
80\examples{
81q <- fetchAll(corpusQuery(new("KorAPConnection"), "Ameisenplage"))
82q@collectedMatches
83
84q <- fetchRest(fetchNext(corpusQuery(new("KorAPConnection"), "Ameisenplage")))
85q@collectedMatches
86
87}
88\references{
89\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
90}