datacite-mapping 0.1.17.2 → 0.2.0
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.
- checksums.yaml +4 -4
- data/CHANGES.md +33 -0
- data/README.md +93 -150
- data/datacite-mapping.gemspec +1 -1
- data/lib/datacite/mapping.rb +12 -27
- data/lib/datacite/mapping/alternate_identifier.rb +2 -0
- data/lib/datacite/mapping/contributor.rb +6 -2
- data/lib/datacite/mapping/creator.rb +33 -3
- data/lib/datacite/mapping/date.rb +28 -76
- data/lib/datacite/mapping/date_value.rb +116 -0
- data/lib/datacite/mapping/description.rb +9 -8
- data/lib/datacite/mapping/funding_reference.rb +20 -5
- data/lib/datacite/mapping/geo_location.rb +25 -4
- data/lib/datacite/mapping/geo_location_box.rb +10 -8
- data/lib/datacite/mapping/geo_location_node.rb +68 -0
- data/lib/datacite/mapping/geo_location_point.rb +8 -8
- data/lib/datacite/mapping/geo_location_polygon.rb +76 -0
- data/lib/datacite/mapping/identifier.rb +23 -11
- data/lib/datacite/mapping/module_info.rb +3 -3
- data/lib/datacite/mapping/name_identifier.rb +1 -0
- data/lib/datacite/mapping/namespace_extensions.rb +12 -0
- data/lib/datacite/mapping/read_only_nodes.rb +65 -0
- data/lib/datacite/mapping/related_identifier.rb +28 -0
- data/lib/datacite/mapping/resource.rb +88 -43
- data/lib/datacite/mapping/rights.rb +2 -0
- data/lib/datacite/mapping/subject.rb +10 -9
- data/lib/datacite/mapping/title.rb +7 -11
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3059p-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r31017-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3201j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r33w26-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r34s3v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r36p4t-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r39g6f-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3cc7d-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3d59d-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3f59q-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3g591-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3k016-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3kw2j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3mw2v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3np4v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3pp45-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3rp4s-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/dataone-ark+=c5146=r3tg63-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1159q-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d17g6j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1c88g-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1cc74-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1h019-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1ms3x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1mw2k-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1rg66-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1rp4h-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucb-ark+=b6078=d1wc7s-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1001p-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1059f-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d11010-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1159r-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d12019-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d12s30-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1301m-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d13s39-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d13w2z-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d14s3m-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d15k5m-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d15p48-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d16k5x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d16p4k-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d17g6k-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d17p4w-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d18g6w-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1988w-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d19g66-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1b886-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1bc7v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1c88h-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1cc75-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1d595-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1f30c-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1f59g-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1g011-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1g59s-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1h01b-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1h593-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1j01n-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1js3b-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1k01z-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1ks3n-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1kw29-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1ms3z-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1mw2m-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1np4m-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1pk58-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1pp4x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1qg6x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1qp47-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1rg67-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1rp4j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1sg6j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1t88j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1tg6v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1v88v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1vc7h-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1w885-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1wc7t-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1x59t-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/uci-ark+=b7280=d1z594-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucla-ark+=b5060=d2qr4v2t-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucla-ark+=b5068=d1cc7x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucla-ark+=b5068=d1h59v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucla-ark+=b5068=d1rp49-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucla-ark+=b5068=d1wc7k-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucm-ark+=13030=m51g217t-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucm-ark+=b6071=z7wc73-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8301x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d86p4w-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8bc75-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8g593-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8h59d-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8kw2m-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8rp4v-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucop-ark+=b5060=d8z59f-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsc-ark+=b7291=d11592-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsc-ark+=b7291=d17p46-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsc-ark+=b7291=d1h59d-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsc-ark+=b7291=d1mw2x-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsc-ark+=b7291=d1wc74-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6057cv6-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6154f00-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q61z429d-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q62z13fs-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q65q4t1r-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q66q1v54-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q67p8w9z-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q68g8hmp-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6bg2kwf-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6c8276k-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6cc0xmh-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6d798bd-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6h12zxh-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6h41pb7-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6kw5cxv-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6ms3qnx-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6mw2f2n-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6pn93h6-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6qn64nk-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6rf5rzx-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6rn35sz-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6sf2t3q-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6td9v7j-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6w66hpn-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6x63jt1-mrt-datacite.xml +0 -0
- data/spec/data/{dash1-datacite-xml → dash1}/ucsf-ark+=b7272=q6z60kzd-mrt-datacite.xml +0 -0
- data/spec/data/datacite-4-synthetic.xml +110 -0
- data/spec/data/datacite3/datacite-example-Box_dateCollected_DataCollector-v3.0.xml +46 -0
- data/spec/data/datacite3/datacite-example-GeoLocation-v3.0.xml +50 -0
- data/spec/data/datacite3/datacite-example-HasMetadata-v3.0.xml +52 -0
- data/spec/data/datacite3/datacite-example-ResearchGroup_Methods-v3.0.xml +36 -0
- data/spec/data/datacite3/datacite-example-ResourceTypeGeneral_Collection-v3.0.xml +38 -0
- data/spec/data/datacite3/datacite-example-complicated-v3.0.xml +48 -0
- data/spec/data/datacite3/datacite-example-dataset-v3.0.xml +35 -0
- data/spec/data/datacite3/datacite-example-full-v3.1.xml +61 -0
- data/spec/data/datacite3/datacite-example-relationTypeIsIdenticalTo-v3.0.xml +48 -0
- data/spec/data/datacite3/datacite-example-video-v3.0.xml +26 -0
- data/spec/data/datacite3/datacite-example-workflow-v3.0.xml +43 -0
- data/spec/data/{metadata.xsd → datacite3/metadata.xsd} +0 -0
- data/spec/data/datacite4/datacite-example-Box_dateCollected_DataCollector-v4.0.xml +52 -0
- data/spec/data/datacite4/datacite-example-GeoLocation-v4.0.xml +66 -0
- data/spec/data/datacite4/datacite-example-HasMetadata-v4.0.xml +62 -0
- data/spec/data/datacite4/datacite-example-ResearchGroup_Methods-v4.0.xml +44 -0
- data/spec/data/datacite4/datacite-example-ResourceTypeGeneral_Collection-v4.0.xml +52 -0
- data/spec/data/datacite4/datacite-example-complicated-v4.0.xml +54 -0
- data/spec/data/datacite4/datacite-example-dataset-v4.0.xml +39 -0
- data/spec/data/{resource.xml → datacite4/datacite-example-full-v4.0.xml} +14 -4
- data/spec/data/{kernel-4.0 → datacite4}/datacite-example-fundingReference-v.4.0.xml +0 -0
- data/spec/data/datacite4/datacite-example-relationTypeIsIdenticalTo-v4.0.xml +65 -0
- data/spec/data/datacite4/datacite-example-video-v4.0.xml +31 -0
- data/spec/data/datacite4/datacite-example-workflow-v4.0.xml +55 -0
- data/spec/data/{kernel-4.0 → datacite4}/metadata.xsd +0 -0
- data/spec/rspec_custom_matchers.rb +5 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/datacite/mapping/contributor_spec.rb +7 -0
- data/spec/unit/datacite/mapping/creator_spec.rb +92 -0
- data/spec/unit/datacite/mapping/date_spec.rb +25 -214
- data/spec/unit/datacite/mapping/date_value_spec.rb +143 -0
- data/spec/unit/datacite/mapping/description_spec.rb +4 -3
- data/spec/unit/datacite/mapping/funding_reference_spec.rb +5 -5
- data/spec/unit/datacite/mapping/geo_location_box_spec.rb +0 -36
- data/spec/unit/datacite/mapping/geo_location_point_spec.rb +0 -25
- data/spec/unit/datacite/mapping/geo_location_polygon_spec.rb +47 -0
- data/spec/unit/datacite/mapping/geo_location_spec.rb +153 -6
- data/spec/unit/datacite/mapping/identifier_spec.rb +9 -0
- data/spec/unit/datacite/mapping/related_identifier_spec.rb +23 -0
- data/spec/unit/datacite/mapping/resource_spec.rb +994 -874
- data/spec/unit/datacite/mapping/subject_spec.rb +12 -6
- data/spec/unit/datacite/mapping/title_spec.rb +20 -6
- metadata +320 -278
- data/lib/datacite/mapping/nonvalidating.rb +0 -10
- data/lib/datacite/mapping/nonvalidating/identifier.rb +0 -40
- data/lib/datacite/mapping/nonvalidating/subject.rb +0 -43
- data/spec/data/mrt-datacite.xml +0 -61
- data/spec/unit/datacite/mapping/log_spec.rb +0 -23
- data/spec/unit/datacite/mapping/nonvalidating/identifier_spec.rb +0 -52
- data/spec/unit/datacite/mapping/resource_type_spec.rb +0 -68
|
@@ -10,22 +10,23 @@ module Datacite
|
|
|
10
10
|
# Initializes a new {Subject}
|
|
11
11
|
# @param scheme [String, nil] the subject scheme or classification code or authority if one is used. Optional.
|
|
12
12
|
# @param scheme_uri [URI, nil] the URI of the subject scheme or classification code or authority if one is used. Optional.
|
|
13
|
-
# @param language [String] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
14
|
-
# It's unclear from the spec whether language is required; to play it safe, if it's missing, we default to 'en'.
|
|
13
|
+
# @param language [String, nil] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
15
14
|
# @param value [String] the subject itself.
|
|
16
|
-
def initialize(scheme: nil, scheme_uri: nil, language:
|
|
15
|
+
def initialize(scheme: nil, scheme_uri: nil, language: nil, value:)
|
|
17
16
|
self.scheme = scheme
|
|
18
17
|
self.scheme_uri = scheme_uri
|
|
19
18
|
self.language = language
|
|
20
19
|
self.value = value
|
|
21
20
|
end
|
|
22
21
|
|
|
23
|
-
def language
|
|
24
|
-
@language
|
|
22
|
+
def language=(value)
|
|
23
|
+
@language = value && value.strip
|
|
25
24
|
end
|
|
26
25
|
|
|
27
|
-
def
|
|
28
|
-
|
|
26
|
+
def value=(v)
|
|
27
|
+
new_value = v && v.strip
|
|
28
|
+
fail ArgumentError, 'Value cannot be empty or nil' unless new_value && !new_value.empty?
|
|
29
|
+
@value = new_value
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# @!attribute [rw] scheme
|
|
@@ -37,14 +38,14 @@ module Datacite
|
|
|
37
38
|
uri_node :scheme_uri, '@schemeURI', default_value: nil
|
|
38
39
|
|
|
39
40
|
# @!attribute [rw] language
|
|
40
|
-
# @return [String] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
41
|
-
# It's unclear from the spec whether language is required; to play it safe, if it's missing, we default to 'en'.
|
|
41
|
+
# @return [String, nil] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
42
42
|
text_node :language, '@xml:lang', default_value: nil
|
|
43
43
|
|
|
44
44
|
# @!attribute [rw] value
|
|
45
45
|
# @return [String] the subject itself.
|
|
46
46
|
text_node :value, 'text()'
|
|
47
47
|
|
|
48
|
+
fallback_mapping :datacite_3, :_default
|
|
48
49
|
end
|
|
49
50
|
end
|
|
50
51
|
end
|
|
@@ -21,32 +21,27 @@ module Datacite
|
|
|
21
21
|
include XML::Mapping
|
|
22
22
|
|
|
23
23
|
# Initializes a new {Title}.
|
|
24
|
-
# @param language [String] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
25
|
-
# It's unclear from the spec whether language is required; to play it safe, if it's missing, we default to 'en'.
|
|
24
|
+
# @param language [String, nil] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
26
25
|
# @param value [String] the title itself.
|
|
27
26
|
# @param type [TitleType, nil] the title type. Optional.
|
|
28
|
-
def initialize(language:
|
|
27
|
+
def initialize(language: nil, value:, type: nil)
|
|
29
28
|
self.language = language
|
|
30
29
|
self.type = type
|
|
31
30
|
self.value = value
|
|
32
31
|
end
|
|
33
32
|
|
|
34
|
-
def language
|
|
35
|
-
@language || 'en'
|
|
36
|
-
end
|
|
37
|
-
|
|
38
33
|
def language=(value)
|
|
39
|
-
@language = value
|
|
34
|
+
@language = value && value.strip
|
|
40
35
|
end
|
|
41
36
|
|
|
42
37
|
def value=(v)
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
new_value = v && v.strip
|
|
39
|
+
fail ArgumentError, 'Value cannot be empty or nil' unless new_value && !new_value.empty?
|
|
40
|
+
@value = new_value.strip
|
|
45
41
|
end
|
|
46
42
|
|
|
47
43
|
# @!attribute [rw] language
|
|
48
44
|
# @return [String] an IETF BCP 47, ISO 639-1 language code identifying the language.
|
|
49
|
-
# It's unclear from the spec whether language is required; to play it safe, if it's missing, we default to 'en'.
|
|
50
45
|
text_node :language, '@xml:lang', default_value: nil
|
|
51
46
|
|
|
52
47
|
# @!attribute [rw] type
|
|
@@ -57,6 +52,7 @@ module Datacite
|
|
|
57
52
|
# @return [String] the title itself.
|
|
58
53
|
text_node :value, 'text()'
|
|
59
54
|
|
|
55
|
+
fallback_mapping :datacite_3, :_default
|
|
60
56
|
end
|
|
61
57
|
end
|
|
62
58
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
A modified datacite-example-full-v4.0.xml that includes:
|
|
4
|
+
- fundingReference
|
|
5
|
+
- IGSN related identifier
|
|
6
|
+
- geoLocationPolygon
|
|
7
|
+
-->
|
|
8
|
+
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd">
|
|
9
|
+
<identifier identifierType="DOI">10.5072/example-full</identifier>
|
|
10
|
+
<creators>
|
|
11
|
+
<creator>
|
|
12
|
+
<creatorName>Miller, Elizabeth</creatorName>
|
|
13
|
+
<givenName>Elizabeth</givenName>
|
|
14
|
+
<familyName>Miller</familyName>
|
|
15
|
+
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">0000-0001-5000-0007</nameIdentifier>
|
|
16
|
+
<affiliation>DataCite</affiliation>
|
|
17
|
+
</creator>
|
|
18
|
+
</creators>
|
|
19
|
+
<titles>
|
|
20
|
+
<title xml:lang="en-us">Full DataCite XML Example</title>
|
|
21
|
+
<title xml:lang="en-us" titleType="Subtitle">Demonstration of DataCite Properties.</title>
|
|
22
|
+
</titles>
|
|
23
|
+
<publisher>DataCite</publisher>
|
|
24
|
+
<publicationYear>2014</publicationYear>
|
|
25
|
+
<subjects>
|
|
26
|
+
<subject xml:lang="en-us" schemeURI="http://dewey.info/" subjectScheme="dewey">000 computer science</subject>
|
|
27
|
+
</subjects>
|
|
28
|
+
<contributors>
|
|
29
|
+
<contributor contributorType="ProjectLeader">
|
|
30
|
+
<contributorName>Starr, Joan</contributorName>
|
|
31
|
+
<nameIdentifier schemeURI="http://orcid.org/" nameIdentifierScheme="ORCID">0000-0002-7285-027X</nameIdentifier>
|
|
32
|
+
<affiliation>California Digital Library</affiliation>
|
|
33
|
+
</contributor>
|
|
34
|
+
</contributors>
|
|
35
|
+
<fundingReferences>
|
|
36
|
+
<fundingReference>
|
|
37
|
+
<funderName>European Commission</funderName>
|
|
38
|
+
<funderIdentifier funderIdentifierType="Crossref Funder ID">http://doi.org/10.13039/501100000780</funderIdentifier>
|
|
39
|
+
<awardNumber awardURI="http://cordis.europa.eu/project/rcn/100180_en.html">282625</awardNumber>
|
|
40
|
+
<awardTitle>MOTivational strength of ecosystem services and alternative ways to express the value of BIOdiversity</awardTitle>
|
|
41
|
+
</fundingReference>
|
|
42
|
+
<fundingReference>
|
|
43
|
+
<funderName>European Commission</funderName>
|
|
44
|
+
<funderIdentifier funderIdentifierType="Crossref Funder ID">http://doi.org/10.13039/501100000780</funderIdentifier>
|
|
45
|
+
<awardNumber awardURI="http://cordis.europa.eu/project/rcn/100603_en.html">284382</awardNumber>
|
|
46
|
+
<awardTitle>Institutionalizing global genetic-resource commons. Global Strategies for accessingand using essential public knowledge assets in the life science</awardTitle>
|
|
47
|
+
</fundingReference>
|
|
48
|
+
</fundingReferences>
|
|
49
|
+
<dates>
|
|
50
|
+
<date dateType="Updated">2014-10-17</date>
|
|
51
|
+
</dates>
|
|
52
|
+
<language>en-us</language>
|
|
53
|
+
<resourceType resourceTypeGeneral="Software">XML</resourceType>
|
|
54
|
+
<alternateIdentifiers>
|
|
55
|
+
<alternateIdentifier alternateIdentifierType="URL">http://schema.datacite.org/schema/meta/kernel-3.1/example/datacite-example-full-v3.1.xml</alternateIdentifier>
|
|
56
|
+
</alternateIdentifiers>
|
|
57
|
+
<relatedIdentifiers>
|
|
58
|
+
<relatedIdentifier relatedIdentifierType="URL" relationType="HasMetadata" relatedMetadataScheme="citeproc+json" schemeURI="https://github.com/citation-style-language/schema/raw/master/csl-data.json">http://data.datacite.org/application/citeproc+json/10.5072/example-full</relatedIdentifier>
|
|
59
|
+
<relatedIdentifier relatedIdentifierType="arXiv" relationType="IsReviewedBy">arXiv:0706.0001</relatedIdentifier>
|
|
60
|
+
<relatedIdentifier relatedIdentifierType="IGSN" relationType="References">IECUR0097</relatedIdentifier>
|
|
61
|
+
</relatedIdentifiers>
|
|
62
|
+
<sizes>
|
|
63
|
+
<size>3KB</size>
|
|
64
|
+
</sizes>
|
|
65
|
+
<formats>
|
|
66
|
+
<format>application/xml</format>
|
|
67
|
+
</formats>
|
|
68
|
+
<version>3.1</version>
|
|
69
|
+
<rightsList>
|
|
70
|
+
<rights rightsURI="http://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 Universal</rights>
|
|
71
|
+
</rightsList>
|
|
72
|
+
<descriptions>
|
|
73
|
+
<description xml:lang="en-us" descriptionType="Abstract">
|
|
74
|
+
XML example of all DataCite Metadata Schema v4.0 properties.
|
|
75
|
+
</description>
|
|
76
|
+
</descriptions>
|
|
77
|
+
<geoLocations>
|
|
78
|
+
<geoLocation>
|
|
79
|
+
<geoLocationPlace>Atlantic Ocean</geoLocationPlace>
|
|
80
|
+
<geoLocationPoint>
|
|
81
|
+
<pointLongitude>-67.302</pointLongitude>
|
|
82
|
+
<pointLatitude>31.233</pointLatitude>
|
|
83
|
+
</geoLocationPoint>
|
|
84
|
+
<geoLocationBox>
|
|
85
|
+
<westBoundLongitude>-71.032</westBoundLongitude>
|
|
86
|
+
<eastBoundLongitude>-68.211</eastBoundLongitude>
|
|
87
|
+
<southBoundLatitude>41.090</southBoundLatitude>
|
|
88
|
+
<northBoundLatitude>42.893</northBoundLatitude>
|
|
89
|
+
</geoLocationBox>
|
|
90
|
+
<geoLocationPolygon>
|
|
91
|
+
<polygonPoint>
|
|
92
|
+
<pointLongitude>-67.302</pointLongitude>
|
|
93
|
+
<pointLatitude>31.233</pointLatitude>
|
|
94
|
+
</polygonPoint>
|
|
95
|
+
<polygonPoint>
|
|
96
|
+
<pointLongitude>-71.032</pointLongitude>
|
|
97
|
+
<pointLatitude>-68.211</pointLatitude>
|
|
98
|
+
</polygonPoint>
|
|
99
|
+
<polygonPoint>
|
|
100
|
+
<pointLongitude>41.09</pointLongitude>
|
|
101
|
+
<pointLatitude>42.893</pointLatitude>
|
|
102
|
+
</polygonPoint>
|
|
103
|
+
<polygonPoint>
|
|
104
|
+
<pointLongitude>-67.302</pointLongitude>
|
|
105
|
+
<pointLatitude>31.233</pointLatitude>
|
|
106
|
+
</polygonPoint>
|
|
107
|
+
</geoLocationPolygon>
|
|
108
|
+
</geoLocation>
|
|
109
|
+
</geoLocations>
|
|
110
|
+
</resource>
|