Integrate KorAPFetchAll with KorAPFetchNext, add KorAPFetchRest

Change-Id: Iaef8a0f9966eeaa606f59c52f32acf3026798782
diff --git a/man/KorAPFetchAll.Rd b/man/KorAPFetchAll.Rd
new file mode 100644
index 0000000..660d9fd
--- /dev/null
+++ b/man/KorAPFetchAll.Rd
@@ -0,0 +1,28 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/KorAPQuery.R
+\name{KorAPFetchAll}
+\alias{KorAPFetchAll}
+\title{Fetch all results of a KorAP query.}
+\usage{
+KorAPFetchAll(queryObject, verbose = FALSE)
+}
+\arguments{
+\item{queryObject}{object obtained from \code{\link{KorAPQuery}}}
+}
+\value{
+The \code{queryObject} input parameter with updated fields \code{$collectedMatches}, \code{$matches} (latest bunch only), \code{$nextStartIndex}, \code{$hasMoreMatches}
+}
+\description{
+Fetch all results of a KorAP query.
+}
+\examples{
+q <- KorAPFetchAll(KorAPQuery(KorAPConnection(), "Ameisenplage"))
+q$collectedMatches
+
+}
+\references{
+\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
+}
+\seealso{
+\code{\link{KorAPFetchRest}}, \code{\link{KorAPFetchNext}}
+}
diff --git a/man/KorAPFetchNext.Rd b/man/KorAPFetchNext.Rd
new file mode 100644
index 0000000..92f7754
--- /dev/null
+++ b/man/KorAPFetchNext.Rd
@@ -0,0 +1,32 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/KorAPQuery.R
+\name{KorAPFetchNext}
+\alias{KorAPFetchNext}
+\title{Fetch the next bunch of results of a KorAP query.}
+\usage{
+KorAPFetchNext(queryObject, offset = queryObject$nextStartIndex,
+  maxFetch = maxResultsPerPage, verbose = FALSE)
+}
+\arguments{
+\item{queryObject}{object obtained from \code{\link{KorAPQuery}}}
+
+\item{offset}{start offset for query results to fetch}
+
+\item{maxFetch}{maximum number of query results to fetch}
+}
+\value{
+The \code{queryObject} input parameter with updated fields \code{$collectedMatches}, \code{$matches} (latest bunch only), \code{$nextStartIndex}, , \code{$hasMoreMatches}
+}
+\description{
+Fetch the next bunch of results of a KorAP query.
+}
+\examples{
+q <- KorapFetchNext(KorAPQuery(KorAPConnection(), "Ameisenplage"))
+
+}
+\references{
+\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
+}
+\seealso{
+\code{\link{KorAPFetchRest}}, \code{\link{KorAPFetchAll}}
+}
diff --git a/man/KorAPFetchRest.Rd b/man/KorAPFetchRest.Rd
new file mode 100644
index 0000000..acefd2b
--- /dev/null
+++ b/man/KorAPFetchRest.Rd
@@ -0,0 +1,28 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/KorAPQuery.R
+\name{KorAPFetchRest}
+\alias{KorAPFetchRest}
+\title{Fetches all remaining results of a KorAP query.}
+\usage{
+KorAPFetchRest(queryObject, verbose = FALSE)
+}
+\arguments{
+\item{queryObject}{object obtained from \code{\link{KorAPQuery}}}
+}
+\value{
+The \code{queryObject} input parameter with updated fields \code{$collectedMatches}, \code{$matches} (latest bunch only), \code{$nextStartIndex}, \code{$hasMoreMatches}
+}
+\description{
+Fetches all remaining results of a KorAP query.
+}
+\examples{
+q <- KorAPFetchRest(KorAPQueryNext(KorAPQuery(KorAPConnection(), "Ameisenplage")))
+q$collectedMatches
+
+}
+\references{
+\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
+}
+\seealso{
+\code{\link{KorAPFetchAll}}, \code{\link{KorAPFetchNext}}
+}
diff --git a/man/KorAPQuery.Rd b/man/KorAPQuery.Rd
index 8667fc2..a522649 100644
--- a/man/KorAPQuery.Rd
+++ b/man/KorAPQuery.Rd
@@ -2,10 +2,10 @@
 % Please edit documentation in R/KorAPQuery.R
 \name{KorAPQuery}
 \alias{KorAPQuery}
-\title{\code{KorAPQuery} perform a query on the KorAP server.}
+\title{Send a query to a KorAP connection.}
 \usage{
 KorAPQuery(con, query, vc = NA, KorAPUrl = NA, metadataOnly = TRUE,
-  ql = "poliqarp", fields = defaultFields)
+  ql = "poliqarp", fields = defaultFields, accessRewriteFatal = TRUE)
 }
 \arguments{
 \item{con}{object obtained from \code{\link{KorAPConnection}}, that contains all necessary connection information}
@@ -23,10 +23,12 @@
 \item{fields}{(meta)data fields that will be fetched for every match}
 }
 \value{
-A KorAP query object that, among other information, contains the total number of results in \code{$meta$totalResults}. The resulting object can be used to fetch all query results (with \code{\link{KorAPFetchAll}}) or the next page of results (with \code{\link{KorAPFetchNext}}). Please make sure to check \code{$collection$rewrites} to see if any unforseen access rewrites of the query's virtual corpus had to be performed.
+A KorAP query object that, among other information, contains the total number of results in \code{$meta$totalResults}. The resulting object can be used to fetch all query results (with \code{\link{KorAPFetchAll}}) or the next page of results (with \code{\link{KorAPFetchNext}}).
+A correspunding URL to be used within a web browser is contained in \code{$webUIRequestUrl}
+Please make sure to check \code{$collection$rewrites} to see if any unforseen access rewrites of the query's virtual corpus had to be performed.
 }
 \description{
-\code{KorAPQuery} perform a query on the KorAP server.
+Send a query to a KorAP connection.
 }
 \examples{
 q <- KorAPQuery(con, "Ameisenplage")