Learn R Programming

finto (version 0.1.1)

get_vocabulary_data: Get and structure RDF data of the whole vocabulary or a specific concept from the Finto Skosmos API

Description

Get and structure RDF data of the whole vocabulary or a specific concept from the Finto Skosmos API

Usage

get_vocabulary_data(
  vocid,
  format = "application/rdf+xml",
  uri = NULL,
  lang = NULL
)

Value

A character string containing the raw RDF response.

Arguments

vocid

The vocabulary ID, e.g., "yso".

format

The MIME type of the serialization format, e.g., "application/rdf+xml". Default is "application/rdf+xml".

uri

The URI of a specific concept to retrieve data for. If NULL, retrieves data for the entire vocabulary. Optional.

lang

The RDF language code for the requested resource, e.g., "fi" or "en". Optional.

Examples

Run this code
# \donttest{
rdf_xml_data <- get_vocabulary_data(
  vocid = "yso",
  uri = "http://www.w3.org/2004/02/skos/core#Concept",
  format = "application/rdf+xml"
)
cat(rdf_xml_data)

turtle_data <- get_vocabulary_data(
  vocid = "yso",
  format = "text/turtle"
)
cat(turtle_data)  # Print the Turtle data
# }

Run the code above in your browser using DataLab