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

68 lines
1.7 KiB
XML

<Resource version="0.4.x">
<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>
<mappings>
<resourceFilters>
<filter>
<condition>$.resources[?(@.format)]</condition>
</filter>
</resourceFilters>
<mapping>
<source>
<value type="constant">dataset</value>
</source>
<targetPath>$.metadata</targetPath>
<targetElement>upload_type</targetElement>
</mapping>
<mapping>
<source>
<value type="jsonPath">$.extras[?(@.key=='Author')].value</value>
<value type="jsonPath">$.author</value>
</source>
<targetPath>$.metadata.creators[0]</targetPath>
<targetElement>name</targetElement>
<!-- <regexp type="extract">
<target>([A-Za-z]*, [A-Za-z]*)(?=,)</target>
</regexp> -->
</mapping>
<!-- <mapping>
<source>
<value type="constant">Producer</value>
</source>
<targetPath>$.metadata.creators[0]</targetPath>
<targetElement>type</targetElement>
</mapping> -->
<!-- <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>
</Resource>