x3m mapping is now only taken from url; ads policy aligned to aggregator instance; removed wf parameter unused

This commit is contained in:
Enrico Ottonello 2019-10-31 14:08:37 +01:00
parent 1dab575b58
commit b3a8f05c26
11 changed files with 86 additions and 2339 deletions

View File

@ -17,7 +17,6 @@ import eu.dnetlib.miscutils.functional.xml.XMLIndenter;
import eu.dnetlib.msro.workflows.graph.Arc;
import eu.dnetlib.msro.workflows.nodes.AsyncJobNode;
import eu.dnetlib.msro.workflows.nodes.transform.ApplyX3Mapping;
import eu.dnetlib.msro.workflows.nodes.transform.X3MTransformJobNode;
import eu.dnetlib.msro.workflows.procs.Env;
import eu.dnetlib.rmi.common.ResultSet;
import eu.dnetlib.rmi.enabling.ISLookUpException;
@ -35,7 +34,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
public class X3MTransformAriadnePlusJobNode extends X3MTransformJobNode {
public class X3MTransformAriadnePlusJobNode extends AsyncJobNode {
private static final Log log = LogFactory.getLog(X3MTransformAriadnePlusJobNode.class);
private static final String OAI_NAMESPACE_URI = "http://www.openarchives.org/OAI/2.0/";
@ -45,7 +44,6 @@ public class X3MTransformAriadnePlusJobNode extends X3MTransformJobNode {
private String outputEprParam;
private String mappingPolicyProfileId;
private String mappingProfileIds;
private String mappingUrl;
@ -71,7 +69,6 @@ public class X3MTransformAriadnePlusJobNode extends X3MTransformJobNode {
@Override
protected String execute(final Env env) throws Exception {
log.info("Mapping profile ids read from node configuration: " + mappingProfileIds);
log.info("Mapping Policy profile id read from node configuration: " + mappingPolicyProfileId);
log.info("Mapping url read from node configuration: " + mappingUrl);
final URL mappingURL = new URL(mappingUrl);
@ -225,14 +222,6 @@ public class X3MTransformAriadnePlusJobNode extends X3MTransformJobNode {
this.mappingPolicyProfileId = mappingPolicyProfileId;
}
public String getMappingProfileIds() {
return mappingProfileIds;
}
public void setMappingProfileIds(final String mappingProfileIds) {
this.mappingProfileIds = mappingProfileIds;
}
public boolean isVerboseLogging() {
return verboseLogging;
}

View File

@ -1,61 +1,29 @@
<RESOURCE_PROFILE>
<HEADER>
<RESOURCE_IDENTIFIER value="e508ddc7-ff5e-45dc-9116-96a2201d0bc9_Q2xlYW5lckRTUmVzb3VyY2VzL0NsZWFuZXJEU1Jlc291cmNlVHlwZQ=="/>
<RESOURCE_TYPE value="CleanerDSResourceType"/>
<RESOURCE_KIND value="CleanerDSResources"/>
<RESOURCE_URI value=""/>
<DATE_OF_CREATION value="2017-03-16T16:34:25+00:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
<CLEANER_NAME>Parthenos Default cleaning rules</CLEANER_NAME>
<CLEANER_DESCRIPTION/>
<NAMESPACES>
<NAMESPACE ns="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
<NAMESPACE ns="crmdig" uri="http://www.ics.forth.gr/isl/CRMdig/"/>
<NAMESPACE ns="crmpe" uri="http://parthenos.d4science.org/CRMext/CRMpe.rdfs/"/>
<NAMESPACE ns="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<NAMESPACE ns="rdfs" uri="http://www.w3.org/2000/01/rdf-schema#"/>
</NAMESPACES>
<CLEANER_RULES>
<RULE strict="true" vocabularies="PARTHENOS:ContactPointTypes" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/contactpointtype')]/rdfs:label"/>
<RULE strict="true" vocabularies="parthenos:dataset_encodings" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/encodingtype')]/rdfs:label"/>
<RULE strict="true" vocabularies="PARTHENOS:DatasetTypes" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/datasettype')]/rdfs:label"/>
<RULE strict="true" vocabularies="dnet:languages" xpath="//rdf:Description[./rdf:type/@resource='http://www.cidoc-crm.org/cidoc-crm/E56_Language']/rdfs:label"/>
<RULE strict="true" vocabularies="PARTHENOS:PlaceTypes" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/placetype')]/rdfs:label"/>
<RULE strict="true" vocabularies="PARTHENOS:Schemas" xpath="//rdf:Description[./rdf:type/@rdf:resource='http://parthenos.d4science.org/CRMext/CRMpe.rdfs/PE38_Schema']/rdfs:label"/>
<!-- Vocabulary dropped -->
<!--<RULE strict="true" vocabularies="parthenos:service_availability" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/availabilitytype')]/rdfs:label"/> -->
<RULE strict="true" vocabularies="parthenos:service_competences" xpath="//rdf:Description[./rdf:type/@rdf:resource='http://parthenos.d4science.org/CRMext/CRMpe.rdfs/PE36_Competency']/rdfs:label"/>
<RULE strict="true" vocabularies="PARTHENOS:Periods" xpath="//rdf:Description[./rdf:type/@rdf:resource='http://www.cidoc-crm.org/cidoc-crm/E4_Period']/rdfs:label"/>
<RULE strict="true" vocabularies="PARTHENOS:placesSimple" xpath="//rdf:Description[./rdf:type/@rdf:resource='http://www.cidoc-crm.org/cidoc-crm/E53_Place']/rdfs:label"/>
<!--
TODO: it seems like prog languages are E55_Type of a E29_Design_or_procedure used as specific technique (p33i) by a D7_Digital_Machine_Event which produced (L33) the software:
this is too much complicated for an xpath, I think...
There must be a consistent URI: waiting for George's feedback
-->
<!--<RULE strict="true" vocabularies="PARTHENOS:ProgrammingLanguages" xpath=""/> -->
<!-- TODO: no vocabulary available yet, must be set up looking at what we have -->
<!-- <RULE strict="true" vocabularies="" xpath="//rdf:Description[./rdf:type/@rdf:resource='http://parthenos.d4science.org/CRMext/CRMpe.rdfs/PE37_Protocol_Type']/rdfs:label"/>-->
<!-- TODO: no vocabulary available yet, must be set up looking at what we have -->
<!--<RULE strict="true" vocabularies="" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/righttype')]/rdfs:label"/>-->
<!-- TODO: no vocabulary available yet, must be set up looking at what we have -->
<!--<RULE strict="true" vocabularies="parthenos:dataset_subjects" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/subject')]/rdfs:label"/>-->
<!-- TODO: no vocabulary available yet, should we look at what we have? -->
<!--<RULE strict="true" vocabularies="" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/rightusetype')]/rdfs:label"/>-->
<!-- TODO: no vocabulary available yet, should we look at what we have? -->
<!--<RULE strict="true" vocabularies="" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/eventtype')]/rdfs:label"/>-->
<!-- TODO: no vocabulary available yet, should we look at what we have? -->
<!--<RULE strict="true" vocabularies="" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/role')]/rdfs:label"/>-->
<!-- TODO: no vocabulary available yet, should we look at what we have? -->
<!--<RULE strict="true" vocabularies="" xpath="//rdf:Description[starts-with(./@rdf:about, 'http://parthenos.d4science.org/handle/Parthenos/REG/Concept/idtype')]/rdfs:label"/>-->
</CLEANER_RULES>
</CONFIGURATION>
<STATUS>
<LAST_UPDATE value="2018-03-30T16:56:54+01:00"/>
</STATUS>
<SECURITY_PARAMETERS>String</SECURITY_PARAMETERS>
</BODY>
<HEADER>
<RESOURCE_IDENTIFIER value="e508ddc7-ff5e-45dc-9116-96a2201d0bc9_Q2xlYW5lckRTUmVzb3VyY2VzL0NsZWFuZXJEU1Jlc291cmNlVHlwZQ=="/>
<RESOURCE_TYPE value="CleanerDSResourceType"/>
<RESOURCE_KIND value="CleanerDSResources"/>
<RESOURCE_URI value=""/>
<DATE_OF_CREATION value="2019-09-22T18:55:57+02:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
<CLEANER_NAME>Ariadne Default cleaning rules</CLEANER_NAME>
<CLEANER_DESCRIPTION/>
<NAMESPACES>
<NAMESPACE ns="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
<NAMESPACE ns="crmdig" uri="http://www.ics.forth.gr/isl/CRMdig/"/>
<NAMESPACE ns="crmpe" uri="http://parthenos.d4science.org/CRMext/CRMpe.rdfs/"/>
<NAMESPACE ns="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<NAMESPACE ns="rdfs" uri="http://www.w3.org/2000/01/rdf-schema#"/>
</NAMESPACES>
<CLEANER_RULES>
<RULE strict="true" vocabularies="dnet:languages" xpath="//rdf:Description[./rdf:type/@resource='http://www.cidoc-crm.org/cidoc-crm/E56_Language']/rdfs:label"/>
</CLEANER_RULES>
</CONFIGURATION>
<STATUS>
<LAST_UPDATE value="2018-03-30T16:56:54+01:00"/>
</STATUS>
<SECURITY_PARAMETERS>String</SECURITY_PARAMETERS>
</BODY>
</RESOURCE_PROFILE>

View File

@ -4,7 +4,7 @@
<RESOURCE_TYPE value="MetadataFormatDSResourceType"/>
<RESOURCE_KIND value="VocabularyDSResources"/>
<RESOURCE_URI value="String"/>
<DATE_OF_CREATION value="2015-04-08T11:27:16-03:00"/>
<DATE_OF_CREATION value="2015-04-08T11:27:16-03:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
@ -16,7 +16,7 @@
<METADATAFORMAT NameSpace="http://www.cidoc-crm.org/cidoc-crm/" Prefix="oai_cidoc" Schema="http://www.cidoc-crm.org/cidoc-crm/" name="CIDOC"/>
</METADATAFORMATS>
</CONFIGURATION>
<STATUS>
<STATUS>
<LAST_UPDATE value="2017-01-17T12:44:48+02:00"/>
</STATUS>
<SECURITY_PARAMETERS>String</SECURITY_PARAMETERS>

View File

@ -4,7 +4,7 @@
<RESOURCE_TYPE value="RepositoryServiceResourceType"/>
<RESOURCE_KIND value="RepositoryServiceResources"/>
<RESOURCE_URI value=""/>
<DATE_OF_CREATION value="2019-10-22T15:27:44+02:00"/>
<DATE_OF_CREATION value="2019-10-29T18:41:27+01:00"/>
<PROTOCOL/>
</HEADER>
<BODY>
@ -33,9 +33,26 @@
<ADMIN_INFO>julian.richards@york.ac.uk</ADMIN_INFO>
<INTERFACES>
<INTERFACE active="true" compliance="metadata" contentDescription="metadata" id="api_________::ariadne_plus::ads::1" label="dnet:repository (metadata)" removable="false" typology="dnet:repository">
<ACCESS_PROTOCOL splitOnElement="record">ads</ACCESS_PROTOCOL>
<BASE_URL>file:///var/lib/dnet/ariadne/398</BASE_URL>
<INTERFACE_EXTRA_FIELD name="metadata_identifier_path">//*[local-name()='record']/*[namespace-uri()='http://purl.org/dc/elements/1.1/' and local-name()='identifier'][not(contains(text(), ' '))]</INTERFACE_EXTRA_FIELD>
<ACCESS_PROTOCOL splitOnElement="record" suffixToBaseUrl="aaa">ads</ACCESS_PROTOCOL>
<BASE_URL>file:///var/lib/dnet/ariadne/import/ads/398</BASE_URL>
<INTERFACE_EXTRA_FIELD name="last_collection_date">2019-10-23T12:01:42+02:00</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_collection_mdId">b18609ed-f5a7-4402-9d57-f85e04780f20_TURTdG9yZURTUmVzb3VyY2VzL01EU3RvcmVEU1Jlc291cmNlVHlwZQ==</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_collection_total">354801</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_aggregation_date">2019-10-24T09:27:44+02:00</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_aggregation_mdId">31414646-a612-4ca9-9d58-712cf583047b_TURTdG9yZURTUmVzb3VyY2VzL01EU3RvcmVEU1Jlc291cmNlVHlwZQ==</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="metadata_identifier_path">//record[@type='collection']/*[local-name()='identifier'] | //record[@type='record']/*[local-name()='source']</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_aggregation_total">354801</INTERFACE_EXTRA_FIELD>
</INTERFACE>
<INTERFACE active="true" compliance="metadata" contentDescription="metadata" id="api_________::ariadne_plus::ads::sample" label="dnet:repository (metadata)" removable="false" typology="dnet:repository">
<ACCESS_PROTOCOL splitOnElement="record" suffixToBaseUrl="aaa">ads</ACCESS_PROTOCOL>
<BASE_URL>file:///var/lib/dnet/ariadne/test2</BASE_URL>
<INTERFACE_EXTRA_FIELD name="last_collection_date">2019-10-29T17:07:16+01:00</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_collection_mdId">6eb3b104-f374-4e4a-9c92-2cde0192c8a7_TURTdG9yZURTUmVzb3VyY2VzL01EU3RvcmVEU1Jlc291cmNlVHlwZQ==</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_collection_total">54800</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_aggregation_date">2019-10-29T18:41:27+01:00</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_aggregation_mdId">4332773e-b99d-4de8-8c7f-c459129b4207_TURTdG9yZURTUmVzb3VyY2VzL01EU3RvcmVEU1Jlc291cmNlVHlwZQ==</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="metadata_identifier_path">//record[@type='record']/*[local-name()='source']</INTERFACE_EXTRA_FIELD>
<INTERFACE_EXTRA_FIELD name="last_aggregation_total">54800</INTERFACE_EXTRA_FIELD>
</INTERFACE>
</INTERFACES>
<EXTRA_FIELDS>
@ -43,6 +60,14 @@
<key>NamespacePrefix</key>
<value>ads_________</value>
</FIELD>
<FIELD>
<key>dateOfCollection</key>
<value>Fri Sep 20 11:37:39 CEST 2019</value>
</FIELD>
<FIELD>
<key>dateOfValidation</key>
<value>null</value>
</FIELD>
</EXTRA_FIELDS>
<REGISTERED_BY/>
</CONFIGURATION>

View File

@ -1,664 +0,0 @@
<RESOURCE_PROFILE>
<HEADER>
<RESOURCE_IDENTIFIER value="f42b4b91-78d4-4c83-9147-19d4845f79f5_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
<RESOURCE_KIND value="TransformationRuleDSResources"/>
<RESOURCE_URI value=""/>
<DATE_OF_CREATION value="2019-09-22T18:17:03+02:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
<IMPORTED/>
<SCRIPT>
<TITLE>ADS 574 Mapping 2019-09-19</TITLE>
<CODE>
&lt;x3ml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" source_type="xpath" version="1.0" xsi:noNamespaceSchemaLocation="x3ml_v1.4.xsd" editor="3MEditor v3.3"&gt;
&lt;info&gt;
&lt;title&gt;
ARIADNEplus ADS Sites and Monuments mapping (AO-CAT v1.0.2 and simplified subjects/temporal)
&lt;/title&gt;
&lt;general_description/&gt;
&lt;source&gt;
&lt;source_info&gt;
&lt;source_schema type="" version=""/&gt;
&lt;namespaces&gt;
&lt;namespace prefix="ads" uri="http://archaeologydataservice.ac.uk/"/&gt;
&lt;namespace prefix="dcterms" uri="http://purl.org/dc/terms/"/&gt;
&lt;namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/&gt;
&lt;namespace prefix="dc" uri="http://purl.org/dc/elements/1.1/"/&gt;
&lt;/namespaces&gt;
&lt;/source_info&gt;
&lt;source_collection/&gt;
&lt;/source&gt;
&lt;target&gt;
&lt;target_info&gt;
&lt;target_schema schema_file="cidoc_crm_v6.2.1-2018April.rdfs" type="rdfs" version="6.2.1"&gt;CIDOC-CRM&lt;/target_schema&gt;
&lt;namespaces&gt;
&lt;namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/&gt;
&lt;/namespaces&gt;
&lt;/target_info&gt;
&lt;target_info&gt;
&lt;target_schema schema_file="AO-CAT1.0.2___14-07-2019185002___5176.rdfs" type="rdfs" version="1.0.2"&gt;AO-CAT&lt;/target_schema&gt;
&lt;namespaces&gt;
&lt;namespace prefix="aocat" uri="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.0/"/&gt;
&lt;namespace prefix="owl" uri="http://www.w3.org/2002/07/owl#"/&gt;
&lt;namespace prefix="xml" uri="http://www.w3.org/XML/1998/namespace"/&gt;
&lt;namespace prefix="skos" uri="http://www.w3.org/2004/02/skos/core#"/&gt;
&lt;namespace prefix="crmpe" uri="http://parthenos.d4science.org/CRMext/CRMpe/"/&gt;
&lt;namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/&gt;
&lt;/namespaces&gt;
&lt;/target_info&gt;
&lt;target_collection/&gt;
&lt;/target&gt;
&lt;mapping_info&gt;
&lt;mapping_created_by_org/&gt;
&lt;mapping_created_by_person/&gt;
&lt;in_collaboration_with/&gt;
&lt;/mapping_info&gt;
&lt;example_data_info&gt;
&lt;example_data_from/&gt;
&lt;example_data_contact_person/&gt;
&lt;example_data_source_record xml_link="ariadne_testSample___19-09-2019164647___3509.xml"&gt;ariadne_testSample.xml&lt;/example_data_source_record&gt;
&lt;generator_policy_info generator_link="ARIADNEplusGeneratorPolicy_v1.0___09-09-2019114327___2407.xml"&gt;ARIADNEplusGeneratorPolicy_v1.0.xml&lt;/generator_policy_info&gt;
&lt;example_data_target_record rdf_link="Mapping574.ttl"/&gt;
&lt;thesaurus_info/&gt;
&lt;/example_data_info&gt;
&lt;/info&gt;
&lt;namespaces&gt;
&lt;namespace prefix="ariadneplus" uri="https://ariadne-infrastructure.eu/aocat/"/&gt;
&lt;/namespaces&gt;
&lt;mappings&gt;
&lt;mapping&gt;
&lt;domain&gt;
&lt;source_node&gt;//collection&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:Collection&lt;/type&gt;
&lt;instance_generator name="CollectionURI"&gt;
&lt;arg name="term" type="xpath"&gt;meta/dc:identifier/text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="CompositeLabel"&gt;
&lt;arg name="label" type="constant"&gt;Collection &lt;/arg&gt;
&lt;arg name="text" type="xpath"&gt;meta/dc:identifier/text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;additional&gt;
&lt;relationship&gt;aocat:has_ARIADNE_subject&lt;/relationship&gt;
&lt;entity&gt;
&lt;type&gt;aocat:ARIADNEConcept&lt;/type&gt;
&lt;instance_info&gt;
&lt;constant&gt;sites and monuments&lt;/constant&gt;
&lt;/instance_info&gt;
&lt;instance_generator name="ConceptURI"&gt;
&lt;arg name="term" type="constant"&gt;sites_and_monuments&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="prefLabel"&gt;
&lt;arg name="text" type="constant"&gt;sites and monuments&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/additional&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/domain&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:title&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_title&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:title&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:identifier&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_identifier&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:identifier&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:source&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_owner&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:source&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:Agent&lt;/type&gt;
&lt;instance_generator name="AgentURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="SimpleLabel"&gt;
&lt;arg name="label" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:description&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_description&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:description&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:publisher&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_publisher&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:publisher&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:Agent&lt;/type&gt;
&lt;instance_generator name="AgentURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="SimpleLabel"&gt;
&lt;arg name="label" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:creator&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_creator&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:creator&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:Agent&lt;/type&gt;
&lt;instance_generator name="AgentURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="SimpleLabel"&gt;
&lt;arg name="label" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:date&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:was_issued&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:date&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#dateTime&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:format&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_type&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:format&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:ARIADNEConcept&lt;/type&gt;
&lt;instance_generator name="ConceptURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="prefLabel"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:language&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_language&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:language&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;meta/dc:rights&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_access_rights&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;meta/dc:rights&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;records/record&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_part&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;records/record&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:DataResource&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;/mapping&gt;
&lt;mapping&gt;
&lt;domain&gt;
&lt;source_node&gt;//record&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:DataResource&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;label_generator name="CompositeLabel"&gt;
&lt;arg name="label" type="constant"&gt;Record&lt;/arg&gt;
&lt;arg name="text" type="xpath"&gt;dc:title/text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/domain&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:title&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_title&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:title&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:creator&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_creator&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:creator&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:Agent&lt;/type&gt;
&lt;instance_generator name="AgentURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="SimpleLabel"&gt;
&lt;arg name="label" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:subjectPeriod/dc:subject&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_native_subject&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:subjectPeriod/dc:subject&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:ARIADNEConcept&lt;/type&gt;
&lt;instance_generator name="ConceptURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="prefLabel"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:subjectPeriod/dcterms:temporal&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_temporal_coverage&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:subjectPeriod/dcterms:temporal&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;aocat:TemporalRegion&lt;/type&gt;
&lt;instance_generator name="Time-SpanURI"&gt;
&lt;arg name="term" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;label_generator name="SimpleLabel"&gt;
&lt;arg name="label" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/label_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:description&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_description&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:description&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:identifier&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_identifier&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:identifier&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:source&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_landing_page&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:source&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;owl:Thing&lt;/type&gt;
&lt;instance_generator name="URIorUUID"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:language&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_language&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:language&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dcterms:spatial&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;if&gt;
&lt;not&gt;
&lt;if&gt;
&lt;exists&gt;@xsi:type&lt;/exists&gt;
&lt;/if&gt;
&lt;/not&gt;
&lt;/if&gt;
&lt;relationship&gt;aocat:has_spatial_coverage&lt;/relationship&gt;
&lt;entity variable="sr1"&gt;
&lt;type&gt;aocat:SpatialRegion&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;/entity&gt;
&lt;relationship&gt;aocat:has_place_name&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dcterms:spatial&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="Literal"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;arg name="language" type="constant"&gt;en&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dcterms:spatial&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;if&gt;
&lt;equals value="dcterms:Point"&gt;@xsi:type&lt;/equals&gt;
&lt;/if&gt;
&lt;relationship&gt;aocat:has_spatial_coverage&lt;/relationship&gt;
&lt;entity variable="sr1"&gt;
&lt;type&gt;aocat:SpatialRegionPoint&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;/entity&gt;
&lt;relationship&gt;aocat:has_longitude&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dcterms:spatial&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#decimal&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dcterms:spatial&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;if&gt;
&lt;equals value="dcterms:Point"&gt;@xsi:type&lt;/equals&gt;
&lt;/if&gt;
&lt;relationship&gt;aocat:has_spatial_coverage&lt;/relationship&gt;
&lt;entity&gt;
&lt;type&gt;aocat:SpatialRegionPoint&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;/entity&gt;
&lt;relationship&gt;aocat:has_latitude&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dcterms:spatial&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#decimal&lt;/type&gt;
&lt;instance_generator name="UUID"/&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;link&gt;
&lt;path&gt;
&lt;source_relation&gt;
&lt;relation&gt;dc:rights&lt;/relation&gt;
&lt;/source_relation&gt;
&lt;target_relation&gt;
&lt;relationship&gt;aocat:has_access_rights&lt;/relationship&gt;
&lt;/target_relation&gt;
&lt;/path&gt;
&lt;range&gt;
&lt;source_node&gt;dc:rights&lt;/source_node&gt;
&lt;target_node&gt;
&lt;entity&gt;
&lt;type&gt;http://www.w3.org/2001/XMLSchema#string&lt;/type&gt;
&lt;instance_generator name="URIorUUID"&gt;
&lt;arg name="text" type="xpath"&gt;text()&lt;/arg&gt;
&lt;/instance_generator&gt;
&lt;/entity&gt;
&lt;/target_node&gt;
&lt;/range&gt;
&lt;/link&gt;
&lt;/mapping&gt;
&lt;/mappings&gt;
&lt;/x3ml&gt;
</CODE>
</SCRIPT>
</CONFIGURATION>
<STATUS/>
<SECURITY_PARAMETERS/>
</BODY>
</RESOURCE_PROFILE>

View File

@ -4,15 +4,15 @@
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
<RESOURCE_KIND value="TransformationRuleDSResources"/>
<RESOURCE_URI value=""/>
<DATE_OF_CREATION value="2019-09-22T16:12:31+02:00"/>
<DATE_OF_CREATION value="2019-10-29T17:57:54+01:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
<IMPORTED/>
<SCRIPT>
<TITLE>ARIADNE Policy 2019-08-10</TITLE>
<TITLE>ARIADNE Policy ADS</TITLE>
<CODE>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;generator_policy&gt;
&lt;!-- The prefix is a namespace that must be declared in the X3ML definition.
@ -31,7 +31,7 @@
&lt;/generator&gt;
&lt;generator name="ObjectLabel"&gt;
&lt;pattern&gt;Resource {resource} documents {term}&lt;/pattern&gt;
&lt;pattern&gt;Resource {resource} is about {term}&lt;/pattern&gt;
&lt;/generator&gt;
&lt;generator name="IdentifierURI" prefix="ariadneplus"&gt;
@ -57,6 +57,10 @@
&lt;generator name="ConceptURI-2" prefix="ariadneplus"&gt;
&lt;pattern&gt;Concept/{scheme}/{term}&lt;/pattern&gt;
&lt;/generator&gt;
&lt;generator name="LangURI" prefix="lexvo"&gt;
&lt;pattern&gt;{term}&lt;/pattern&gt;
&lt;/generator&gt;
&lt;generator name="OneLevelCustomURI" prefix="ariadneplus"&gt;
&lt;pattern&gt;{level1}/{term}&lt;/pattern&gt;
@ -94,6 +98,7 @@
&lt;/generator_policy&gt;
</CODE>
</SCRIPT>

View File

@ -15,7 +15,6 @@
<PARAM name="collMdstoreId" description="Store for collected records" required="true" type="string"/>
<PARAM name="cleanMdstoreId" description="Store for transformed records" required="true" type="string"/>
<PARAM name="mappingPolicyProfile" description="Mapping policy to apply by X3M" required="false" type="string" />
<PARAM name="mappingProfiles" description="X3M mapping rules" required="true" type="list" />
<PARAM name="passFullRecord" description="True to pass the full record to x3m" required="true" type="boolean" />
<PARAM name="verboseTransformationLogging" description="Enable verbose logging of X3M" required="false" type="boolean"/>
<PARAM name="cleaningRuleId" description="Cleaning rule" required="true" type="string" />
@ -74,7 +73,6 @@
<PARAM name="inputEprParam" value="orig_epr"/>
<PARAM name="outputEprParam" value="trans_epr"/>
<PARAM name="mappingPolicyProfileId" ref="mappingPolicyProfile"/>
<PARAM name="mappingProfileIds" ref="mappingProfiles"/>
<PARAM name="verboseLogging" ref="verboseTransformationLogging"/>
<PARAM name="passFullRecord" ref="passFullRecord"/>
<PARAM name="mappingUrl" ref="mappingUrl"/>
@ -106,14 +104,6 @@
<!-- <ARC to="LOG_REPORT"/> -->
</ARCS>
</NODE>
<!--<NODE name="LOG_REPORT" type="ReportReader">-->
<!--<DESCRIPTION>Store the validation report in the env</DESCRIPTION>-->
<!--<PARAMETERS>-->
<!--</PARAMETERS>-->
<!--<ARCS>-->
<!--<ARC to="UPDATE_INFO"/>-->
<!--</ARCS>-->
<!--</NODE>-->
<NODE name="UPDATE_INFO" type="MDStoreToApiExtraField">
<DESCRIPTION>Update datasouce API extra fields</DESCRIPTION>
<PARAMETERS>

View File

@ -10,8 +10,6 @@
<bean class="eu.dnetlib.rmi.data.ProtocolDescriptor" p:name="ads">
<property name="params">
<list>
<bean class="eu.dnetlib.rmi.data.ProtocolParameter"
p:name="suffixToBaseUrl"/>
<bean class="eu.dnetlib.rmi.data.ProtocolParameter"
p:name="splitOnElement"/>
</list>

View File

@ -1,41 +0,0 @@
package eu.dnetlib.data.collector.plugins.ariadneplus;
import com.google.common.collect.Lists;
import eu.dnetlib.data.collector.plugins.HttpSimpleCollectorPlugin;
import eu.dnetlib.data.collector.plugins.oai.engine.HttpConnector;
import eu.dnetlib.rmi.data.CollectorServiceException;
import eu.dnetlib.rmi.data.InterfaceDescriptor;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class MappingDownloadTest {
private InterfaceDescriptor apiDescriptor;
private HttpSimpleCollectorPlugin plugin;
private HttpConnector connector;
@Before
public void prepare(){
connector = new HttpConnector();
plugin = new HttpSimpleCollectorPlugin();
plugin.setHttpConnector(connector);
apiDescriptor = new InterfaceDescriptor();
}
@Test
public void test() throws CollectorServiceException {
apiDescriptor.setBaseUrl("http://data.d4science.org/em1EemhBdUZ0bjNGTWJNNjlxVDltcm9acDFmMHlBSVVHbWJQNStIS0N6Yz0");
Iterable<String> res = plugin.collect(apiDescriptor, null, null);
Assert.assertTrue(Lists.newArrayList(res).size() == 1);
for(String r : res){
System.out.println(r);
Assert.assertNotNull(r);
}
}
}

View File

@ -2,6 +2,8 @@ package eu.dnetlib.x3m;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import eu.dnetlib.msro.workflows.nodes.transform.ApplyX3Mapping;
import org.apache.commons.io.IOUtils;
@ -13,109 +15,37 @@ import org.dom4j.io.SAXReader;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
/**
* Created by alessia on 13/03/17.
*/
public class ApplyX3MappingTest {
private static final Log log = LogFactory.getLog(ApplyX3MappingTest.class);
private static String basePathProfiles = "/eu/dnetlib/bootstrap/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/";
private String mappingUrl = "https://mapping.d4science.org/3MEditor/Services?id=575&output=text/xml&method=export";
//Parthenos mappings
final String parthenosPolicyPath = "parthenos_policy1.5.xml";
final String mappingAriadnePath = "ariadne_dataset_444_mapping.xml";
final String mappingEhriPath = "ehri_328_mapping.xml";
final String mappingCulturaItaliaPath = "culturaitalia_musei_312_mapping.xml";
//Parthenos records
final String ariadnePath = "/eu/dnetlib/x3m/new-10304736.xml";
final String ehriRecord = "/eu/dnetlib/x3m/ehri_test.xml";
final String ehriRecord2 = "/eu/dnetlib/x3m/EHRI_sample_record_328.xml";
final String[] ariadneFiles =
new String[] { "/eu/dnetlib/x3m/new-10304737.xml", "/eu/dnetlib/x3m/new-10304738.xml", "/eu/dnetlib/x3m/new-10304739.xml",
"/eu/dnetlib/x3m/new-10304740.xml", "/eu/dnetlib/x3m/new-10304741.xml", "/eu/dnetlib/x3m/new-10304742.xml" };
final String culturaItaliaPath = "/eu/dnetlib/x3m/culturaItalia_record.xml";
//Ariadne policy
final String ariadnePolicyPath = "ARIADNE_Policy.xml";
//ADS record
final String adsRecordPath = "/eu/dnetlib/x3m/ads-record.xml";
@Test
public void testAriadne() {
doBasicTest(this.mappingAriadnePath, this.ariadnePath);
doBasicTest(ariadnePolicyPath, adsRecordPath);
}
@Test
public void testAriadneAll() throws IOException {
String m = loadFromTransformationProfile(mappingAriadnePath);
String g = getString(parthenosPolicyPath);
ApplyX3Mapping x3m = new ApplyX3Mapping(new String[]{m}, g, false);
for(String path : ariadneFiles){
String res = x3m.apply(getString(path));
log.debug(res);
}
}
@Test
public void testEhri() throws IOException {
doBasicTest(this.mappingEhriPath, this.ehriRecord);
}
@Test
public void testEhri2(){
doBasicTest(this.mappingEhriPath, this.ehriRecord2);
}
@Test
public void testCulturaItalia() throws IOException {
doBasicTest(this.mappingCulturaItaliaPath, this.culturaItaliaPath);
}
@Test
public void testMetashare(){
doBasicTest("metashare_439_mapping.xml", "/eu/dnetlib/x3m/metashare.xml");
}
@Test
public void testCendariAuthors() {
doBasicTest("parthenos_policy1.5.xml", "cendari_authors_486.xml", "/eu/dnetlib/x3m/cendari_author_ex1.xml");
}
@Test
public void testCendariAuthors2() {
doBasicTest("parthenos_policy1.5.xml", "cendari_authors_486.xml", "/eu/dnetlib/x3m/cendari_author_ex2.xml");
}
@Test
public void testCendariTesti1() {
doBasicTest("parthenos_policy1.5.xml", "cendari_texts_487.xml", "/eu/dnetlib/x3m/cendari_testi1.xml");
}
@Test
public void testCendariManoscritto(){
doBasicTest("cendari_manuscripts_485.xml", "/eu/dnetlib/x3m/cendari_manoscritto.xml");
}
@Test
public void testWp8_ok() {
doBasicTest("parthenos_policy1.5.xml", "parthenos_wp8.xml", "/eu/dnetlib/x3m/wp8.xml");
}
@Test
public void testTopLevel() {
doBasicTest("parthenos_policy1.5.xml", "parthenos_toplevel_mapping.xml", "/eu/dnetlib/x3m/topLevel.xml");
}
public void doBasicTest(String mappingPath, String recordPath){
doBasicTest(parthenosPolicyPath, mappingPath, recordPath);
}
public void doBasicTest(String policyPath, String mappingPath, String recordPath){
String m = loadFromTransformationProfile(mappingPath);
public void doBasicTest(String policyPath, String recordPath){
String g = loadFromTransformationProfile(policyPath);
String r = getString(recordPath);
ApplyX3Mapping x3m = new ApplyX3Mapping(new String[]{m}, g, true);
URL mappingURL = null;
try {
mappingURL = new URL(mappingUrl);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ApplyX3Mapping x3m = new ApplyX3Mapping(mappingURL, g, true);
String res = x3m.apply(r);
System.out.println("res is \n"+res);
}

File diff suppressed because it is too large Load Diff