% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ontology_term_class.R
\name{ontology_online}
\alias{ontology_online}
\title{Enable or disable Ontology Lookup Service (OLS) requests}
\usage{
ontology_online(online = TRUE)
}
\arguments{
\item{online}{Logical scalar. If \code{TRUE} (default when the option is
unset), OLS is queried for term metadata. If \code{FALSE}, lookups are
skipped and no network access is attempted.}
}
\value{
\code{online}, invisibly.
}
\description{
Sets the package option \code{struct.ontology.online}. When \code{FALSE},
\code{\link{ontology_term}}, \code{\link{ontology_list}}, and
\code{\link{ontology}} do not perform HTTP requests to OLS; ontology IDs are
still stored, but label, description, and IRI are left empty (the same
outcome as a failed lookup).
}
\details{
The setting is \code{options(struct.ontology.online = online)}. If the
option has never been set, behaviour matches \code{online = TRUE}.
Typical uses include vignette builds, unit tests, and offline sessions.
}
\examples{
ontology_online(FALSE)
ontology_online(TRUE)

}
\seealso{
\code{\link{ontology_term}}, \code{\link{ontology_list}},
  \code{\link{ontology}}
}
