ckan2zenodo-library/src/test/resources/ResearchObject.xml

68 lines
1.7 KiB
XML
Raw Normal View History

2019-12-03 17:20:12 +01:00
<Resource version="0.4.x">
2019-12-05 11:56:51 +01:00
<ID>4adeaca2-8e32-4507-8937-d891629998e2</ID>
<Type>GenericResource</Type>
<Scopes></Scopes>
<Profile>
<SecondaryType>Ckan-Zenodo-Mappings</SecondaryType>
<Name>ResearchObject</Name>
<Description>Simple mappings tests</Description>
<Body>
2021-03-08 17:12:28 +01:00
<mappings>
<resourceFilters>
2019-12-10 17:06:52 +01:00
<filter>
2020-02-03 18:14:47 +01:00
<condition>$.resources[?(@.format)]</condition>
2019-12-10 17:06:52 +01:00
</filter>
</resourceFilters>
2019-12-05 11:56:51 +01:00
<mapping>
<source>
<value type="constant">dataset</value>
2019-12-10 17:06:52 +01:00
</source>
2019-12-05 11:56:51 +01:00
<targetPath>$.metadata</targetPath>
<targetElement>upload_type</targetElement>
</mapping>
<mapping>
<source>
<value type="jsonPath">$.extras[?(@.key=='Author')].value</value>
<value type="jsonPath">$.author</value>
2019-12-05 11:56:51 +01:00
</source>
2019-12-10 17:06:52 +01:00
<targetPath>$.metadata.creators[0]</targetPath>
2019-12-05 11:56:51 +01:00
<targetElement>name</targetElement>
<!-- <regexp type="extract">
2019-12-05 11:56:51 +01:00
<target>([A-Za-z]*, [A-Za-z]*)(?=,)</target>
</regexp> -->
2019-12-05 11:56:51 +01:00
</mapping>
<!-- <mapping>
<source>
<value type="constant">Producer</value>
2019-12-05 11:56:51 +01:00
</source>
2019-12-10 17:06:52 +01:00
<targetPath>$.metadata.creators[0]</targetPath>
2019-12-05 11:56:51 +01:00
<targetElement>type</targetElement>
</mapping> -->
2019-12-05 11:56:51 +01:00
<!-- <mapping>
<source type="jsonPath">
<value>$.extras[?(@.key=='Author')].value</value>
</source>
<targetPath>$.metadata.contributors[0]</targetPath>
<targetElement>orcid</targetElement>
<regexp type="extract">
<target>(https://)?orcid.org/.*</target>
</regexp>
<regexp type="replace">
<target>https://orcid.org/</target>
<replacement></replacement>
</regexp>
</mapping>-->
</mappings>
</Body>
</Profile>
2019-12-03 17:20:12 +01:00
</Resource>