blob: 1bc7bd4f8b0186e11933d5068b691ddc99445ab8 [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,
Marc Kupietzf6f71312019-09-23 18:35:27 +020026 maxFetch = maxResultsPerPage, verbose = kqo@korapConnection@verbose)
Marc Kupietze95108e2019-09-18 13:23:58 +020027
Marc Kupietzf6f71312019-09-23 18:35:27 +020028\S4method{fetchAll}{KorAPQuery}(kqo,
29 verbose = kqo@korapConnection@verbose)
Marc Kupietze95108e2019-09-18 13:23:58 +020030
Marc Kupietzf6f71312019-09-23 18:35:27 +020031\S4method{fetchRest}{KorAPQuery}(kqo,
32 verbose = kqo@korapConnection@verbose)
Marc Kupietze95108e2019-09-18 13:23:58 +020033
34\method{format}{KorAPQuery}(x, ...)
35
36\S4method{show}{KorAPQuery}(object)
37}
38\arguments{
39\item{.Object}{}
40
Marc Kupietzb8972182019-09-20 21:33:46 +020041\item{korapConnection}{KorAPConnection object}
42
Marc Kupietze95108e2019-09-18 13:23:58 +020043\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
Marc Kupietz7776dec2019-09-27 16:59:02 +020059\item{hasMoreMatches}{logical that signals if more query results can be fetched}
Marc Kupietze95108e2019-09-18 13:23:58 +020060
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{
78The \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.
82New \code{KorAPQuery} objects are typically created by the \code{\link{corpusQuery}} method.
83}
84\examples{
85q <- fetchAll(corpusQuery(new("KorAPConnection"), "Ameisenplage"))
86q@collectedMatches
87
88q <- fetchRest(fetchNext(corpusQuery(new("KorAPConnection"), "Ameisenplage")))
89q@collectedMatches
90
91}
92\references{
93\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
94}