From c28089b0beb06addc91256d827db18784fb989be Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Wed, 23 Aug 2023 17:42:54 +0200 Subject: [PATCH] Fix #242, Fix #497, Fix #574, more metadata support --- doc/bestPractices/sections/checklist-en.html | 406 ++++++++++++++++-- .../sections/introduction-en.html | 7 +- doc/configuration/config.properties | 20 +- doc/metadataGuide/guide.md | 105 +++-- src/main/java/widoco/Configuration.java | 61 ++- src/main/java/widoco/Constants.java | 96 +++-- src/main/java/widoco/CreateResources.java | 62 ++- src/main/java/widoco/entities/Ontology.java | 74 +++- src/main/java/widoco/gui/EditProperty.java | 58 ++- src/main/java/widoco/gui/GuiStep2.java | 70 ++- src/main/resources/widoco/cs.properties | 4 + src/main/resources/widoco/de.properties | 4 + src/main/resources/widoco/en.properties | 4 + src/main/resources/widoco/es.properties | 4 + src/main/resources/widoco/fr.properties | 4 + src/main/resources/widoco/it.properties | 4 + src/main/resources/widoco/nl.properties | 4 + src/main/resources/widoco/pt.properties | 6 +- 18 files changed, 788 insertions(+), 205 deletions(-) diff --git a/doc/bestPractices/sections/checklist-en.html b/doc/bestPractices/sections/checklist-en.html index c41c9ef..e7cbef1 100644 --- a/doc/bestPractices/sections/checklist-en.html +++ b/doc/bestPractices/sections/checklist-en.html @@ -17,13 +17,31 @@

Vocabulary namespace URI [vann:preferredNamespaceUri (PREFERRED) +
Example:
+
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix vann: <http://purl.org/vocab/vann/> .
+<https://w3id.org/example> rdf:type owl:Ontology ;
+	vann:preferredNamespaceUri <https://w3id.org/example#> .
+
+

Prefix [RECOMMENDED]

-

Preferred prefix used to refer to the ontology. This is important to let potential reusers know how you expect your ontology to be abbreviated. You want everyone to refer to it in the same way.

+

Preferred prefix used to refer to the ontology. This is important to let potential reusers know how you expect your ontology to be abbreviated. You want everyone to refer to it in the same way. It's also recommended to register your prefix at the http://prefix.cc service, so other KG engineers are able to find the URI of your ontology.

+
Example:
+
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix vann: <http://purl.org/vocab/vann/> .
+<https://w3id.org/example> rdf:type owl:Ontology ;
+	vann:preferredNamespacePrefix "ex" .
+
+

Vocabulary goals and description

Once your vocabulary can be properly identified, it is important to describe what it does without forcing users to explore it thoroughly. For this purpose, the following properties are recommended:

@@ -36,31 +54,68 @@

Name [RECOMME
  • schema:alternateName
  • +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix vann: <http://purl.org/vocab/vann/> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	rdfs:label "Example"@en .
    +
    +

    Title [RECOMMENDED]

    If you were writing a paper describing your ontology, what would the title be?

    + +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	dct:title "The example ontology"@en .
    +
    +

    Description [RECOMMENDED]

    A small paragraph indicating what the ontology does and why should some one use it

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	dct:description "The Example ontology is used to provide an example for ontology annotations in OWL."@en .
    +
    +

    Abstract [OPTIONAL]

    Similar to a description, but with a little bit more background and an explanation about the resued/extended vocabularies, context and applications using this ontology. It can be considered as the abstract of the paper describing you ontology.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	dct:abstract "The abstract should explain a little more about the scope and goals of the ontology."@en .
    +
    +

    Status [OPTIONAL]

    Indicates the status of the vocabulary (Recommnedation, Draft, etc.) @@ -68,7 +123,18 @@

    Status [OPTION +Note that the range of bibo:status is a "bibo:DocumentStatus" instance. Common status include: bibo:status/accepted, bibo:status/draft, bibo:status/published, bibo:status/rejected and bibo:status/peerReviewed. For more information, please see the bibo vocabulary. In MOD, the status is a string. + +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix bibo: <http://purl.org/ontology/bibo/> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	bibo:status <http://purl.org/ontology/bibo/status/accepted> .
    +

    Vocabulary version

    Your vocabulary may evolve and go through several releases. Knowing which version of the vocabulary is the one being operated with may help debugging and solving compatibility issues.

    @@ -80,35 +146,71 @@

    Version IRI [owl:versionIRI (PREFERRED)
  • schema:schemaVersion
  • +
    Example:
    + +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	owl:versionIRI <https://w3id.org/example/1.0.1> .
    +

    Version info [RECOMMENDED]

    -Details about the version being handled. We recommend to include, for example, the version number of the ontology (e.g., 1.0.1). +Details about the version being handled. We recommend to include the version number of the ontology (e.g., 1.0.1), if possible using semantic versioning.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	owl:versionInfo "0.0.1" .
    +
    +

    Backward compatibility [OPTIONAL]

    Property useful to determine whether this version of the vocabulary is compatible with a previous one.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	owl:versionIRI <https://w3id.org/example/1.0.1> .
    +	owl:backwardCompatibleWith <https://w3id.org/example/1.0.0> .
    +
    +

    Incompatibility [OPTIONAL]

    Property useful to let a potential reuser that this version of the vocabulary is not compatible with a previous (or future) version.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	owl:versionIRI <https://w3id.org/example/1.0.0> .
    +	owl:incompatibleWith <https://w3id.org/example/0.0.1> .
    +
    +

    Vocabulary provenance

    Several aspects of the vocabulary's provenance may be very useful to gather insight from the vocabulary. We describe them in this section. @@ -120,54 +222,106 @@

    Previous version [ +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	owl:versionIRI <https://w3id.org/example/1.0.1> .
    +	owl:priorVersion <https://w3id.org/example/1.0.0> .
    +
    +

    Creation date [RECOMMENDED]

    Date when the vocabulary was created. There are different ways in which the date may be represented, but typically is with an xsd:dateTime literal. Note that some vocabularies, like schema.org, define their own object as range for the date property. We advise to look at the respective vocabulary specifications for more information.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	dct:created "2021-01-01"^^xsd:date  .
    +
    +

    Modification date [OPTIONAL]

    Date when your vocabulary was modified. If you review several times a vocabulary, it would be advisable to know when it was last reviewed.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	dct:modified "2021-01-02"^^xsd:date  .
    +
    +

    Issued date [OPTIONAL]

    Date of formal issuance, like publication. It may be useful to distinguish between the date of creation versus the official date of publication of your vocabulary.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<https://w3id.org/example> rdf:type owl:Ontology ;
    +	dct:created "2021-01-01"^^xsd:date ; .
    +
    +

    Source [OPTIONAl]

    Property indicating where the terms of your vocabulary come from. For example, if your vocabulary implements an existing non-RDF standard, or if there is an active discussion of the terms in a separate collaborative wiki, you may want to add a pointer to them in your vocabulary.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<http://def.isotc211.org/iso19108/2006/TemporalObjects> a owl:Ontology ;
    +    rdfs:label "ISO 19108:2006 Temporal Objects" ;
    +    dct:source <http://standards.iso.org/iso/19108/ed-1/en/> .
    +
    +

    Ontology extensions [OPTIONAl]

    Property indicating the ontologies and vocabularies extended in this ontology.

    @@ -176,6 +330,15 @@

    Ontology extensions [voaf:extends (PREFERRED) +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix voaf: <http://purl.org/vocommons/voaf#> .
    +<http://environment.data.gov.au/def/op> owl:Ontology ;
    +	voaf:extends <http://qudt.org/schema/qudt> .
    +
    +

    Vocabulary attribution

    A key aspect of the medatata should specify the roles of the scientists that have participated in its creation. Having this metadata can facilitate other scientists to provide the approapriate credit to the contributors of the vocabulary. @@ -185,36 +348,91 @@

    Creators [ +
    Example 1:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<https://saref.etsi.org/saref4wear/> a owl:Ontology ;
    +    dct:created "2019-01-01"^^xsd:date ;
    +    dct:creator <http://www.garcia-castro.com/foaf.rdf#me>,
    +		<https://www.linkedin.com/in/maurodragoni/MauroDragoni> .
    +
    +Many ontologies declare authors as a string, which is technically incorrect. If you want to add additional information about the authors in an ontology, +you may do so by adding them as individuals (or as blank nodes). The example below shows an example: + +
    Example 2:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix foaf: <http://xmlns.com/foaf/0.1/> .
    +@prefix org: <http://www.w3.org/ns/org#> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<https://w3id.org/ecfo> rdf:type owl:Ontology ;
    +dct:creator <https://orcid.org/0000-0003-0454-7145> ;
    +
    +<https://orcid.org/0000-0003-0454-7145> foaf:name "Daniel Garijo"@en ;
    +	org:memberOf <https://www.upm.es#this> .
    +
    +<https://www.upm.es#this> rdf:type owl:NamedIndividual ,
    +                                   foaf:Organization ;
    +                          foaf:homepage "https://www.upm.es" ;
    +                          foaf:name "Universidad Politécnica de Madrid" .
    +
    +

    Contributors [RECOMMENDED]

    People who contributed to the development of the vocabulary. Even if contributors may not play a critical role in the vocabulary development, it is important to acknowledge their contribution as well.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<http://cedric.cnam.fr/isid/ontologies/OntoSemStats.owl#> a owl:Ontology ;
    +    dct:contributor <http://cedric.cnam.fr/~hamdif/>,
    +		<http://cedric.cnam.fr/~sisaid/> .
    +
    +

    Publisher [OPTIONAL]

    Organization responsible for publishing the vocabulary. This property is optional, as there are many cases where no organization is involved when publishing a vocabulary.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<https://w3id.org/fr/def/core#> a owl:Ontology ;
    +    dct:publisher <http://www.oeg-upm.net/; .
    +
    +

    Vocabulary citation

    Ontologies are considered software, and should be cited as such [Smith et al 2016]. However, researchers reusing the ontology may not refer to the correct citation associated to it. Adding metadata to help them would address this issue, granting you the appropriate credit for your work.

    @@ -225,19 +443,37 @@

    DOI [OPTIONAL +

    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix bibo: <http://purl.org/ontology/bibo/> .
    +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    +<http://taxref.mnhn.fr/lod/taxref-ld> a owl:Ontology ;
    +    bibo:doi "10.5281/zenodo.6940891" .
    +
    +

    Bibliographic citation [OPTIONAL]

    Property indicating the text with the citation itself.

    +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +<http://www.w3id.org/urban-iot/core> a owl:Ontology ;
    +    dct:bibliographicCitation "Comune di Milano. Urban IoT Ontologies - Core Module (v1.0.1). http://www.w3id.org/urban-iot/core" ; .
    +
    +

    Vocabulary license [RECOMMENDED]

    @@ -245,13 +481,19 @@

    Vocabulary license [Properties you may use: -
  • dc:rights
  • -
  • dcterms:license
  • +
  • dct:license (PREFERRED)
  • +
  • dce:rights
  • schema:license
  • cc:license
  • - +
    Example:
    +
    +@prefix owl: <http://www.w3.org/2002/07/owl#> .
    +@prefix dct: <http://purl.org/dc/terms/> .
    +<http://www.w3id.org/urban-iot/core> a owl:Ontology ;
    +    dct:license <https://creativecommons.org/licenses/by/4.0/> .
    +

    Vocabulary visualization

    @@ -263,20 +505,36 @@