cirneco 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/.travis.yml +17 -0
  4. data/Gemfile +5 -0
  5. data/Gemfile.lock +129 -0
  6. data/LICENSE.md +21 -0
  7. data/README.md +44 -0
  8. data/Rakefile +5 -0
  9. data/bin/cirneco.rb +5 -0
  10. data/cirneco.gemspec +41 -0
  11. data/lib/cirneco/api.rb +90 -0
  12. data/lib/cirneco/base.rb +21 -0
  13. data/lib/cirneco/cli.rb +28 -0
  14. data/lib/cirneco/data_center.rb +23 -0
  15. data/lib/cirneco/doi.rb +33 -0
  16. data/lib/cirneco/media.rb +15 -0
  17. data/lib/cirneco/metadata.rb +15 -0
  18. data/lib/cirneco/utils.rb +28 -0
  19. data/lib/cirneco/version.rb +3 -0
  20. data/lib/cirneco/work.rb +206 -0
  21. data/lib/cirneco.rb +7 -0
  22. data/resources/kernel-4.0/include/datacite-contributorType-v4.xsd +35 -0
  23. data/resources/kernel-4.0/include/datacite-dateType-v4.xsd +21 -0
  24. data/resources/kernel-4.0/include/datacite-descriptionType-v4.xsd +19 -0
  25. data/resources/kernel-4.0/include/datacite-funderIdentifierType-v4.xsd +15 -0
  26. data/resources/kernel-4.0/include/datacite-relatedIdentifierType-v4.xsd +32 -0
  27. data/resources/kernel-4.0/include/datacite-relationType-v4.xsd +39 -0
  28. data/resources/kernel-4.0/include/datacite-resourceType-v4.xsd +26 -0
  29. data/resources/kernel-4.0/include/datacite-titleType-v4.xsd +14 -0
  30. data/resources/kernel-4.0/metadata.xsd +470 -0
  31. data/resources/kernel-4.0/samples/datacite-example-Box_dateCollected_DataCollector-v4.0.xml +52 -0
  32. data/resources/kernel-4.0/samples/datacite-example-GeoLocation-v4.0.xml +66 -0
  33. data/resources/kernel-4.0/samples/datacite-example-HasMetadata-v4.0.xml +62 -0
  34. data/resources/kernel-4.0/samples/datacite-example-ResearchGroup_Methods-v4.0.xml +44 -0
  35. data/resources/kernel-4.0/samples/datacite-example-ResourceTypeGeneral_Collection-v4.0.xml +52 -0
  36. data/resources/kernel-4.0/samples/datacite-example-complicated-v4.0.xml +54 -0
  37. data/resources/kernel-4.0/samples/datacite-example-dataset-v4.0.xml +39 -0
  38. data/resources/kernel-4.0/samples/datacite-example-full-v4.0.xml +71 -0
  39. data/resources/kernel-4.0/samples/datacite-example-fundingReference-v.4.0.xml +59 -0
  40. data/resources/kernel-4.0/samples/datacite-example-relationTypeIsIdenticalTo-v4.0.xml +65 -0
  41. data/resources/kernel-4.0/samples/datacite-example-video-v4.0.xml +31 -0
  42. data/resources/kernel-4.0/samples/datacite-example-workflow-v4.0.xml +55 -0
  43. data/spec/api_spec.rb +103 -0
  44. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/get/should_get_all_dois_by_prefix.yml +52 -0
  45. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/get/should_get_next_doi.yml +52 -0
  46. data/spec/fixtures/vcr_cassettes/Cirneco_DataCenter/get/should_get_number_of_latest_doi.yml +52 -0
  47. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_all_dois.yml +52 -0
  48. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/get/should_get_doi.yml +40 -0
  49. data/spec/fixtures/vcr_cassettes/Cirneco_Work/DOI_API/put/should_put_doi.yml +44 -0
  50. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/get/should_get_media.yml +44 -0
  51. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Media_API/post/should_post_media.yml +42 -0
  52. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/delete/should_delete_metadata.yml +40 -0
  53. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/get/should_get_metadata.yml +60 -0
  54. data/spec/fixtures/vcr_cassettes/Cirneco_Work/Metadata_API/post/should_post_metadata.yml +62 -0
  55. data/spec/spec_helper.rb +35 -0
  56. data/spec/utils_spec.rb +42 -0
  57. data/spec/work_spec.rb +54 -0
  58. metadata +401 -0
@@ -0,0 +1,206 @@
1
+ require 'active_support/all'
2
+ require 'nokogiri'
3
+ require 'sanitize'
4
+
5
+ require_relative 'api'
6
+ require_relative 'utils'
7
+ require_relative 'base'
8
+
9
+ module Cirneco
10
+ class Work
11
+ include Cirneco::Base
12
+ include Cirneco::Api
13
+ include Cirneco::Utils
14
+
15
+ attr_accessor :doi, :creators, :title, :publisher, :publication_year, :resource_type, :version, :related_identifiers, :rights_list, :descriptions, :subjects, :url, :media, :username, :password, :validation_errors
16
+
17
+ def initialize(doi:, creators:, title:, publisher:, publication_year:, resource_type:, **options)
18
+ @doi = doi
19
+ @creators = creators
20
+ @title = title
21
+ @publisher = publisher
22
+ @publication_year = publication_year
23
+ @resource_type = resource_type
24
+
25
+ @url = options.fetch(:url, nil)
26
+ @media = options.fetch(:media, nil)
27
+
28
+ @username = options.fetch(:username, nil)
29
+ @password = options.fetch(:password, nil)
30
+
31
+ @version = options.fetch(:version, nil)
32
+ @rights_list = options.fetch(:rights_list, nil)
33
+ @descriptions = options.fetch(:descriptions, nil)
34
+ @related_identifiers = options.fetch(:related_identifiers, nil)
35
+ end
36
+
37
+ SCHEMA = File.expand_path("../../../resources/kernel-4.0/metadata.xsd", __FILE__)
38
+
39
+
40
+ def sanitize(string)
41
+ Sanitize.fragment(string).squish
42
+ end
43
+
44
+ def has_required_elements?
45
+ doi && creators && title && publisher && publication_year && resource_type
46
+ end
47
+
48
+ def data
49
+ return nil unless has_required_elements?
50
+
51
+ Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
52
+ xml.send(:'resource', root_attributes) do
53
+ insert_work(xml)
54
+ end
55
+ end.to_xml
56
+ end
57
+
58
+ def insert_work(xml)
59
+ insert_identifier(xml)
60
+ insert_creators(xml)
61
+ insert_titles(xml)
62
+ insert_publisher(xml)
63
+ insert_publication_year(xml)
64
+ insert_subjects(xml)
65
+ insert_resource_type(xml)
66
+ insert_version(xml)
67
+ insert_rights_list(xml)
68
+ insert_descriptions(xml)
69
+ end
70
+
71
+ def insert_identifier(xml)
72
+ xml.identifier(doi, 'identifierType' => "DOI")
73
+ end
74
+
75
+ def insert_creators(xml)
76
+ return nil unless creators.present?
77
+
78
+ xml.send(:'creators') do
79
+ creators.each do |creator|
80
+ xml.creator do
81
+ insert_creator(xml, creator)
82
+ end
83
+ end
84
+ end
85
+ end
86
+
87
+ def insert_creator(xml, creator)
88
+ creator_name = [creator[:family_name], creator[:given_name], creator[:literal]].compact.join(", ")
89
+
90
+ xml.send(:'creatorName', creator_name)
91
+ xml.send(:'givenName', creator[:given_name]) if creator[:given_name].present?
92
+ xml.send(:'familyName', creator[:family_name]) if creator[:family_name].present?
93
+ xml.nameIdentifier(creator[:orcid], 'schemeURI' => 'http://orcid.org/', 'nameIdentifierScheme' => 'ORCID') if creator[:orcid].present?
94
+ end
95
+
96
+ def insert_titles(xml)
97
+ xml.send(:'titles') do
98
+ insert_title(xml)
99
+ end
100
+ end
101
+
102
+ def insert_title(xml)
103
+ xml.title(title)
104
+ end
105
+
106
+ def insert_publisher(xml)
107
+ xml.publisher(publisher)
108
+ end
109
+
110
+ def insert_publication_year(xml)
111
+ xml.publicationYear(publication_year)
112
+ end
113
+
114
+ def insert_subjects(xml)
115
+ return xml unless subjects.present?
116
+
117
+ xml.subjects do
118
+ subjects.each do |subject|
119
+ xml.subject(subject)
120
+ end
121
+ end
122
+ end
123
+
124
+ def insert_resource_type(xml)
125
+ xml.resourceType(resource_type[:value], 'resourceTypeGeneral' => resource_type[:resource_type_general])
126
+ end
127
+
128
+ def insert_version(xml)
129
+ return xml unless version.present?
130
+
131
+ xml.version(version)
132
+ end
133
+
134
+ def insert_rights_list(xml)
135
+ return xml unless rights_list.present?
136
+
137
+ xml.rightsList do
138
+ rights_list.each do |rights|
139
+ xml.rights(rights[:value], 'rightsURI' => rights[:rights_uri])
140
+ end
141
+ end
142
+ end
143
+
144
+ def insert_descriptions(xml)
145
+ return xml unless descriptions.present?
146
+
147
+ xml.descriptions do
148
+ descriptions.each do |description|
149
+ xml.description(description[:value], 'descriptionType' => description[:description_type])
150
+ end
151
+ end
152
+ end
153
+
154
+ def insert_contributors(xml)
155
+ return nil unless contributors.present?
156
+
157
+ xml.send(:'work:contributors') do
158
+ contributors.each do |contributor|
159
+ xml.contributor do
160
+ insert_contributor(xml, contributor)
161
+ end
162
+ end
163
+ end
164
+ end
165
+
166
+ def insert_contributor(xml, contributor)
167
+ if contributor[:orcid].present?
168
+ xml.send(:'common:contributor-orcid') do
169
+ xml.send(:'common:uri', contributor[:orcid])
170
+ xml.send(:'common:path', contributor[:orcid][17..-1])
171
+ xml.send(:'common:host', 'orcid.org')
172
+ end
173
+ end
174
+ xml.send(:'credit-name', contributor[:credit_name])
175
+ if contributor[:role]
176
+ xml.send(:'contributor-attributes') do
177
+ xml.send(:'contributor-role', contributor[:role])
178
+ end
179
+ end
180
+ end
181
+
182
+ def without_control(s)
183
+ r = ''
184
+ s.each_codepoint do |c|
185
+ if c >= 32
186
+ r << c
187
+ end
188
+ end
189
+ r
190
+ end
191
+
192
+ def root_attributes
193
+ { :'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
194
+ :'xsi:schemaLocation' => 'http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd',
195
+ :'xmlns' => 'http://datacite.org/schema/kernel-4' }
196
+ end
197
+
198
+ def schema
199
+ Nokogiri::XML::Schema(open(SCHEMA))
200
+ end
201
+
202
+ def validation_errors
203
+ @validation_errors ||= schema.validate(Nokogiri::XML(data)).map { |error| error.to_s }
204
+ end
205
+ end
206
+ end
data/lib/cirneco.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "cirneco/work"
2
+ require "cirneco/data_center"
3
+ require "cirneco/cli"
4
+ require "cirneco/doi"
5
+ require "cirneco/media"
6
+ require "cirneco/metadata"
7
+ require "cirneco/version"
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
3
+ 2013-05 v3.0: Addition of ID to simpleType element, added values "ResearchGroup" & "Other"
4
+ 2014-08-20 v3.1: Addition of value "DataCurator"
5
+ 2015-05-14 v4.0 dropped value "Funder", use new "funderReference" -->
6
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
7
+ <xs:simpleType name="contributorType" id="contributorType">
8
+ <xs:annotation>
9
+ <xs:documentation>The type of contributor of the resource.</xs:documentation>
10
+ </xs:annotation>
11
+ <xs:restriction base="xs:string">
12
+ <xs:enumeration value="ContactPerson"/>
13
+ <xs:enumeration value="DataCollector"/>
14
+ <xs:enumeration value="DataCurator"/>
15
+ <xs:enumeration value="DataManager"/>
16
+ <xs:enumeration value="Distributor"/>
17
+ <xs:enumeration value="Editor"/>
18
+ <xs:enumeration value="HostingInstitution"/>
19
+ <xs:enumeration value="Other"/>
20
+ <xs:enumeration value="Producer"/>
21
+ <xs:enumeration value="ProjectLeader"/>
22
+ <xs:enumeration value="ProjectManager"/>
23
+ <xs:enumeration value="ProjectMember"/>
24
+ <xs:enumeration value="RegistrationAgency"/>
25
+ <xs:enumeration value="RegistrationAuthority"/>
26
+ <xs:enumeration value="RelatedPerson"/>
27
+ <xs:enumeration value="ResearchGroup"/>
28
+ <xs:enumeration value="RightsHolder"/>
29
+ <xs:enumeration value="Researcher"/>
30
+ <xs:enumeration value="Sponsor"/>
31
+ <xs:enumeration value="Supervisor"/>
32
+ <xs:enumeration value="WorkPackageLeader"/>
33
+ </xs:restriction>
34
+ </xs:simpleType>
35
+ </xs:schema>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
3
+ 2013-05 v3.0: Addition of ID to simpleType element; addition of value "Collected"; deleted "StartDate" & "EndDate"-->
4
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
5
+ <xs:simpleType name="dateType" id="dateType">
6
+ <xs:annotation>
7
+ <xs:documentation>The type of date. Use RKMS‐ISO8601 standard for depicting date ranges.To indicate the end of an embargo period, use Available. To indicate the start of an embargo period, use Submitted or Accepted, as appropriate.</xs:documentation>
8
+ </xs:annotation>
9
+ <xs:restriction base="xs:string">
10
+ <xs:enumeration value="Accepted"/>
11
+ <xs:enumeration value="Available"/>
12
+ <xs:enumeration value="Collected"/>
13
+ <xs:enumeration value="Copyrighted"/>
14
+ <xs:enumeration value="Created"/>
15
+ <xs:enumeration value="Issued"/>
16
+ <xs:enumeration value="Submitted"/>
17
+ <xs:enumeration value="Updated"/>
18
+ <xs:enumeration value="Valid"/>
19
+ </xs:restriction>
20
+ </xs:simpleType>
21
+ </xs:schema>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
3
+ 2013-05 v3.0: Addition of ID to simpleType element, addition of value "Methods"
4
+ 2015-02-12 v4.0: Addition of value "TechnicalInfo"-->
5
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
6
+ <xs:simpleType name="descriptionType" id="descriptionType">
7
+ <xs:annotation>
8
+ <xs:documentation>The type of the description.</xs:documentation>
9
+ </xs:annotation>
10
+ <xs:restriction base="xs:string">
11
+ <xs:enumeration value="Abstract"/>
12
+ <xs:enumeration value="Methods"/>
13
+ <xs:enumeration value="SeriesInformation"/>
14
+ <xs:enumeration value="TableOfContents"/>
15
+ <xs:enumeration value="TechnicalInfo"/>
16
+ <xs:enumeration value="Other"/>
17
+ </xs:restriction>
18
+ </xs:simpleType>
19
+ </xs:schema>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2016-05-14 -->
3
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
4
+ <xs:simpleType name="funderIdentifierType" id="funderIdentifierType">
5
+ <xs:annotation>
6
+ <xs:documentation>The type of the funderIdentifier.</xs:documentation>
7
+ </xs:annotation>
8
+ <xs:restriction base="xs:string">
9
+ <xs:enumeration value="ISNI"/>
10
+ <xs:enumeration value="GRID"/>
11
+ <xs:enumeration value="Crossref Funder ID"/>
12
+ <xs:enumeration value="Other"/>
13
+ </xs:restriction>
14
+ </xs:simpleType>
15
+ </xs:schema>
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
3
+ 2013-05 v3.0: Addition of ID to simpleType element; addition of value "PMID"
4
+ 2014-08-20 v3.1: Addition of values "arxiv" and "bibcode"
5
+ 2015-02-12 v4.0 Addition of value "IGSN" -->
6
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
7
+ <xs:simpleType name="relatedIdentifierType" id="relatedIdentifierType">
8
+ <xs:annotation>
9
+ <xs:documentation>The type of the RelatedIdentifier.</xs:documentation>
10
+ </xs:annotation>
11
+ <xs:restriction base="xs:string">
12
+ <xs:enumeration value="ARK"/>
13
+ <xs:enumeration value="arXiv"/>
14
+ <xs:enumeration value="bibcode"/>
15
+ <xs:enumeration value="DOI"/>
16
+ <xs:enumeration value="EAN13"/>
17
+ <xs:enumeration value="EISSN"/>
18
+ <xs:enumeration value="Handle"/>
19
+ <xs:enumeration value="IGSN"/>
20
+ <xs:enumeration value="ISBN"/>
21
+ <xs:enumeration value="ISSN"/>
22
+ <xs:enumeration value="ISTC"/>
23
+ <xs:enumeration value="LISSN"/>
24
+ <xs:enumeration value="LSID"/>
25
+ <xs:enumeration value="PMID"/>
26
+ <xs:enumeration value="PURL"/>
27
+ <xs:enumeration value="UPC"/>
28
+ <xs:enumeration value="URL"/>
29
+ <xs:enumeration value="URN"/>
30
+ </xs:restriction>
31
+ </xs:simpleType>
32
+ </xs:schema>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ 2011-01-13 v1.0 - FZ, TIB, Germany
4
+ 2013-05 v3.0: Addition of ID to simpleType element, addition of values "IsIdenticalTo", "HasMetadata" & "IsMetadataFor"
5
+ 2014-08-20 v3.1: Addition of values "Reviews" & "IsReviewedBy" and "IsDerivedFrom" & "IsSourceOf"-->
6
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
7
+ <xs:simpleType name="relationType" id="relationType">
8
+ <xs:annotation>
9
+ <xs:documentation>Description of the relationship of the resource being registered (A) and the related resource (B).</xs:documentation>
10
+ </xs:annotation>
11
+ <xs:restriction base="xs:string">
12
+ <xs:enumeration value="IsCitedBy"/>
13
+ <xs:enumeration value="Cites"/>
14
+ <xs:enumeration value="IsSupplementTo"/>
15
+ <xs:enumeration value="IsSupplementedBy"/>
16
+ <xs:enumeration value="IsContinuedBy"/>
17
+ <xs:enumeration value="Continues"/>
18
+ <xs:enumeration value="IsNewVersionOf"/>
19
+ <xs:enumeration value="IsPreviousVersionOf"/>
20
+ <xs:enumeration value="IsPartOf"/>
21
+ <xs:enumeration value="HasPart"/>
22
+ <xs:enumeration value="IsReferencedBy"/>
23
+ <xs:enumeration value="References"/>
24
+ <xs:enumeration value="IsDocumentedBy"/>
25
+ <xs:enumeration value="Documents"/>
26
+ <xs:enumeration value="IsCompiledBy"/>
27
+ <xs:enumeration value="Compiles"/>
28
+ <xs:enumeration value="IsVariantFormOf"/>
29
+ <xs:enumeration value="IsOriginalFormOf"/>
30
+ <xs:enumeration value="IsIdenticalTo"/>
31
+ <xs:enumeration value="HasMetadata"/>
32
+ <xs:enumeration value="IsMetadataFor"/>
33
+ <xs:enumeration value="Reviews"/>
34
+ <xs:enumeration value="IsReviewedBy"/>
35
+ <xs:enumeration value="IsDerivedFrom"/>
36
+ <xs:enumeration value="IsSourceOf"/>
37
+ </xs:restriction>
38
+ </xs:simpleType>
39
+ </xs:schema>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
3
+ 2013-05 v3.0: Addition of ID to simpleType element; added values "Audiovisual", "Workflow" & "Other"; deleted value "Film" -->
4
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
5
+ <xs:simpleType name="resourceType" id="resourceType">
6
+ <xs:annotation>
7
+ <xs:documentation>The general type of a resource.</xs:documentation>
8
+ </xs:annotation>
9
+ <xs:restriction base="xs:string">
10
+ <xs:enumeration value="Audiovisual"/>
11
+ <xs:enumeration value="Collection"/>
12
+ <xs:enumeration value="Dataset"/>
13
+ <xs:enumeration value="Event"/>
14
+ <xs:enumeration value="Image"/>
15
+ <xs:enumeration value="InteractiveResource"/>
16
+ <xs:enumeration value="Model"/>
17
+ <xs:enumeration value="PhysicalObject"/>
18
+ <xs:enumeration value="Service"/>
19
+ <xs:enumeration value="Software"/>
20
+ <xs:enumeration value="Sound"/>
21
+ <xs:enumeration value="Text"/>
22
+ <xs:enumeration value="Workflow"/>
23
+ <xs:enumeration value="Other"/>
24
+ </xs:restriction>
25
+ </xs:simpleType>
26
+ </xs:schema>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
3
+ 2013-05 v3.0: Addition of ID to simpleType element
4
+ 2015-02-12 v4.0 Added value "Other" -->
5
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
6
+ <xs:simpleType name="titleType" id="titleType">
7
+ <xs:restriction base="xs:string">
8
+ <xs:enumeration value="AlternativeTitle"/>
9
+ <xs:enumeration value="Subtitle"/>
10
+ <xs:enumeration value="TranslatedTitle"/>
11
+ <xs:enumeration value="Other"/>
12
+ </xs:restriction>
13
+ </xs:simpleType>
14
+ </xs:schema>