Skip to contents

Downloads the Salmon Domain Ontology using HTTP content negotiation and caches the response using ETag / Last-Modified headers when available.

Usage

fetch_salmon_ontology(
  url = "https://w3id.org/smn/",
  accept = "text/turtle, application/rdf+xml;q=0.8",
  cache_dir = file.path(tools::R_user_dir("metasalmon", which = "cache"), "ontology"),
  timeout_seconds = 30,
  fallback_urls = c("https://w3id.org/smn")
)

Arguments

url

Ontology URL. Default is the canonical SMN namespace root.

accept

Accept header; defaults to turtle with RDF/XML fallback.

cache_dir

Directory to store cached ontology and headers. Defaults to a persistent user cache path.

timeout_seconds

Numeric timeout in seconds for each HTTP request.

fallback_urls

Optional fallback ontology URLs tried if the primary url fails.

Value

Path to the cached ontology file (character string).