Skip to contents

Performs a robust validation of a Turtle (TTL) file representing specimen metadata. Validation includes:

  • Turtle syntax check

  • Presence of required predicates

  • Existence of at least one prov:qualifiedAttribution block

  • At least one dcat:contactPoint

  • At least one geometry block with geo:asWKT

  • At least one sampler (sosa:MadeBySampler)

The function returns a structured tibble summarizing the validation results without stopping the main workflow.

Usage

specimen_validate_ttl(ttl_path)

Arguments

ttl_path

Character path to the Turtle file to validate.

Value

A tibble containing:

ttl_file

Filename of the validated TTL

total_triples

Number of RDF triples parsed

predicates_found

Count of unique predicates found

missing_predicates

List of required predicates not found

has_attribution

TRUE if at least one prov:qualifiedAttribution is found

has_contactPoint

TRUE if at least one dcat:contactPoint is found

has_geometry

TRUE if a geo:asWKT geometry is present

has_sampler

TRUE if at least one sosa:MadeBySampler is present

Details

This validator is designed for your specimen TTL model and follows the structure generated by specimen_ttl(). It does not enforce external ontology constraints, but checks internal consistency and key structural elements.

Author

Alessandro Oggioni, PhD (2023) oggioni.a@cnr.it

Examples

if (FALSE) { # \dontrun{
  specimen_validate_ttl("specimen_12345.ttl")
} # }