You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when we want to add metadata to a model attribute (e.g description, helpText, label), we need to put them directly in the code.
Which overloads the code and makes it hard to read it and figure out the logic behind
For example, the attribute natrualLanguage of submissions, is currently so
attribute:naturalLanguage,namespace: :omv,enforce: [:list],extractedMetadata: true,metadataMappings: ["dc:language","dct:language","doap:language","schema:inLanguage"],helpText: "The language of the content of the ontology.<br>Consider using a <a target="_blank" href="http://www.lexvo.org/">Lexvo URI</a> with ISO639-3 code.<br>e.g.: http://lexvo.org/id/iso639-3/eng",enforcedValues: {"http://lexvo.org/id/iso639-3/eng"=>"English","http://lexvo.org/id/iso639-3/fra"=>"French","http://lexvo.org/id/iso639-3/spa"=>"Spanish","http://lexvo.org/id/iso639-3/por"=>"Portuguese","http://lexvo.org/id/iso639-3/ita"=>"Italian","http://lexvo.org/id/iso639-3/deu"=>"German"}
Gaol
The goal is to extract the metadata fields in a YAML file, that will present the scheme of a model.
So that in the code we have
model:ontology_submission,scheme: 'path to yaml file'attribute:naturalLanguage,namespace: :omv,enforce: [:list],extractedMetadata: true,
and in the YAML file, we will have the following
naturalLanguage:
metadataMappings: ["dc:language", "dct:language", "dop:language", "schema:inLanguage"]helpText: "The language of the content of the ontology.<br>Consider using a <a target="_blank" href="http://www.lexvo.org/">Lexvo URI</a> with ISO639-3 code.<br>e.g.: http://lexvo.org/id/iso639-3/eng"enforcedValues: {"http://lexvo.org/id/iso639-3/eng": "English","http://lexvo.org/id/iso639-3/fra": "French","http://lexvo.org/id/iso639-3/spa": "Spanish","http://lexvo.org/id/iso639-3/por": "Portuguese","http://lexvo.org/id/iso639-3/ita": "Italian","http://lexvo.org/id/iso639-3/deu": "German",}
Requirement
Read a yaml file
Append yaml file content to a model settings
Add tests
The text was updated successfully, but these errors were encountered:
Context
Currently, when we want to add metadata to a model attribute (e.g
description
,helpText
,label
), we need to put them directly in the code.Which overloads the code and makes it hard to read it and figure out the logic behind
For example, the attribute
natrualLanguage
of submissions, is currently soGaol
The goal is to extract the metadata fields in a YAML file, that will present the scheme of a model.
So that in the code we have
and in the YAML file, we will have the following
Requirement
The text was updated successfully, but these errors were encountered: