% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prefixList.R
\name{prefixList}
\alias{prefixList}
\title{Build SPARQL PREFIX declarations for an endpoint}
\usage{
prefixList(endpoint, prefix = NULL)
}
\arguments{
\item{endpoint}{Character. Endpoint name (case-insensitive). Typically
`"CELLAR"` or `"FAO"`. The set of supported names is defined by the
package's internal endpoint registry (see `.valid_endpoints()`).}

\item{prefix}{Character vector of scheme tokens to include (e.g.,
`c("cn2022","nace2")`). If `NULL` (default), returns all discovered schemes.}
}
\value{
A character vector of SPARQL PREFIX declarations.
Use `paste(result, collapse = "\\n")` to inject into a query string.
}
\description{
Returns a character vector of `PREFIX ...` lines used by package queries.
The result always includes core vocabularies (SKOS/XKOS/RDFS/DC/RDF/XSD),
and—when available—adds classification scheme namespaces discovered via
`classificationList(endpoint)`. You can filter to specific schemes with
the `prefix` argument.
}
\details{
- This function has no side effects and does not perform network I/O
  by itself. Discovery is delegated to `classificationList()`.
  
- If `classificationList()` is unavailable or fails, the function returns
  only the core vocabularies and emits a warning.
}
\examples{
\dontrun{
# All known scheme prefixes for the endpoint
pl <- prefixList("CELLAR")
cat(paste(pl, collapse = "\n"))

# Only include CN2022 and NACE2 if they exist
pl2 <- prefixList("CELLAR", prefix = c("cn2022", "nace2"))
}

}
