8 | | The issue has been described and explored on the page [[CmdiClavasIntegration]]. The issue description below is based on the one found on that page. |
9 | | |
10 | | CLAVAS is a CLARIN-NL project that addresses a vocabulary service. It is hosted by the Meertens Institute, contact is [[henniebrugman|Hennie Brugman]]. The vocabularies will be available through a set of web services hosted at Meertens. CLAVAS is based on [http://openskos.org OpenSKOS], where vocabularies map to 'concept schemes' in OpenSKOS. More information is available in the [attachment:wiki:CmdiClavasIntegration:CLAVAS-Workplan-1.1.docx CLAVAS work plan document]. |
| 8 | The issue is about utilising external vocabularies as value domains for CMDI elements and CMDI attributes (i.e. Attribute elements) |
| 9 | |
| 10 | This has been described and explored on the page [[CmdiClavasIntegration]]. The issue description below is based on the one found on that page, and subsequent discussion within the CMDI Taskforce. |
| 11 | |
| 12 | [http://openskos.org OpenSKOS OpenSKOS] is a vocabulary service offering facilitating publication, management and use of SKOS-ified vocabulary data. The data can be accessed by a RESTful API. At this point only basic SKOS is supported. Also, some DC elements are included, but not indexed. |
| 13 | |
| 14 | CLAVAS is a CLARIN-NL's application of OpenSKOS. It is hosted by the Meertens Institute, contact is [[henniebrugman|Hennie Brugman]]. The vocabularies will be available through a set of web services hosted at Meertens. CLAVAS is based on [http://openskos.org OpenSKOS], where vocabularies map to 'concept schemes' in OpenSKOS. More information is available in the [attachment:wiki:CmdiClavasIntegration:CLAVAS-Workplan-1.1.docx CLAVAS work plan document]. |
36 | | == Solution description == |
| 40 | == Solution description (proposed) == |
| 41 | This section the solution as proposed at Utrecht Taskforce Meeting 21.2.2014 |
| 42 | |
| 43 | There are mainly 2 ways of using the OpenSKOS vocabularies in CMDI: |
| 44 | |
| 45 | * Importing vocabularies as closed value domains for CMD_elements or Attribute. Since the vocabulary items are enumerated explicitly as a choice list in the elements in question, validation is possible. |
| 46 | * Using some OpenSKOS vocabularies for dynamic lookup and retrieval of values for a CMDI element or Attribute. Here a non-exclusive (open) use of items from the vocabulary must be assumed, as validation against such external vocabularies is not practicable. |
| 47 | |
| 48 | === Schema changes === |
| 49 | |
| 50 | The following changes to the General Component Schema accommodates vocabulary use for both CMD_Element and Attribute: |
| 51 | |
| 52 | * New element <Vocabulary> in <ValueScheme> |
| 53 | * <Vocabulary> may have an <enumeration> element. If so, we have an internal, closed vocabulary (imported or locally specified). If not <enumeration>, then the Vocabulary is to be considered as external, and used as a lookup mechanism. |
| 54 | |
| 55 | Attributes for <Vocabulary> |
| 56 | * @URI |
| 57 | * @ValueProperty (which field of the vocabulary items to return, typically prefLabel) |
| 58 | * @ValueLanguage, (preferred language of the item field value) |
| 59 | |
| 60 | ==== General Component Schema changes ==== |
| 61 | |
| 62 | |
| 63 | {{{ |
| 64 | <xs:complexType name="ValueScheme_type"> |
| 65 | <xs:choice> |
| 66 | <xs:element name="pattern" type="xs:string" maxOccurs="1"> |
| 67 | <xs:annotation> |
| 68 | <xs:documentation>Specification of a regular expression the element should |
| 69 | comply with.</xs:documentation> |
| 70 | </xs:annotation> |
| 71 | </xs:element> |
| 72 | <xs:element name="Vocabulary" type="Vocabulary_type"> |
| 73 | <xs:annotation> |
| 74 | <xs:documentation>Specification of an open or closed vocabulary</xs:documentation> |
| 75 | </xs:annotation> |
| 76 | </xs:element> |
| 77 | </xs:choice> |
| 78 | </xs:complexType> |
| 79 | |
| 80 | <xs:complexType name="Vocabulary_type"> |
| 81 | <xs:sequence> |
| 82 | <xs:element name="enumeration" type="enumeration_type" minOccurs="0" maxOccurs="1"> |
| 83 | <xs:annotation> |
| 84 | <xs:documentation>A list of the allowed values of a controlled |
| 85 | vocabulary.</xs:documentation> |
| 86 | </xs:annotation> |
| 87 | </xs:element> |
| 88 | </xs:sequence> |
| 89 | <xs:attribute name="URI" type="xs:anyURI"/> |
| 90 | <xs:attribute name="ValueProperty" type="xs:string"/> <!-- optionally selects a label --> |
| 91 | <xs:attribute name="ValueLanguage" type="xs:string"/> <!-- optionally selects a language --> |
| 92 | </xs:complexType> |
| 93 | }}} |
| 94 | |
| 95 | ==== CMD_Element example ==== |
| 96 | |
| 97 | |
| 98 | {{{ |
| 99 | <CMD_Element |
| 100 | name="Language" |
| 101 | CardinalityMax="1" |
| 102 | CardinalityMin="1"> |
| 103 | <ValueScheme> |
| 104 | <Vocabulary |
| 105 | URI="http://openskos.org/api/languages" |
| 106 | ValueProperty="skos:prefLabel" |
| 107 | ValueLanguage="en"> |
| 108 | <enumeration> |
| 109 | <item ConceptLink="http://cdb.iso.org/lg/CDB-00138580-001">Dutch</item> |
| 110 | <item ConceptLink="http://cdb.iso.org/lg/CDB-00138512-001">French</item> |
| 111 | .... |
| 112 | </enumeration> |
| 113 | </Vocabulary> |
| 114 | </ValueScheme> |
| 115 | </CMD_Element> |
| 116 | |
| 117 | }}} |
| 118 | |
| 119 | |
| 120 | ---- |
| 121 | |
| 122 | '''.......................TBC..............................''' |
| 123 | |
| 124 | |
| 125 | ---- |
| 126 | |
| 127 | |
| 128 | == Solution description (old) == |
| 129 | '''''(In this section the initial proposal is described, later replaced by the solution above. Included for for provenance reasons)''''' |