x3m mapping is now only taken from url; ads policy aligned to aggregator instance; removed wf parameter unused
This commit is contained in:
parent
1dab575b58
commit
b3a8f05c26
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
<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">
|
||||
<info>
|
||||
<title>
|
||||
ARIADNEplus ADS Sites and Monuments mapping (AO-CAT v1.0.2 and simplified subjects/temporal)
|
||||
</title>
|
||||
<general_description/>
|
||||
<source>
|
||||
<source_info>
|
||||
<source_schema type="" version=""/>
|
||||
<namespaces>
|
||||
<namespace prefix="ads" uri="http://archaeologydataservice.ac.uk/"/>
|
||||
<namespace prefix="dcterms" uri="http://purl.org/dc/terms/"/>
|
||||
<namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
|
||||
<namespace prefix="dc" uri="http://purl.org/dc/elements/1.1/"/>
|
||||
</namespaces>
|
||||
</source_info>
|
||||
<source_collection/>
|
||||
</source>
|
||||
<target>
|
||||
<target_info>
|
||||
<target_schema schema_file="cidoc_crm_v6.2.1-2018April.rdfs" type="rdfs" version="6.2.1">CIDOC-CRM</target_schema>
|
||||
<namespaces>
|
||||
<namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
|
||||
</namespaces>
|
||||
</target_info>
|
||||
<target_info>
|
||||
<target_schema schema_file="AO-CAT1.0.2___14-07-2019185002___5176.rdfs" type="rdfs" version="1.0.2">AO-CAT</target_schema>
|
||||
<namespaces>
|
||||
<namespace prefix="aocat" uri="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.0/"/>
|
||||
<namespace prefix="owl" uri="http://www.w3.org/2002/07/owl#"/>
|
||||
<namespace prefix="xml" uri="http://www.w3.org/XML/1998/namespace"/>
|
||||
<namespace prefix="skos" uri="http://www.w3.org/2004/02/skos/core#"/>
|
||||
<namespace prefix="crmpe" uri="http://parthenos.d4science.org/CRMext/CRMpe/"/>
|
||||
<namespace prefix="crm" uri="http://www.cidoc-crm.org/cidoc-crm/"/>
|
||||
</namespaces>
|
||||
</target_info>
|
||||
<target_collection/>
|
||||
</target>
|
||||
<mapping_info>
|
||||
<mapping_created_by_org/>
|
||||
<mapping_created_by_person/>
|
||||
<in_collaboration_with/>
|
||||
</mapping_info>
|
||||
<example_data_info>
|
||||
<example_data_from/>
|
||||
<example_data_contact_person/>
|
||||
<example_data_source_record xml_link="ariadne_testSample___19-09-2019164647___3509.xml">ariadne_testSample.xml</example_data_source_record>
|
||||
<generator_policy_info generator_link="ARIADNEplusGeneratorPolicy_v1.0___09-09-2019114327___2407.xml">ARIADNEplusGeneratorPolicy_v1.0.xml</generator_policy_info>
|
||||
<example_data_target_record rdf_link="Mapping574.ttl"/>
|
||||
<thesaurus_info/>
|
||||
</example_data_info>
|
||||
</info>
|
||||
<namespaces>
|
||||
<namespace prefix="ariadneplus" uri="https://ariadne-infrastructure.eu/aocat/"/>
|
||||
</namespaces>
|
||||
<mappings>
|
||||
<mapping>
|
||||
<domain>
|
||||
<source_node>//collection</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:Collection</type>
|
||||
<instance_generator name="CollectionURI">
|
||||
<arg name="term" type="xpath">meta/dc:identifier/text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="CompositeLabel">
|
||||
<arg name="label" type="constant">Collection </arg>
|
||||
<arg name="text" type="xpath">meta/dc:identifier/text()</arg>
|
||||
</label_generator>
|
||||
<additional>
|
||||
<relationship>aocat:has_ARIADNE_subject</relationship>
|
||||
<entity>
|
||||
<type>aocat:ARIADNEConcept</type>
|
||||
<instance_info>
|
||||
<constant>sites and monuments</constant>
|
||||
</instance_info>
|
||||
<instance_generator name="ConceptURI">
|
||||
<arg name="term" type="constant">sites_and_monuments</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="prefLabel">
|
||||
<arg name="text" type="constant">sites and monuments</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</additional>
|
||||
</entity>
|
||||
</target_node>
|
||||
</domain>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:title</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_title</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:title</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:identifier</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_identifier</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:identifier</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:source</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_owner</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:source</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:Agent</type>
|
||||
<instance_generator name="AgentURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="SimpleLabel">
|
||||
<arg name="label" type="xpath">text()</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:description</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_description</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:description</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:publisher</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_publisher</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:publisher</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:Agent</type>
|
||||
<instance_generator name="AgentURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="SimpleLabel">
|
||||
<arg name="label" type="xpath">text()</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:creator</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_creator</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:creator</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:Agent</type>
|
||||
<instance_generator name="AgentURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="SimpleLabel">
|
||||
<arg name="label" type="xpath">text()</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:date</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:was_issued</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:date</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#dateTime</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:format</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_type</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:format</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:ARIADNEConcept</type>
|
||||
<instance_generator name="ConceptURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="prefLabel">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:language</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_language</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:language</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>meta/dc:rights</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_access_rights</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>meta/dc:rights</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>records/record</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_part</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>records/record</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:DataResource</type>
|
||||
<instance_generator name="UUID"/>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<domain>
|
||||
<source_node>//record</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:DataResource</type>
|
||||
<instance_generator name="UUID"/>
|
||||
<label_generator name="CompositeLabel">
|
||||
<arg name="label" type="constant">Record</arg>
|
||||
<arg name="text" type="xpath">dc:title/text()</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</domain>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:title</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_title</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:title</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:creator</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_creator</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:creator</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:Agent</type>
|
||||
<instance_generator name="AgentURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="SimpleLabel">
|
||||
<arg name="label" type="xpath">text()</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:subjectPeriod/dc:subject</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_native_subject</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:subjectPeriod/dc:subject</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:ARIADNEConcept</type>
|
||||
<instance_generator name="ConceptURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="prefLabel">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:subjectPeriod/dcterms:temporal</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_temporal_coverage</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:subjectPeriod/dcterms:temporal</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>aocat:TemporalRegion</type>
|
||||
<instance_generator name="Time-SpanURI">
|
||||
<arg name="term" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
<label_generator name="SimpleLabel">
|
||||
<arg name="label" type="xpath">text()</arg>
|
||||
</label_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:description</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_description</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:description</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:identifier</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_identifier</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:identifier</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:source</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_landing_page</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:source</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>owl:Thing</type>
|
||||
<instance_generator name="URIorUUID">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:language</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_language</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:language</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dcterms:spatial</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<if>
|
||||
<not>
|
||||
<if>
|
||||
<exists>@xsi:type</exists>
|
||||
</if>
|
||||
</not>
|
||||
</if>
|
||||
<relationship>aocat:has_spatial_coverage</relationship>
|
||||
<entity variable="sr1">
|
||||
<type>aocat:SpatialRegion</type>
|
||||
<instance_generator name="UUID"/>
|
||||
</entity>
|
||||
<relationship>aocat:has_place_name</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dcterms:spatial</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="Literal">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
<arg name="language" type="constant">en</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dcterms:spatial</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<if>
|
||||
<equals value="dcterms:Point">@xsi:type</equals>
|
||||
</if>
|
||||
<relationship>aocat:has_spatial_coverage</relationship>
|
||||
<entity variable="sr1">
|
||||
<type>aocat:SpatialRegionPoint</type>
|
||||
<instance_generator name="UUID"/>
|
||||
</entity>
|
||||
<relationship>aocat:has_longitude</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dcterms:spatial</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#decimal</type>
|
||||
<instance_generator name="UUID"/>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dcterms:spatial</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<if>
|
||||
<equals value="dcterms:Point">@xsi:type</equals>
|
||||
</if>
|
||||
<relationship>aocat:has_spatial_coverage</relationship>
|
||||
<entity>
|
||||
<type>aocat:SpatialRegionPoint</type>
|
||||
<instance_generator name="UUID"/>
|
||||
</entity>
|
||||
<relationship>aocat:has_latitude</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dcterms:spatial</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#decimal</type>
|
||||
<instance_generator name="UUID"/>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
<link>
|
||||
<path>
|
||||
<source_relation>
|
||||
<relation>dc:rights</relation>
|
||||
</source_relation>
|
||||
<target_relation>
|
||||
<relationship>aocat:has_access_rights</relationship>
|
||||
</target_relation>
|
||||
</path>
|
||||
<range>
|
||||
<source_node>dc:rights</source_node>
|
||||
<target_node>
|
||||
<entity>
|
||||
<type>http://www.w3.org/2001/XMLSchema#string</type>
|
||||
<instance_generator name="URIorUUID">
|
||||
<arg name="text" type="xpath">text()</arg>
|
||||
</instance_generator>
|
||||
</entity>
|
||||
</target_node>
|
||||
</range>
|
||||
</link>
|
||||
</mapping>
|
||||
</mappings>
|
||||
</x3ml>
|
||||
|
||||
|
||||
</CODE>
|
||||
</SCRIPT>
|
||||
</CONFIGURATION>
|
||||
<STATUS/>
|
||||
<SECURITY_PARAMETERS/>
|
||||
</BODY>
|
||||
</RESOURCE_PROFILE>
|
|
@ -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>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<generator_policy>
|
||||
|
||||
<!-- The prefix is a namespace that must be declared in the X3ML definition.
|
||||
|
@ -31,7 +31,7 @@
|
|||
</generator>
|
||||
|
||||
<generator name="ObjectLabel">
|
||||
<pattern>Resource {resource} documents {term}</pattern>
|
||||
<pattern>Resource {resource} is about {term}</pattern>
|
||||
</generator>
|
||||
|
||||
<generator name="IdentifierURI" prefix="ariadneplus">
|
||||
|
@ -57,6 +57,10 @@
|
|||
<generator name="ConceptURI-2" prefix="ariadneplus">
|
||||
<pattern>Concept/{scheme}/{term}</pattern>
|
||||
</generator>
|
||||
|
||||
<generator name="LangURI" prefix="lexvo">
|
||||
<pattern>{term}</pattern>
|
||||
</generator>
|
||||
|
||||
<generator name="OneLevelCustomURI" prefix="ariadneplus">
|
||||
<pattern>{level1}/{term}</pattern>
|
||||
|
@ -94,6 +98,7 @@
|
|||
|
||||
</generator_policy>
|
||||
|
||||
|
||||
|
||||
</CODE>
|
||||
</SCRIPT>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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
Loading…
Reference in New Issue