Skip to content

SWEET Annotation Convention

Stephen Richard edited this page Jan 28, 2020 · 3 revisions

Introduction

This page defines conventions for file and class-level SWEET annotations In laymans speak, this simply provides guidance for how one would provide annotations for contributions in SWEET.

This is useful for a few reasons,

  1. It enables people to be nano-credited for their contributions.
  2. It facilitates richer provenance tracking for all contributions, this is to say it answers the 'how' and 'why' questions behind the knowledge resource being what it is.
  3. It provides historical context to future SWEET developers in that they will better understand who did what when and for what reasons.

The following examples are based on real contributions to SWEET.

Propose a new class or update an existing class with a skos:definition

#@prefix dcterms: <http://purl.org/dc/terms/> .
#@prefix owl: <http://www.w3.org/2002/07/owl#> .
#@prefix prov: <http://www.w3.org/ns/prov#> .
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
#@prefix sorepdp: <http://sweetontology.net/reprDataProduct/Dataset/> .
#@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

###  http://sweetontology.net/reprDataProduct/Dataset
sorepdp:Dataset rdf:type owl:Class ;
               rdfs:subClassOf sorepdp:DataProduct ;
               rdfs:label "dataset"@en ;
               skos:definition  [ 
                   rdfs:comment  "A  data set (or dataset, although this ..."@en ;
                   dcterms:source <http://dbpedia.org/resource/Data_set> ;
                   dcterms:created "2019-08-16T11:35:21.06Z"^^xsd:dateTimeStamp ;
                   dcterms:modified "2019-08-17T11:35:21.06Z"^^xsd:dateTimeStamp ;
                   dcterms:creator <http://orcid> ;
                   # //prov:wasDerivedFrom below is optional
                   prov:wasDerivedFrom <URI>
             ] .

There are a few things to take note of here.

  1. This convention covers the cases where you were 1) introducing a brand new class or 2) augmenting an existing class _ONLY _ with a skos:definition. In both cases the convention would strongly enforce the above structure.
  2. Most of the resource metadata is packaged into the skos:definition collection node as opposed to the parent node. N.B. we are still undecided as to whether we will permit more than one skos:definition per class. If you have any comments then please create an issue.

Update an existing class using your organization as your identifier

#@prefix dcterms: <http://purl.org/dc/terms/> .
#@prefix owl: <http://www.w3.org/2002/07/owl#> .
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#@prefix sdo: <https://schema.org/> .
#@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
#@prefix soreag: <http://sweetontology.net/realmGeol/GeologicFeature> .
#@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

###  http://sweetontology.net/realmGeol/GeologicFeature
soreag:GeologicFeature rdf:type owl:Class ;
                     rdfs:subClassOf [ rdf:type owl:Restriction ;
                                       owl:onProperty sorel:hasRealm ;
                                       owl:allValuesFrom sorea:Geosphere
                                     ] ;
                     dcterms:contributor [
                        a sdo:Organization ;
                        sdo:name "Geological Survey of Queensland" ;
                        sdo:identifier <http://linked.data.gov.au/org/gsq> ;
                     ] ;                                     
                     skos:altLabel "Geologic Feature" , "Geological Feature" ;
                     skos:definition "A geologic feature is a conceptual feature a that is hypothesized to exist coherently in the Earth that results from geological processes"@en ;
                     skos:example "Individuals: Lake Eyre Basin, Sarmatian Craton, Victoria Point Sandbar, Mount Erebus Volcano. Subclasses: Basin, Craton, Shield, Province, Sub-Province."@en ;
                     skos:scopeNote "Geologic Features include sedimentary basins, stratigraphic units, non-stratigraphic (lithodemic) units, stratigraphic event features, provinces, tectonic and structural features, georesource accumulations, and geologically significant sites, among others"@en ;
                     rdfs:label "geologic feature"@en .

In this example the skos:definition is defined as a string literal (as oppose to a complex collection). Additionally, as this is a class update as opposed to creation, the convention enforces use of dcterms:contributor.

  • We need to clarify how to support multiple definitions e.g. one from DBPedia and one from Wikidata

Update an existing class acknowledging a person as the contributor

#@prefix dcterms: <http://purl.org/dc/terms/> .
#@prefix owl: <http://www.w3.org/2002/07/owl#> .
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#@prefix sdo: <https://schema.org/> .
#@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
#@prefix soreag: <http://sweetontology.net/realmGeol/GeologicFeature> .
#@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

###  http://sweetontology.net/realmGeol/GeologicFeature
soreag:GeologicFeature rdf:type owl:Class ;
                     rdfs:subClassOf [ rdf:type owl:Restriction ;
                                       owl:onProperty sorel:hasRealm ;
                                       owl:allValuesFrom sorea:Geosphere
                                     ] ;
                     dcterms:contributor [
                        a sdo:Person ;
                        sdo:name "Nick Car" ;
                        sdo:affiliation [ a sdo:Organization;
                                          sdo:name "name of organization";
                                          sdo:identifier "appropriate ROR or other URI" 
                                         ]; 
                        sdo:identifier <http://orcid.ord....> ;
                        dcterms:dateModified "2020-10-27" ;
                        sdo:description  "remove subclass from sorea:Realm"
                     ] ;                                     
                     
.... snip  .

The contributor content could all be done with dc and dcterms vocabulary. I'm not sure what we gain by using the sdo elements.