Add a new valid source to an ontology

new_source(
  ontology = NULL,
  name = NULL,
  version = NULL,
  date = NULL,
  description = NULL,
  homepage = NULL,
  uri_prefix = NULL,
  license = NULL,
  notes = NULL
)

Arguments

ontology

ontology(1)
either a path where the ontology is stored, or an already loaded ontology into which the new source should be included.

name

character(1)
the name of the new source (must not contain empty spaces).

version

character(1)
an optional version of the new source (any value is allowed, but should be a value that follows semantic versioning). Either version or date need to be given.

date

character(1)
an optional date at which that version of an external vocabulary has been created. Should be a value of the form YYYY-MM-DD. Either version or date need to be given.

description

character(1)
a verbatim description of the new source.

homepage

character(1)
the homepage of the new source, typically the place where additional information or meta-data could be retrieved in a non-formalised way.

uri_prefix

character(1)
the basic uniform resource locator (URL) all concepts of a new source have in common and which is thus the basis to construct the concept specific URI.

license

character(1)
the licenses under which the new source is published.

notes

character(1)
any notes on the new source that don't fit into any of the other meta-data fields here.

Value

the updated ontology that contains the new source defined here.

Details

Fundamentally, there are two types of sources that can be defined with this function.

  • linked open data: where the concepts that occur in another vocabulary or ontology and which are themselves part of linked datasets (and hence have a valid URI) are associated as related concepts to the harmonised concepts.

In the latter case, each mapped concept should be provided by its ID and the source needs to have a URL that allows in combination with the concept IDs to construct the URI under which the mapped concepts are stored in the semantic web.

Examples

ontoDir <- system.file("extdata", "crops.rds", package = "ontologics")
onto <- load_ontology(path = ontoDir)

onto <- new_source(name = "externalDataset",
                   version = "0.0.1",
                   description = "a vocabulary",
                   homepage = "https://www.something.net",
                   license = "CC-BY-0",
                   ontology = onto)