{"action":"opened","issue":{"url":"https://api.github.com/repos/INCF/neuroshapes/issues/53","repository_url":"https://api.github.com/repos/INCF/neuroshapes","labels_url":"https://api.github.com/repos/INCF/neuroshapes/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/INCF/neuroshapes/issues/53/comments","events_url":"https://api.github.com/repos/INCF/neuroshapes/issues/53/events","html_url":"https://github.com/INCF/neuroshapes/issues/53","id":303468695,"number":53,"title":"Define and approach for enforcing ontologies in the different shapes","user":{"login":"MFSY","id":2990875,"avatar_url":"https://avatars0.githubusercontent.com/u/2990875?v=4","gravatar_id":"","url":"https://api.github.com/users/MFSY","html_url":"https://github.com/MFSY","followers_url":"https://api.github.com/users/MFSY/followers","following_url":"https://api.github.com/users/MFSY/following{/other_user}","gists_url":"https://api.github.com/users/MFSY/gists{/gist_id}","starred_url":"https://api.github.com/users/MFSY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MFSY/subscriptions","organizations_url":"https://api.github.com/users/MFSY/orgs","repos_url":"https://api.github.com/users/MFSY/repos","events_url":"https://api.github.com/users/MFSY/events{/privacy}","received_events_url":"https://api.github.com/users/MFSY/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T12:50:16Z","updated_at":"2018-03-08T12:50:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The usage of controlled vocabularies (instead of plain text) as values of properties is a highly recommended best practice.\r\nThe reasons are multiple but the most important ones are:\r\n\r\n * Consistent (way less ambiguous) annotation of dataset between organizations and within communities => they can speak the same language (use the same vocabulary) so to say.\r\n\r\n * The vocabulary used in a given domain of application to describe entities, agents, activities,...\r\nbecomes an explicit and normalised artefact that can be shared and maintained.\r\n\r\nNow how do we enforce the usage of ontologies/vocabularies in the data models defined in neuroshapes ?\r\n\r\nWell let first recognise the fact that it is unlikely one can identified upfront ontologies/vocabularies that will cover all possible used cases users may have. Then a good approach would be to provide a set of defaults ontologies/vocabularies that can be enforced but allow users to enforce other ontologies/vocabularies (with better coverage for example) and/or to just provide text in first place when no ontology/vocabulary is available for a given property value. \r\n\r\nCurrently, some ontologies/vocabularies needed are referenced in the [typedlabeledontologyterm](https://github.com/INCF/neuroshapes/blob/master/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/typedlabeledontologyterm/v0.1.0.json) schema. Clearly it needs to be extended to support the above approach.\r\n\r\nHow then ?\r\nLet assume a shape for enforcing the usage of a brain region ontology needs to be created:\r\n * let give it a (fragment) name: BrainRegionShape\r\n * The  BrainRegionShape can be defined as follows:\r\n\r\n {\r\n      \"@id\": \"this:BrainRegionShape\",\r\n      \"@type\": \"sh:NodeShape\",\r\n      \"label\": \"A brain region shape.\",\r\n      \"or\": [\r\n        {\r\n          \"node\": \"{{base}}/schemas/neurosciencegraph/commons/labeledontologyentity/v0.1.0/shapes/LabeledOntologyEntityShape\"\r\n        },{\r\n          \"node\": \"{{base}}/schemas/neurosciencegraph/commons/typedlabeledontologyterm/v0.1.0/shapes/BrainRegionOntologyTermShape\"\r\n        },{\r\n          \"datatype\": \"xsd:string\"\r\n        }\r\n      ]\r\n    }\r\n\r\n* and a property (nsg:brainRegion for example) value can be constrained in the following way:\r\n\r\n```json\r\n{\r\n          \"path\": \"nsg:brainRegion\",\r\n          \"name\": \"Brain region\",\r\n          \"description\": \"A brain region shape.\",\r\n          \"node\": \"{{base}}/schemas/neurosciencegraph/commons/typedlabeledontologyterm/v0.1.0/shapes/BrainRegionShape\"\r\n}\r\n```\r\nRelated #42 "}}
{"actor":{"display_login":"MFSY"}}