orcid_client 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +10 -0
  3. data/.gitignore +42 -0
  4. data/.travis.yml +17 -0
  5. data/CHANGELOG.md +0 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +115 -0
  8. data/LICENSE.md +21 -0
  9. data/README.md +45 -0
  10. data/Rakefile +5 -0
  11. data/lib/orcid_client.rb +3 -0
  12. data/lib/orcid_client/api.rb +75 -0
  13. data/lib/orcid_client/author.rb +56 -0
  14. data/lib/orcid_client/base.rb +21 -0
  15. data/lib/orcid_client/date.rb +61 -0
  16. data/lib/orcid_client/metadata.rb +128 -0
  17. data/lib/orcid_client/notification.rb +125 -0
  18. data/lib/orcid_client/version.rb +3 -0
  19. data/lib/orcid_client/work.rb +200 -0
  20. data/lib/orcid_client/work_type.rb +68 -0
  21. data/orcid_client.gemspec +37 -0
  22. data/resources/common_2.0_rc3/common-2.0_rc3.xsd +1624 -0
  23. data/resources/common_2.0_rc3/samples/common-2.0_rc3.xml +8 -0
  24. data/resources/notification_2.0_rc3/notification-custom-2.0_rc3.xsd +32 -0
  25. data/resources/notification_2.0_rc3/notification-permission-2.0_rc3.xsd +128 -0
  26. data/resources/notification_2.0_rc3/samples/notification-custom-2.0_rc3.xml +45 -0
  27. data/resources/notification_2.0_rc3/samples/notification-permission-2.0_rc3.xml +58 -0
  28. data/resources/record_2.0_rc3/activities-2.0_rc3.xsd +187 -0
  29. data/resources/record_2.0_rc3/address-2.0_rc3.xsd +73 -0
  30. data/resources/record_2.0_rc3/bulk-2.0_rc3.xsd +57 -0
  31. data/resources/record_2.0_rc3/deprecated-2.0_rc3.xsd +80 -0
  32. data/resources/record_2.0_rc3/education-2.0_rc3.xsd +96 -0
  33. data/resources/record_2.0_rc3/email-2.0_rc3.xsd +74 -0
  34. data/resources/record_2.0_rc3/employment-2.0_rc3.xsd +96 -0
  35. data/resources/record_2.0_rc3/error-2.0_rc3.xsd +84 -0
  36. data/resources/record_2.0_rc3/funding-2.0_rc3.xsd +257 -0
  37. data/resources/record_2.0_rc3/history-2.0_rc3.xsd +203 -0
  38. data/resources/record_2.0_rc3/internal-2.0_rc3.xsd +199 -0
  39. data/resources/record_2.0_rc3/keyword-2.0_rc3.xsd +72 -0
  40. data/resources/record_2.0_rc3/other-name-2.0_rc3.xsd +88 -0
  41. data/resources/record_2.0_rc3/peer-review-2.0_rc3.xsd +246 -0
  42. data/resources/record_2.0_rc3/person-2.0_rc3.xsd +98 -0
  43. data/resources/record_2.0_rc3/person-external-identifier-2.0_rc3.xsd +63 -0
  44. data/resources/record_2.0_rc3/personal-details-2.0_rc3.xsd +186 -0
  45. data/resources/record_2.0_rc3/preferences-2.0_rc3.xsd +50 -0
  46. data/resources/record_2.0_rc3/record-2.0_rc3.xsd +105 -0
  47. data/resources/record_2.0_rc3/researcher-url-2.0_rc3.xsd +90 -0
  48. data/resources/record_2.0_rc3/samples/activities-2.0_rc3.xml +236 -0
  49. data/resources/record_2.0_rc3/samples/address-2.0_rc3.xml +16 -0
  50. data/resources/record_2.0_rc3/samples/addresses-2.0_rc3.xml +32 -0
  51. data/resources/record_2.0_rc3/samples/biography-2.0_rc3.xml +10 -0
  52. data/resources/record_2.0_rc3/samples/bulk-work-2.0_rc3.json +56 -0
  53. data/resources/record_2.0_rc3/samples/bulk-work-2.0_rc3.xml +62 -0
  54. data/resources/record_2.0_rc3/samples/credit-name-2.0_rc3.xml +5 -0
  55. data/resources/record_2.0_rc3/samples/deprecated-2.0_rc3.xml +13 -0
  56. data/resources/record_2.0_rc3/samples/education-2.0_rc3.xml +30 -0
  57. data/resources/record_2.0_rc3/samples/education-full-2.0_rc3.xml +40 -0
  58. data/resources/record_2.0_rc3/samples/email-2.0_rc3.xml +16 -0
  59. data/resources/record_2.0_rc3/samples/emails-2.0_rc3.xml +31 -0
  60. data/resources/record_2.0_rc3/samples/employment-2.0_rc3.xml +30 -0
  61. data/resources/record_2.0_rc3/samples/employment-full-2.0_rc3.xml +40 -0
  62. data/resources/record_2.0_rc3/samples/error-2.0_rc3.xml +8 -0
  63. data/resources/record_2.0_rc3/samples/external-identifier-2.0_rc3.xml +20 -0
  64. data/resources/record_2.0_rc3/samples/external-identifiers-2.0_rc3.xml +36 -0
  65. data/resources/record_2.0_rc3/samples/funding-2.0_rc3.xml +65 -0
  66. data/resources/record_2.0_rc3/samples/funding-full-2.0_rc3.xml +75 -0
  67. data/resources/record_2.0_rc3/samples/history-2.0_rc3.xml +22 -0
  68. data/resources/record_2.0_rc3/samples/keyword-2.0_rc3.xml +18 -0
  69. data/resources/record_2.0_rc3/samples/keywords-2.0_rc3.xml +34 -0
  70. data/resources/record_2.0_rc3/samples/name-2.0_rc3.xml +12 -0
  71. data/resources/record_2.0_rc3/samples/other-name-2.0_rc3.xml +16 -0
  72. data/resources/record_2.0_rc3/samples/other-names-2.0_rc3.xml +31 -0
  73. data/resources/record_2.0_rc3/samples/peer-review-2.0_rc3.xml +49 -0
  74. data/resources/record_2.0_rc3/samples/peer-review-full-2.0_rc3.xml +59 -0
  75. data/resources/record_2.0_rc3/samples/person-2.0_rc3.xml +122 -0
  76. data/resources/record_2.0_rc3/samples/personal-details-2.0_rc3.xml +47 -0
  77. data/resources/record_2.0_rc3/samples/preferences-2.0_rc3.xml +4 -0
  78. data/resources/record_2.0_rc3/samples/record-2.0_rc3.xml +420 -0
  79. data/resources/record_2.0_rc3/samples/researcher-url-2.0_rc3.xml +19 -0
  80. data/resources/record_2.0_rc3/samples/researcher-urls-2.0_rc3.xml +21 -0
  81. data/resources/record_2.0_rc3/samples/search-2.0_rc3.xml +368 -0
  82. data/resources/record_2.0_rc3/samples/work-2.0_rc3.xml +49 -0
  83. data/resources/record_2.0_rc3/samples/work-full-2.0_rc3.xml +59 -0
  84. data/resources/record_2.0_rc3/search-2.0_rc3.xsd +82 -0
  85. data/resources/record_2.0_rc3/work-2.0_rc3.xsd +445 -0
  86. data/spec/api_spec.rb +59 -0
  87. data/spec/fixtures/vcr_cassettes/OrcidClient/get/should_get_works.yml +646 -0
  88. data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/post/should_create_notification.yml +104 -0
  89. data/spec/fixtures/vcr_cassettes/OrcidClient/works/delete/should_delete_work.yml +38 -0
  90. data/spec/fixtures/vcr_cassettes/OrcidClient/works/get/should_get_works.yml +646 -0
  91. data/spec/fixtures/vcr_cassettes/OrcidClient/works/post/should_create_work.yml +116 -0
  92. data/spec/fixtures/vcr_cassettes/OrcidClient/works/put/should_update_work.yml +155 -0
  93. data/spec/fixtures/vcr_cassettes/OrcidClient_Notification/data.yml +44 -0
  94. data/spec/fixtures/vcr_cassettes/OrcidClient_Notification/schema/validates_data.yml +44 -0
  95. data/spec/fixtures/vcr_cassettes/OrcidClient_Notification/schema/validates_item_type_work.yml +41 -0
  96. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/citation.yml +50 -0
  97. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/literal.yml +47 -0
  98. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/multiple_titles.yml +47 -0
  99. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/valid.yml +50 -0
  100. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/with_ORCID_IDs.yml +157 -0
  101. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/data.yml +50 -0
  102. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/publication_date.yml +50 -0
  103. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_ORCID_IDs_for_contributors.yml +157 -0
  104. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_data.yml +50 -0
  105. data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_work_type_data-set.yml +47 -0
  106. data/spec/fixtures/work.xml +33 -0
  107. data/spec/notification_spec.rb +42 -0
  108. data/spec/spec_helper.rb +32 -0
  109. data/spec/work_spec.rb +100 -0
  110. metadata +392 -0
@@ -0,0 +1,73 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="qualified"
4
+ targetNamespace="http://www.orcid.org/ns/address" xmlns:address="http://www.orcid.org/ns/address"
5
+ xmlns:common="http://www.orcid.org/ns/common">
6
+ <xs:annotation>
7
+ <xs:documentation>
8
+ =============================================================================
9
+
10
+ ORCID (R) Open Source
11
+ http://orcid.org
12
+
13
+ Copyright (c) 2012-2014 ORCID,
14
+ Inc.
15
+ Licensed under an MIT-Style License (MIT)
16
+ http://orcid.org/open-source-license
17
+
18
+ This copyright and license
19
+ information (including a link to the full
20
+ license)
21
+ shall be included in
22
+ its entirety in all copies or substantial portion of
23
+ the software.
24
+
25
+ =============================================================================
26
+ The schema describes the message format used for ORCID API requests
27
+ and responses.
28
+ </xs:documentation>
29
+ <xs:appinfo>
30
+ <sch:title>Schematron validation</sch:title>
31
+ <sch:ns prefix="address" uri="http://www.orcid.org/ns/address" />
32
+ </xs:appinfo>
33
+ </xs:annotation>
34
+ <xs:import namespace="http://www.orcid.org/ns/common"
35
+ schemaLocation="../common_2.0_rc3/common-2.0_rc3.xsd" />
36
+
37
+ <xs:element name="addresses">
38
+ <xs:annotation>
39
+ <xs:documentation>Addresses container</xs:documentation>
40
+ </xs:annotation>
41
+ <xs:complexType>
42
+ <xs:sequence>
43
+ <xs:element ref="common:last-modified-date" minOccurs="0" maxOccurs="1" />
44
+ <xs:element name="address" type="address:address" minOccurs="0"
45
+ maxOccurs="unbounded" />
46
+ </xs:sequence>
47
+ <xs:attribute name="path" type="common:element-path" use="optional" />
48
+ </xs:complexType>
49
+ </xs:element>
50
+
51
+ <xs:element name="address">
52
+ <xs:annotation>
53
+ <xs:documentation>Address element
54
+ </xs:documentation>
55
+ </xs:annotation>
56
+ <xs:complexType>
57
+ <xs:complexContent>
58
+ <xs:extension base="address:address"></xs:extension>
59
+ </xs:complexContent>
60
+ </xs:complexType>
61
+ </xs:element>
62
+
63
+
64
+ <xs:complexType name="address">
65
+ <xs:complexContent>
66
+ <xs:extension base="common:element-summary">
67
+ <xs:sequence>
68
+ <xs:element name="country" type="common:iso-3166-country-or-empty" />
69
+ </xs:sequence>
70
+ </xs:extension>
71
+ </xs:complexContent>
72
+ </xs:complexType>
73
+ </xs:schema>
@@ -0,0 +1,57 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="unqualified"
4
+ targetNamespace="http://www.orcid.org/ns/bulk"
5
+ xmlns:bulk="http://www.orcid.org/ns/bulk"
6
+ xmlns:work="http://www.orcid.org/ns/work"
7
+ xmlns:common="http://www.orcid.org/ns/common" xmlns:error="http://www.orcid.org/ns/error">
8
+ <xs:annotation>
9
+ <xs:documentation>
10
+ =============================================================================
11
+
12
+ ORCID (R) Open Source
13
+ http://orcid.org
14
+
15
+ Copyright (c) 2012-2014 ORCID,
16
+ Inc.
17
+ Licensed under an MIT-Style License (MIT)
18
+ http://orcid.org/open-source-license
19
+
20
+ This copyright and license
21
+ information (including a link to the full
22
+ license)
23
+ shall be included in
24
+ its entirety in all copies or substantial portion of
25
+ the software.
26
+
27
+ =============================================================================
28
+ The schema describes the message format used for ORCID API requests
29
+ and responses.
30
+ The top level element is orcid-message.
31
+ </xs:documentation>
32
+ <xs:appinfo>
33
+ <sch:title>Schematron validation</sch:title>
34
+ <sch:ns prefix="orcid" uri="http://www.orcid.org/ns/orcid" />
35
+ </xs:appinfo>
36
+ </xs:annotation>
37
+
38
+ <xs:element name="bulk">
39
+ <xs:complexType>
40
+ <xs:annotation>
41
+ <xs:documentation>A work published by the researcher or contributor.
42
+ * The visibility attribute (private, limited or public) can be set
43
+ at record creation, and indicates who can see this section of
44
+ information.
45
+ * The put-code attribute is used only when reading this
46
+ element. When updating the item, the put-code attribute must be
47
+ included to indicate the specific record to be updated.
48
+ </xs:documentation>
49
+ </xs:annotation>
50
+ <xs:sequence maxOccurs="unbounded">
51
+ <xs:choice>
52
+ <xs:any minOccurs="1" processContents="lax"/>
53
+ </xs:choice>
54
+ </xs:sequence>
55
+ </xs:complexType>
56
+ </xs:element>
57
+ </xs:schema>
@@ -0,0 +1,80 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="qualified"
4
+ targetNamespace="http://www.orcid.org/ns/deprecated" xmlns:deprecated="http://www.orcid.org/ns/deprecated"
5
+ xmlns:common="http://www.orcid.org/ns/common">
6
+ <xs:annotation>
7
+ <xs:documentation>
8
+ =============================================================================
9
+
10
+ ORCID (R) Open Source
11
+ http://orcid.org
12
+
13
+ Copyright (c) 2012-2014 ORCID,
14
+ Inc.
15
+ Licensed under an MIT-Style License (MIT)
16
+ http://orcid.org/open-source-license
17
+
18
+ This copyright and license
19
+ information (including a link to the full
20
+ license)
21
+ shall be included in
22
+ its entirety in all copies or substantial portion of
23
+ the software.
24
+
25
+ =============================================================================
26
+ The schema describes the message format used for ORCID API requests
27
+ and responses.
28
+ The top level element is orcid-message.
29
+ </xs:documentation>
30
+ <xs:appinfo>
31
+ <sch:title>Schematron validation</sch:title>
32
+ <sch:ns prefix="orcid" uri="http://www.orcid.org/ns/orcid" />
33
+ </xs:appinfo>
34
+ </xs:annotation>
35
+
36
+ <xs:import namespace="http://www.orcid.org/ns/common"
37
+ schemaLocation="../common_2.0_rc3/common-2.0_rc3.xsd" />
38
+
39
+ <xs:element name="deprecated">
40
+ <xs:complexType>
41
+ <xs:annotation>
42
+ <xs:documentation>Element to contain the deprecation information of
43
+ an ORCID iD and Record. Records are deprecated by researchers or
44
+ contributors when multiple iDs are found that represent the same
45
+ person.
46
+ </xs:documentation>
47
+ </xs:annotation>
48
+ <xs:sequence>
49
+ <xs:element name="deprecated-date" type="deprecated:deprecated-date"
50
+ minOccurs="1" maxOccurs="1" />
51
+ <xs:element name="primary-record" type="deprecated:primary-record"
52
+ maxOccurs="1" minOccurs="1" />
53
+ </xs:sequence>
54
+ </xs:complexType>
55
+ </xs:element>
56
+
57
+ <xs:complexType name="deprecated-date">
58
+ <xs:annotation>
59
+ <xs:documentation>The date and time when the ORCID Record was
60
+ deprecated, and now points to a different, primary ORCID Record.
61
+ </xs:documentation>
62
+ </xs:annotation>
63
+ <xs:simpleContent>
64
+ <xs:extension base="xs:dateTime" />
65
+ </xs:simpleContent>
66
+ </xs:complexType>
67
+
68
+ <xs:complexType name="primary-record">
69
+ <xs:annotation>
70
+ <xs:documentation>The new primary record for the ORCID iD. One
71
+ should
72
+ note this new value if the iD being read has been deprecated.
73
+ </xs:documentation>
74
+ </xs:annotation>
75
+ <xs:sequence>
76
+ <xs:element ref="common:orcid-identifier" />
77
+ </xs:sequence>
78
+ </xs:complexType>
79
+
80
+ </xs:schema>
@@ -0,0 +1,96 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="qualified"
4
+ targetNamespace="http://www.orcid.org/ns/education" xmlns:education="http://www.orcid.org/ns/education"
5
+ xmlns:common="http://www.orcid.org/ns/common">
6
+ <xs:annotation>
7
+ <xs:documentation>
8
+ =============================================================================
9
+
10
+ ORCID (R) Open Source
11
+ http://orcid.org
12
+
13
+ Copyright (c) 2012-2014 ORCID,
14
+ Inc.
15
+ Licensed under an MIT-Style License (MIT)
16
+ http://orcid.org/open-source-license
17
+
18
+ This copyright and license
19
+ information (including a link to the full
20
+ license)
21
+ shall be included in
22
+ its entirety in all copies or substantial portion of
23
+ the software.
24
+
25
+ =============================================================================
26
+ The schema describes the message format used for ORCID API requests
27
+ and responses.
28
+ The top level element is orcid-message.
29
+ </xs:documentation>
30
+ <xs:appinfo>
31
+ <sch:title>Schematron validation</sch:title>
32
+ <sch:ns prefix="orcid" uri="http://www.orcid.org/ns/orcid" />
33
+ </xs:appinfo>
34
+ </xs:annotation>
35
+
36
+ <xs:import namespace="http://www.orcid.org/ns/common"
37
+ schemaLocation="../common_2.0_rc3/common-2.0_rc3.xsd" />
38
+
39
+ <xs:element name="education">
40
+ <xs:annotation>
41
+ <xs:documentation>An education associated with the researcher or
42
+ contributor.
43
+ * The visibility attribute (private, limited or public)
44
+ can be set at
45
+ record creation, and indicates who can see this section
46
+ of
47
+ information.
48
+ * The put-code attribute is used only when reading
49
+ this element. When
50
+ updating the item, the put-code attribute must be
51
+ included to
52
+ indicate the specific record to be updated.
53
+ </xs:documentation>
54
+ </xs:annotation>
55
+ <xs:complexType>
56
+ <xs:complexContent>
57
+ <xs:extension base="common:element-summary">
58
+ <xs:sequence>
59
+ <xs:element name="department-name" type="common:non-empty-string"
60
+ minOccurs="0" maxOccurs="1" />
61
+ <xs:element name="role-title" type="common:non-empty-string"
62
+ minOccurs="0" maxOccurs="1" />
63
+ <xs:element ref="common:start-date" minOccurs="0"
64
+ maxOccurs="1" />
65
+ <xs:element ref="common:end-date" minOccurs="0"
66
+ maxOccurs="1" />
67
+ <xs:element name="organization" type="common:organization"
68
+ minOccurs="1" maxOccurs="1" />
69
+ </xs:sequence>
70
+ </xs:extension>
71
+ </xs:complexContent>
72
+ </xs:complexType>
73
+ </xs:element>
74
+
75
+ <xs:element name="education-summary">
76
+ <xs:complexType>
77
+ <xs:complexContent>
78
+ <xs:extension base="common:element-summary">
79
+ <xs:sequence>
80
+ <xs:element name="department-name" type="common:non-empty-string"
81
+ minOccurs="0" maxOccurs="1" />
82
+ <xs:element name="role-title" type="common:non-empty-string"
83
+ minOccurs="0" maxOccurs="1" />
84
+ <xs:element ref="common:start-date" minOccurs="0"
85
+ maxOccurs="1" />
86
+ <xs:element ref="common:end-date" minOccurs="0"
87
+ maxOccurs="1" />
88
+ <xs:element name="organization" type="common:organization"
89
+ minOccurs="1" maxOccurs="1" />
90
+ </xs:sequence>
91
+ </xs:extension>
92
+ </xs:complexContent>
93
+ </xs:complexType>
94
+ </xs:element>
95
+
96
+ </xs:schema>
@@ -0,0 +1,74 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="qualified"
4
+ targetNamespace="http://www.orcid.org/ns/email" xmlns:email="http://www.orcid.org/ns/email"
5
+ xmlns:common="http://www.orcid.org/ns/common">
6
+ <xs:annotation>
7
+ <xs:documentation>
8
+ =============================================================================
9
+
10
+ ORCID (R) Open Source
11
+ http://orcid.org
12
+
13
+ Copyright (c) 2012-2014 ORCID,
14
+ Inc.
15
+ Licensed under an MIT-Style License (MIT)
16
+ http://orcid.org/open-source-license
17
+
18
+ This copyright and license
19
+ information (including a link to the full
20
+ license)
21
+ shall be included in
22
+ its entirety in all copies or substantial portion of
23
+ the software.
24
+
25
+ =============================================================================
26
+ The schema describes the message format used for ORCID API requests
27
+ and responses.
28
+ </xs:documentation>
29
+ <xs:appinfo>
30
+ <sch:title>Schematron validation</sch:title>
31
+ <sch:ns prefix="email" uri="http://www.orcid.org/ns/email" />
32
+ </xs:appinfo>
33
+ </xs:annotation>
34
+ <xs:import namespace="http://www.orcid.org/ns/common"
35
+ schemaLocation="../common_2.0_rc3/common-2.0_rc3.xsd" />
36
+ <xs:element name="emails">
37
+ <xs:complexType>
38
+ <xs:annotation>
39
+ <xs:documentation>Email's container
40
+ </xs:documentation>
41
+ </xs:annotation>
42
+ <xs:sequence>
43
+ <xs:element ref="common:last-modified-date" minOccurs="0" maxOccurs="1" />
44
+ <xs:element name="email" type="email:email" minOccurs="0"
45
+ maxOccurs="unbounded" />
46
+ </xs:sequence>
47
+ <xs:attribute name="path" type="common:element-path" use="optional" />
48
+ </xs:complexType>
49
+ </xs:element>
50
+
51
+
52
+ <xs:element name="email">
53
+ <xs:annotation>
54
+ <xs:documentation>Email element.
55
+ </xs:documentation>
56
+ </xs:annotation>
57
+ <xs:complexType>
58
+ <xs:complexContent>
59
+ <xs:extension base="email:email"></xs:extension>
60
+ </xs:complexContent>
61
+ </xs:complexType>
62
+ </xs:element>
63
+
64
+
65
+ <xs:complexType name="email">
66
+ <xs:complexContent>
67
+ <xs:extension base="common:element-summary">
68
+ <xs:sequence>
69
+ <xs:element name="email" type="common:email" />
70
+ </xs:sequence>
71
+ </xs:extension>
72
+ </xs:complexContent>
73
+ </xs:complexType>
74
+ </xs:schema>
@@ -0,0 +1,96 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="qualified"
4
+ targetNamespace="http://www.orcid.org/ns/employment" xmlns:employment="http://www.orcid.org/ns/employment"
5
+ xmlns:common="http://www.orcid.org/ns/common">
6
+ <xs:annotation>
7
+ <xs:documentation>
8
+ =============================================================================
9
+
10
+ ORCID (R) Open Source
11
+ http://orcid.org
12
+
13
+ Copyright (c) 2012-2014 ORCID,
14
+ Inc.
15
+ Licensed under an MIT-Style License (MIT)
16
+ http://orcid.org/open-source-license
17
+
18
+ This copyright and license
19
+ information (including a link to the full
20
+ license)
21
+ shall be included in
22
+ its entirety in all copies or substantial portion of
23
+ the software.
24
+
25
+ =============================================================================
26
+ The schema describes the message format used for ORCID API requests
27
+ and responses.
28
+ The top level element is orcid-message.
29
+ </xs:documentation>
30
+ <xs:appinfo>
31
+ <sch:title>Schematron validation</sch:title>
32
+ <sch:ns prefix="orcid" uri="http://www.orcid.org/ns/orcid" />
33
+ </xs:appinfo>
34
+ </xs:annotation>
35
+
36
+ <xs:import namespace="http://www.orcid.org/ns/common"
37
+ schemaLocation="../common_2.0_rc3/common-2.0_rc3.xsd" />
38
+
39
+ <xs:element name="employment">
40
+ <xs:annotation>
41
+ <xs:documentation>An employment associated with the researcher or
42
+ contributor.
43
+ * The visibility attribute (private, limited or public)
44
+ can be set at
45
+ record creation, and indicates who can see this section
46
+ of
47
+ information.
48
+ * The put-code attribute is used only when reading
49
+ this element. When
50
+ updating the item, the put-code attribute must be
51
+ included to
52
+ indicate the specific record to be updated.
53
+ </xs:documentation>
54
+ </xs:annotation>
55
+ <xs:complexType>
56
+ <xs:complexContent>
57
+ <xs:extension base="common:element-summary">
58
+ <xs:sequence>
59
+ <xs:element name="department-name" type="common:non-empty-string"
60
+ minOccurs="0" maxOccurs="1" />
61
+ <xs:element name="role-title" type="common:non-empty-string"
62
+ minOccurs="0" maxOccurs="1" />
63
+ <xs:element ref="common:start-date" minOccurs="0"
64
+ maxOccurs="1" />
65
+ <xs:element ref="common:end-date" minOccurs="0"
66
+ maxOccurs="1" />
67
+ <xs:element name="organization" type="common:organization"
68
+ minOccurs="1" maxOccurs="1" />
69
+ </xs:sequence>
70
+ </xs:extension>
71
+ </xs:complexContent>
72
+ </xs:complexType>
73
+ </xs:element>
74
+
75
+ <xs:element name="employment-summary">
76
+ <xs:complexType>
77
+ <xs:complexContent>
78
+ <xs:extension base="common:element-summary">
79
+ <xs:sequence>
80
+ <xs:element name="department-name" type="common:non-empty-string"
81
+ minOccurs="0" maxOccurs="1" />
82
+ <xs:element name="role-title" type="common:non-empty-string"
83
+ minOccurs="0" maxOccurs="1" />
84
+ <xs:element ref="common:start-date" minOccurs="0"
85
+ maxOccurs="1" />
86
+ <xs:element ref="common:end-date" minOccurs="0"
87
+ maxOccurs="1" />
88
+ <xs:element name="organization" type="common:organization"
89
+ minOccurs="1" maxOccurs="1" />
90
+ </xs:sequence>
91
+ </xs:extension>
92
+ </xs:complexContent>
93
+ </xs:complexType>
94
+ </xs:element>
95
+
96
+ </xs:schema>