new module for graphdb publishing
This commit is contained in:
parent
a50520525f
commit
2f5fb6fcb5
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"type_source": "SVN",
|
||||
"goal": "package -U source:jar",
|
||||
"url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet50/modules/dnet-ariadneplus-graphdb-publisher/trunk/",
|
||||
"deploy_repository": "dnet5-snapshots",
|
||||
"version": "5",
|
||||
"mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it, enrico.ottonello@isti.cnr.it",
|
||||
"deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-snapshots",
|
||||
"name": "dnet-ariadneplus-graphdb-publisher"
|
||||
}
|
|
@ -0,0 +1,251 @@
|
|||
11-12-2019 16:15:02.222 [main] INFO e.d.a.AriadnePlusPublisherApplication.logStarting - Starting AriadnePlusPublisherApplication on mb-ottonello.isti.cnr.it with PID 1321 (/Users/enrico.ottonello/develop/AriadnePlus/dnet-ariadneplus-graphdb-publisher/target/classes started by enrico.ottonello in /Users/enrico.ottonello/develop/AriadnePlus/dnet-ariadneplus-graphdb-publisher)
|
||||
11-12-2019 16:15:02.226 [main] DEBUG e.d.a.AriadnePlusPublisherApplication.logStarting - Running with Spring Boot v1.5.6.RELEASE, Spring v4.3.10.RELEASE
|
||||
11-12-2019 16:15:02.226 [main] INFO e.d.a.AriadnePlusPublisherApplication.logStartupProfileInfo - No active profile set, falling back to default profiles: default
|
||||
11-12-2019 16:15:02.284 [main] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext.prepareRefresh - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7fbc4db7: startup date [Wed Dec 11 16:15:02 CET 2019]; root of context hierarchy
|
||||
11-12-2019 16:15:03.761 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer.initialize - Tomcat initialized with port(s): 8281 (http)
|
||||
11-12-2019 16:15:03.779 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
11-12-2019 16:15:03.784 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet Engine: Apache Tomcat/8.5.16
|
||||
11-12-2019 16:15:03.899 [localhost-startStop-1] INFO o.a.c.c.C.[.[.[/ariadneplus].log - Initializing Spring embedded WebApplicationContext
|
||||
11-12-2019 16:15:03.900 [localhost-startStop-1] INFO o.s.web.context.ContextLoader.prepareEmbeddedWebApplicationContext - Root WebApplicationContext: initialization completed in 1616 ms
|
||||
11-12-2019 16:15:04.073 [localhost-startStop-1] INFO o.s.b.w.s.ServletRegistrationBean.onStartup - Mapping servlet: 'dispatcherServlet' to [/]
|
||||
11-12-2019 16:15:04.078 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'characterEncodingFilter' to: [/*]
|
||||
11-12-2019 16:15:04.079 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
|
||||
11-12-2019 16:15:04.080 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'httpPutFormContentFilter' to: [/*]
|
||||
11-12-2019 16:15:04.080 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'requestContextFilter' to: [/*]
|
||||
11-12-2019 16:15:05.362 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter.initControllerAdviceCache - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7fbc4db7: startup date [Wed Dec 11 16:15:02 CET 2019]; root of context hierarchy
|
||||
11-12-2019 16:15:05.465 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/graphdb/subject],methods=[GET],produces=[application/rdf+xml || application/xml]}" onto public void eu.dnetlib.ariadneplus.graphdb.GraphDBReadAPI.getSubject(java.lang.String,java.lang.String,java.lang.String,java.io.OutputStream) throws java.io.IOException,freemarker.template.TemplateException,eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:15:05.467 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/graphdb/apiSubjectsWithType],methods=[GET],produces=[application/json]}" onto public java.util.List<java.lang.String> eu.dnetlib.ariadneplus.graphdb.GraphDBReadAPI.getSubjectsForApiWithType(java.lang.String,java.lang.String,java.lang.String,int,int)
|
||||
11-12-2019 16:15:05.468 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/graphdb/apiSubjects],methods=[GET],produces=[application/json]}" onto public java.util.List<java.lang.String> eu.dnetlib.ariadneplus.graphdb.GraphDBReadAPI.getSubjectsForApi(java.lang.String,int,int)
|
||||
11-12-2019 16:15:05.469 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/version],methods=[GET]}" onto public java.lang.String eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherController.version() throws eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:15:05.470 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/publish],methods=[POST]}" onto public void eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherController.publish(java.lang.String,java.lang.String) throws eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:15:05.470 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/unpublish],methods=[GET]}" onto public void eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherController.unpublish(java.lang.String,java.lang.String) throws eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:15:05.474 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
|
||||
11-12-2019 16:15:05.475 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
|
||||
11-12-2019 16:15:05.523 [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping.registerHandler - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
||||
11-12-2019 16:15:05.524 [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping.registerHandler - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
||||
11-12-2019 16:15:05.580 [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping.registerHandler - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
||||
11-12-2019 16:15:05.869 [main] INFO o.s.j.e.a.AnnotationMBeanExporter.afterSingletonsInstantiated - Registering beans for JMX exposure on startup
|
||||
11-12-2019 16:15:05.940 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer.start - Tomcat started on port(s): 8281 (http)
|
||||
11-12-2019 16:15:05.946 [main] INFO e.d.a.AriadnePlusPublisherApplication.logStarted - Started AriadnePlusPublisherApplication in 4.468 seconds (JVM running for 8.818)
|
||||
11-12-2019 16:15:41.184 [http-nio-8281-exec-2] INFO o.a.c.c.C.[.[.[/ariadneplus].log - Initializing Spring FrameworkServlet 'dispatcherServlet'
|
||||
11-12-2019 16:15:41.184 [http-nio-8281-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - FrameworkServlet 'dispatcherServlet': initialization started
|
||||
11-12-2019 16:15:41.212 [http-nio-8281-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - FrameworkServlet 'dispatcherServlet': initialization completed in 28 ms
|
||||
11-12-2019 16:15:41.253 [http-nio-8281-exec-1] DEBUG e.d.a.p.AriadnePlusPublisherHelper.publishGraphDB - Publishing on graphdb
|
||||
11-12-2019 16:15:41.254 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClientFactory.getGraphDBClient - Creating GraphDBClient for http://localhost:7200/
|
||||
11-12-2019 16:15:41.256 [http-nio-8281-exec-2] DEBUG e.d.a.p.AriadnePlusPublisherHelper.publishGraphDB - Publishing on graphdb
|
||||
11-12-2019 16:15:41.256 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClientFactory.getGraphDBClient - Creating GraphDBClient for http://localhost:7200/
|
||||
11-12-2019 16:15:41.323 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - init connection on http://localhost:7200/
|
||||
11-12-2019 16:15:41.323 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - init connection on http://localhost:7200/
|
||||
11-12-2019 16:15:41.339 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager init
|
||||
11-12-2019 16:15:41.340 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager init
|
||||
11-12-2019 16:15:41.788 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - connection established
|
||||
11-12-2019 16:15:41.792 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - connection established
|
||||
11-12-2019 16:15:41.803 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - Trying to open the database model http://localhost:7200/api_________::ariadne_plus::ads::1/ads_________::aaa81a6d56f3141c7af0791c31bc7f73
|
||||
11-12-2019 16:15:41.808 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.getRDFBlock - ads_________::aaa81a6d56f3141c7af0791c31bc7f73
|
||||
11-12-2019 16:15:41.804 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - Trying to open the database model http://localhost:7200/api_________::ariadne_plus::ads::1/ads_________::aaa81a6d56f3141c7af0791c31bc7f73
|
||||
11-12-2019 16:15:41.815 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.getRDFBlock -
|
||||
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:aocat="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/"
|
||||
xmlns:ariadneplus="https://ariadne-infrastructure.eu/aocat/"
|
||||
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/"
|
||||
xmlns:crmpe="http://parthenos.d4science.org/CRMext/CRMpe.rdfs/"
|
||||
xmlns:lexvo="http://lexvo.org/id/iso639-2/"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
|
||||
xmlns:oai="http://www.openarchives.org/OAI/2.0/">
|
||||
<rdf:Description rdf:about="http://lexvo.org/id/iso639-2/eng">
|
||||
<skos:prefLabel xml:lang="en">eng</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Collection/1000398">
|
||||
<aocat:has_access_policy rdf:resource="http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess"/>
|
||||
<aocat:has_ARIADNE_subject rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/AO_Categories/sites%20and%20monuments"/>
|
||||
<aocat:has_owner rdf:resource="https://ariadne-infrastructure.eu/aocat/Agent/Historic%20England"/>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection"/>
|
||||
<aocat:has_creator rdf:resource="https://ariadne-infrastructure.eu/aocat/Agent/Historic%20England"/>
|
||||
<aocat:has_publisher rdf:resource="https://ariadne-infrastructure.eu/aocat/Agent/Archaeology%20Data%20Service"/>
|
||||
<rdfs:label>Collection 1000398</rdfs:label>
|
||||
<aocat:has_type rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/AO_Categories/Dataset%20Collection"/>
|
||||
<aocat:was_created_on>15 Sep 2004</aocat:was_created_on>
|
||||
<aocat:was_issued>15 Sep 2004</aocat:was_issued>
|
||||
<aocat:has_description xml:lang="en">The Historic England National Record of the Historic Environment (NRHE) consists of core elements of the record of England's archaeological and architectural sites held by the NRHE. It encompasses the historic environment in its widest sense and includes archaeological, architectural and historical sites from earliest times to the present day, covering England and its territorial waters (the 12 mile limit). Each record is linked to its corresponding entry in Historic England's Pastscape web site.</aocat:has_description>
|
||||
<aocat:has_title xml:lang="en">Historic England National Record of the Historic Environment (NRHE)</aocat:has_title>
|
||||
<aocat:has_original_id>1000398</aocat:has_original_id>
|
||||
<aocat:has_language rdf:resource="http://lexvo.org/id/iso639-2/eng"/>
|
||||
<aocat:was_modified>15 Sep 2004</aocat:was_modified>
|
||||
<aocat:has_access_rights>http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess</aocat:has_access_rights>
|
||||
<aocat:has_responsible rdf:resource="https://ariadne-infrastructure.eu/aocat/Agent/Historic%20England"/>
|
||||
<aocat:has_contributor rdf:resource="https://ariadne-infrastructure.eu/aocat/Agent/Archaeology%20Data%20Service"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess">
|
||||
<rdfs:label>http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess</rdfs:label>
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Agent/Archaeology%20Data%20Service">
|
||||
<aocat:has_name xml:lang="en">Archaeology Data Service</aocat:has_name>
|
||||
<rdfs:label>Archaeology Data Service</rdfs:label>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Agent"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Concept/AO_Categories/sites%20and%20monuments">
|
||||
<skos:prefLabel xml:lang="en">sites and monuments</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Concept/AO_Categories/Dataset%20Collection">
|
||||
<skos:prefLabel xml:lang="en">Dataset Collection</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Agent/Historic%20England">
|
||||
<aocat:has_name xml:lang="en">Historic England</aocat:has_name>
|
||||
<rdfs:label>Historic England</rdfs:label>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Agent"/>
|
||||
</rdf:Description>
|
||||
</rdf:RDF>
|
||||
|
||||
|
||||
11-12-2019 16:15:41.893 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - statement added
|
||||
11-12-2019 16:15:41.895 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager shutDown
|
||||
11-12-2019 16:15:41.912 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.getRDFBlock - ads_________::9a7a2fa70c5b1ff0c4237d7af88933d9
|
||||
11-12-2019 16:15:41.920 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.getRDFBlock -
|
||||
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:aocat="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/"
|
||||
xmlns:ariadneplus="https://ariadne-infrastructure.eu/aocat/"
|
||||
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/"
|
||||
xmlns:crmpe="http://parthenos.d4science.org/CRMext/CRMpe.rdfs/"
|
||||
xmlns:lexvo="http://lexvo.org/id/iso639-2/"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
|
||||
xmlns:oai="http://www.openarchives.org/OAI/2.0/">
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Place/3C18B83B-E1C4-31C0-9D3A-4166E4BE76C6">
|
||||
<aocat:has_latitude>55.945225</aocat:has_latitude>
|
||||
<aocat:has_longitude>-2.758696</aocat:has_longitude>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Spatial_Region_Point"/>
|
||||
<aocat:has_place_name xml:lang="en">ALWINTON, ALNWICK, NORTHUMBERLAND, ENGLAND</aocat:has_place_name>
|
||||
<rdfs:label>Spatial region of object https://archaeologydataservice.ac.uk/archsearch/record?titleId=967971</rdfs:label>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Spatial_Region"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Concept/ADS/HOUSE">
|
||||
<skos:prefLabel xml:lang="en">HOUSE</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://lexvo.org/id/iso639-2/eng">
|
||||
<skos:prefLabel xml:lang="en">eng</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Collection/1000398">
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Collection"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Concept/ADS/PALAEOLITHIC">
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
<skos:prefLabel xml:lang="en">PALAEOLITHIC</skos:prefLabel>
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess">
|
||||
<rdfs:label>http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess</rdfs:label>
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://archaeologydataservice.ac.uk/archsearch/record?titleId=967971">
|
||||
<rdfs:label>https://archaeologydataservice.ac.uk/archsearch/record?titleId=967971</rdfs:label>
|
||||
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="urn:uuid:50327435-0102-4437-b187-24ddd4f60dfc">
|
||||
<aocat:has_native_period rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/ADS/PALAEOLITHIC"/>
|
||||
<rdfs:label>PALAEOLITHIC</rdfs:label>
|
||||
<aocat:has_period rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/ADS/PALAEOLITHIC"/>
|
||||
<rdfs:label>Temporal region PALAEOLITHIC</rdfs:label>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Temporal_Region"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Concept/AO_Categories/provided%20record">
|
||||
<skos:prefLabel xml:lang="en">provided record</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Concept/ADS/CROPMARK">
|
||||
<skos:prefLabel xml:lang="en">CROPMARK</skos:prefLabel>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Concept"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Agent/Historic%20England">
|
||||
<aocat:has_name xml:lang="en">Historic England</aocat:has_name>
|
||||
<rdfs:label>Historic England</rdfs:label>
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Agent"/>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="https://ariadne-infrastructure.eu/aocat/Resource/3C18B83B-E1C4-31C0-9D3A-4166E4BE76C6">
|
||||
<rdf:type rdf:resource="https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Individual_Data_Resource"/>
|
||||
<aocat:has_landing_page rdf:resource="https://archaeologydataservice.ac.uk/archsearch/record?titleId=967971"/>
|
||||
<aocat:has_description xml:lang="en">Part of a cropmark with internal markings seen on air photograph. Field investigation in 1957 found the marks to be due to natural undulations and vegetational changes, and no traces of antiquity were observed.</aocat:has_description>
|
||||
<aocat:has_identifier>NMR_NATINV-3</aocat:has_identifier>
|
||||
<aocat:has_access_policy rdf:resource="http://archaeologydataservice.ac.uk/advice/termsOfUseAndAccess"/>
|
||||
<aocat:has_language rdf:resource="http://lexvo.org/id/iso639-2/eng"/>
|
||||
<aocat:has_type rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/AO_Categories/provided%20record"/>
|
||||
<aocat:has_temporal_coverage rdf:resource="urn:uuid:50327435-0102-4437-b187-24ddd4f60dfc"/>
|
||||
<aocat:has_original_id>967971</aocat:has_original_id>
|
||||
<aocat:has_creator rdf:resource="https://ariadne-infrastructure.eu/aocat/Agent/Historic%20England"/>
|
||||
<aocat:has_title xml:lang="en">Part of a cropmark with...</aocat:has_title>
|
||||
<aocat:is_part_of rdf:resource="https://ariadne-infrastructure.eu/aocat/Collection/1000398"/>
|
||||
<aocat:has_native_subject rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/ADS/HOUSE"/>
|
||||
<rdfs:label>Record Part of a cropmark with...</rdfs:label>
|
||||
<aocat:has_spatial_coverage rdf:resource="https://ariadne-infrastructure.eu/aocat/Place/3C18B83B-E1C4-31C0-9D3A-4166E4BE76C6"/>
|
||||
<aocat:has_native_subject rdf:resource="https://ariadne-infrastructure.eu/aocat/Concept/ADS/CROPMARK"/>
|
||||
<aocat:has_identifier>Depositor ID: NT 70 NE 1</aocat:has_identifier>
|
||||
</rdf:Description>
|
||||
</rdf:RDF>
|
||||
|
||||
|
||||
11-12-2019 16:15:41.954 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - statement added
|
||||
11-12-2019 16:15:41.955 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager shutDown
|
||||
11-12-2019 16:24:06.285 [Thread-5] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext.doClose - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7fbc4db7: startup date [Wed Dec 11 16:15:02 CET 2019]; root of context hierarchy
|
||||
11-12-2019 16:24:06.289 [Thread-5] INFO o.s.j.e.a.AnnotationMBeanExporter.destroy - Unregistering JMX-exposed beans on shutdown
|
||||
11-12-2019 16:24:14.695 [main] INFO e.d.a.AriadnePlusPublisherApplication.logStarting - Starting AriadnePlusPublisherApplication on mb-ottonello.isti.cnr.it with PID 1350 (/Users/enrico.ottonello/develop/AriadnePlus/dnet-ariadneplus-graphdb-publisher/target/classes started by enrico.ottonello in /Users/enrico.ottonello/develop/AriadnePlus/dnet-ariadneplus-graphdb-publisher)
|
||||
11-12-2019 16:24:14.702 [main] DEBUG e.d.a.AriadnePlusPublisherApplication.logStarting - Running with Spring Boot v1.5.6.RELEASE, Spring v4.3.10.RELEASE
|
||||
11-12-2019 16:24:14.703 [main] INFO e.d.a.AriadnePlusPublisherApplication.logStartupProfileInfo - No active profile set, falling back to default profiles: default
|
||||
11-12-2019 16:24:14.758 [main] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext.prepareRefresh - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@699111f0: startup date [Wed Dec 11 16:24:14 CET 2019]; root of context hierarchy
|
||||
11-12-2019 16:24:16.305 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer.initialize - Tomcat initialized with port(s): 8281 (http)
|
||||
11-12-2019 16:24:16.323 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
11-12-2019 16:24:16.331 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet Engine: Apache Tomcat/8.5.16
|
||||
11-12-2019 16:24:16.433 [localhost-startStop-1] INFO o.a.c.c.C.[.[.[/ariadneplus].log - Initializing Spring embedded WebApplicationContext
|
||||
11-12-2019 16:24:16.435 [localhost-startStop-1] INFO o.s.web.context.ContextLoader.prepareEmbeddedWebApplicationContext - Root WebApplicationContext: initialization completed in 1677 ms
|
||||
11-12-2019 16:24:16.659 [localhost-startStop-1] INFO o.s.b.w.s.ServletRegistrationBean.onStartup - Mapping servlet: 'dispatcherServlet' to [/]
|
||||
11-12-2019 16:24:16.665 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'characterEncodingFilter' to: [/*]
|
||||
11-12-2019 16:24:16.666 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
|
||||
11-12-2019 16:24:16.667 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'httpPutFormContentFilter' to: [/*]
|
||||
11-12-2019 16:24:16.667 [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean.configure - Mapping filter: 'requestContextFilter' to: [/*]
|
||||
11-12-2019 16:24:18.001 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter.initControllerAdviceCache - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@699111f0: startup date [Wed Dec 11 16:24:14 CET 2019]; root of context hierarchy
|
||||
11-12-2019 16:24:18.134 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/graphdb/apiSubjectsWithType],methods=[GET],produces=[application/json]}" onto public java.util.List<java.lang.String> eu.dnetlib.ariadneplus.graphdb.GraphDBReadAPI.getSubjectsForApiWithType(java.lang.String,java.lang.String,java.lang.String,int,int)
|
||||
11-12-2019 16:24:18.136 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/graphdb/apiSubjects],methods=[GET],produces=[application/json]}" onto public java.util.List<java.lang.String> eu.dnetlib.ariadneplus.graphdb.GraphDBReadAPI.getSubjectsForApi(java.lang.String,int,int)
|
||||
11-12-2019 16:24:18.141 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/graphdb/subject],methods=[GET],produces=[application/rdf+xml || application/xml]}" onto public void eu.dnetlib.ariadneplus.graphdb.GraphDBReadAPI.getSubject(java.lang.String,java.lang.String,java.lang.String,java.io.OutputStream) throws java.io.IOException,freemarker.template.TemplateException,eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:24:18.143 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/version],methods=[GET]}" onto public java.lang.String eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherController.version() throws eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:24:18.144 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/unpublish],methods=[GET]}" onto public void eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherController.unpublish(java.lang.String,java.lang.String) throws eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:24:18.145 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/publish],methods=[POST]}" onto public void eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherController.publish(java.lang.String,java.lang.String) throws eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException
|
||||
11-12-2019 16:24:18.151 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
|
||||
11-12-2019 16:24:18.152 [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping.register - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
|
||||
11-12-2019 16:24:18.232 [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping.registerHandler - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
||||
11-12-2019 16:24:18.233 [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping.registerHandler - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
||||
11-12-2019 16:24:18.311 [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping.registerHandler - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
||||
11-12-2019 16:24:18.659 [main] INFO o.s.j.e.a.AnnotationMBeanExporter.afterSingletonsInstantiated - Registering beans for JMX exposure on startup
|
||||
11-12-2019 16:24:18.760 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer.start - Tomcat started on port(s): 8281 (http)
|
||||
11-12-2019 16:24:18.767 [main] INFO e.d.a.AriadnePlusPublisherApplication.logStarted - Started AriadnePlusPublisherApplication in 4.563 seconds (JVM running for 9.062)
|
||||
11-12-2019 16:24:21.228 [http-nio-8281-exec-1] INFO o.a.c.c.C.[.[.[/ariadneplus].log - Initializing Spring FrameworkServlet 'dispatcherServlet'
|
||||
11-12-2019 16:24:21.229 [http-nio-8281-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - FrameworkServlet 'dispatcherServlet': initialization started
|
||||
11-12-2019 16:24:21.265 [http-nio-8281-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - FrameworkServlet 'dispatcherServlet': initialization completed in 36 ms
|
||||
11-12-2019 16:24:21.317 [http-nio-8281-exec-2] DEBUG e.d.a.p.AriadnePlusPublisherHelper.publishGraphDB - Publishing on graphdb
|
||||
11-12-2019 16:24:21.318 [http-nio-8281-exec-1] DEBUG e.d.a.p.AriadnePlusPublisherHelper.publishGraphDB - Publishing on graphdb
|
||||
11-12-2019 16:24:21.319 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClientFactory.getGraphDBClient - Creating GraphDBClient for http://localhost:7200/
|
||||
11-12-2019 16:24:21.320 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClientFactory.getGraphDBClient - Creating GraphDBClient for http://localhost:7200/
|
||||
11-12-2019 16:24:21.396 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - init connection on http://localhost:7200/
|
||||
11-12-2019 16:24:21.396 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - init connection on http://localhost:7200/
|
||||
11-12-2019 16:24:21.410 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager init
|
||||
11-12-2019 16:24:21.410 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager init
|
||||
11-12-2019 16:24:21.785 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - connection established
|
||||
11-12-2019 16:24:21.785 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - connection established
|
||||
11-12-2019 16:24:21.802 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - Trying to adding record with baseUri http://localhost:7200/api_________::ariadne_plus::ads::1/ads_________::aaa81a6d56f3141c7af0791c31bc7f73 into context api_________::ariadne_plus::ads::1
|
||||
11-12-2019 16:24:21.803 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - Trying to adding record with baseUri http://localhost:7200/api_________::ariadne_plus::ads::1/ads_________::aaa81a6d56f3141c7af0791c31bc7f73 into context api_________::ariadne_plus::ads::1
|
||||
11-12-2019 16:24:21.820 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.getRDFBlock - ads_________::9a7a2fa70c5b1ff0c4237d7af88933d9
|
||||
11-12-2019 16:24:21.833 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.getRDFBlock - ads_________::aaa81a6d56f3141c7af0791c31bc7f73
|
||||
11-12-2019 16:24:21.911 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - statement added
|
||||
11-12-2019 16:24:21.916 [http-nio-8281-exec-2] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager shutDown
|
||||
11-12-2019 16:24:21.932 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - statement added
|
||||
11-12-2019 16:24:21.938 [http-nio-8281-exec-1] DEBUG e.d.a.graphdb.GraphDBClient.feed - manager shutDown
|
||||
11-12-2019 17:11:27.595 [Thread-5] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext.doClose - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@699111f0: startup date [Wed Dec 11 16:24:14 CET 2019]; root of context hierarchy
|
||||
11-12-2019 17:11:27.599 [Thread-5] INFO o.s.j.e.a.AnnotationMBeanExporter.destroy - Unregistering JMX-exposed beans on shutdown
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.6.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>dnet-ariadneplus-graphdb-publisher</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<scm>
|
||||
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet50/modules/dnet-ariadneplus-graphdb-publisher/trunk</developerConnection>
|
||||
<url>https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/dnet-ariadneplus-graphdb-publisher</url>
|
||||
</scm>
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
<url>https://jenkins-dnet.d4science.org/view/DNet50/job/DSL50_dnet-ariadneplus-graphdb-publisher/</url>
|
||||
</ciManagement>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>dnet5-releases</id>
|
||||
<name>D-Net 5 Releases</name>
|
||||
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-releases</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<!-- Inherit defaults from Spring Boot -->
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>dnet-deps</id>
|
||||
<name>dnet-dependencies</name>
|
||||
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet-deps</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dnet5-releases</id>
|
||||
<name>D-Net 5 Releases</name>
|
||||
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-releases</url>
|
||||
<layout>default</layout>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dnet5-snapshots</id>
|
||||
<name>D-Net 5 Snapshots</name>
|
||||
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-snapshots</url>
|
||||
<layout>default</layout>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.saxon</groupId>
|
||||
<artifactId>Saxon-HE</artifactId>
|
||||
<version>9.5.1-5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>23.3-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>2.3.27-incubating</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ontotext.graphdb</groupId>
|
||||
<artifactId>graphdb-free-runtime</artifactId>
|
||||
<version>9.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<executable>true</executable>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>java8-doclint-disabled</id>
|
||||
<activation>
|
||||
<jdk>[1.8,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<javadoc.opts>-Xdoclint:none</javadoc.opts>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
|
@ -0,0 +1,44 @@
|
|||
package eu.dnetlib.ariadneplus;
|
||||
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import freemarker.cache.ClassTemplateLoader;
|
||||
import freemarker.template.TemplateExceptionHandler;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
public class AppConfig {
|
||||
|
||||
@Bean
|
||||
public RestTemplate jrrRestTemplate(){
|
||||
//TODO: move configuration here from CatalogueRegistrator?
|
||||
return new RestTemplateBuilder().build();
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public freemarker.template.Configuration freemarkerConfig(){
|
||||
freemarker.template.Configuration config = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_27);
|
||||
ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "/eu/dnetlib/ariadneplus/sparql");
|
||||
config.setTemplateLoader(ctl);
|
||||
config.setDefaultEncoding("UTF-8");
|
||||
// Sets how errors will appear.
|
||||
// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.
|
||||
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
|
||||
|
||||
// Don't log exceptions inside FreeMarker that it will thrown at you anyway:
|
||||
config.setLogTemplateExceptions(false);
|
||||
|
||||
// Wrap unchecked exceptions thrown during template processing into TemplateException-s.
|
||||
config.setWrapUncheckedExceptions(true);
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package eu.dnetlib.ariadneplus;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@SpringBootApplication
|
||||
public class AriadnePlusPublisherApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AriadnePlusPublisherApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,222 @@
|
|||
package eu.dnetlib.ariadneplus.graphdb;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.eclipse.rdf4j.RDF4JException;
|
||||
import org.eclipse.rdf4j.model.IRI;
|
||||
import org.eclipse.rdf4j.model.ValueFactory;
|
||||
import org.eclipse.rdf4j.repository.Repository;
|
||||
import org.eclipse.rdf4j.repository.RepositoryConnection;
|
||||
import org.eclipse.rdf4j.repository.manager.RemoteRepositoryManager;
|
||||
import org.eclipse.rdf4j.rio.RDFFormat;
|
||||
|
||||
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
|
||||
import eu.dnetlib.ariadneplus.rdf.RecordParserHelper;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
public class GraphDBClient {
|
||||
|
||||
private static final Log log = LogFactory.getLog(GraphDBClient.class);
|
||||
|
||||
private RecordParserHelper recordParserHelper;
|
||||
|
||||
private String graphDBServerUrl;
|
||||
|
||||
protected GraphDBClient(final RecordParserHelper recordParserHelper,
|
||||
final String graphDBServerUrl) {
|
||||
this.recordParserHelper = recordParserHelper;
|
||||
this.graphDBServerUrl = graphDBServerUrl;
|
||||
}
|
||||
|
||||
public long feed(final String record) throws AriadnePlusPublisherException{
|
||||
try {
|
||||
String objIdentifier = recordParserHelper.getObjIdentifier(record);
|
||||
if (StringUtils.isBlank(objIdentifier)) {
|
||||
log.warn("Got record with no objIdentifier -- skipping");
|
||||
return 0;
|
||||
}
|
||||
log.debug("init connection to graphDBServerUrl " + this.graphDBServerUrl);
|
||||
RemoteRepositoryManager manager = new RemoteRepositoryManager(this.graphDBServerUrl);
|
||||
manager.init();
|
||||
manager.setUsernameAndPassword("writer", "writer01");
|
||||
log.debug("manager init");
|
||||
Repository repository = manager.getRepository("ariadneprova");
|
||||
ValueFactory factory = repository.getValueFactory();
|
||||
String dsInterface = recordParserHelper.getDatasourceApi(record);
|
||||
IRI graph = factory.createIRI(dsInterface);
|
||||
try (RepositoryConnection con = repository.getConnection()) {
|
||||
log.debug("connection established");
|
||||
con.begin();
|
||||
String recordURI = getRecordURI(objIdentifier, dsInterface);
|
||||
log.debug("Trying to adding record with recordURI " + recordURI + " into graph " + graph);
|
||||
con.add(IOUtils.toInputStream(getRDFBlock(record), "UTF-8"), recordURI, RDFFormat.RDFXML, graph);
|
||||
con.commit();
|
||||
log.debug("statement added");
|
||||
con.close();
|
||||
}
|
||||
catch (RDF4JException e) {
|
||||
log.error("error adding statement ...", e);
|
||||
}
|
||||
repository.shutDown();
|
||||
manager.shutDown();
|
||||
log.debug("manager shutDown");
|
||||
return 1;
|
||||
}catch(Throwable e){
|
||||
log.error(e);
|
||||
throw new AriadnePlusPublisherException(e);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// long feedProvenance(final String namedGraphURI, final String collectionDate, final String transformationDate, final String datasource, final String api) {
|
||||
// Model md = null;
|
||||
// Resource rApi = ResourceFactory.createResource(defaultBaseURI + api);
|
||||
// Resource r = ResourceFactory.createResource(namedGraphURI);
|
||||
// Statement stmApi =
|
||||
// ResourceFactory.createStatement(rApi, IS_API_OF, ResourceFactory.createPlainLiteral(datasource));
|
||||
// Statement stmCollFrom =
|
||||
// ResourceFactory.createStatement(r, COLL_FROM, rApi);
|
||||
// Statement stmCollDate = ResourceFactory
|
||||
// .createStatement(r, COLL_IN_DATE, ResourceFactory.createTypedLiteral(collectionDate, XSDDatatype.XSDdateTime));
|
||||
// Statement stmTransDate = ResourceFactory
|
||||
// .createStatement(r, TRANS_IN_DATE, ResourceFactory.createTypedLiteral(transformationDate, XSDDatatype.XSDdateTime));
|
||||
//
|
||||
// //let's remove previous provenance statements for this resource:
|
||||
// md.removeAll(r, null, null);
|
||||
// //and add the new ones
|
||||
// md.add(stmApi).add(stmCollFrom).add(stmCollDate).add(stmTransDate);
|
||||
// md.close();
|
||||
// return 3;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Delete all triples in named graphs collected from the given api
|
||||
* @param api the id of the API
|
||||
* @return the number of triples deleted from the named graphs associated to the given api
|
||||
*/
|
||||
public long drop(final String api){
|
||||
// Model prov = null;
|
||||
// //look for all named graphs associated to the api
|
||||
// Resource rApi = ResourceFactory.createResource(defaultBaseURI + api);
|
||||
// long deletedTriples = 0;
|
||||
// final ResIterator resIterator = prov.listSubjectsWithProperty(COLL_FROM, rApi);
|
||||
// while (resIterator.hasNext()) {
|
||||
// Resource namedGraphURI = resIterator.nextResource();
|
||||
// //delete all triples belonging to the r named graph
|
||||
// deletedTriples += dropNamedGraph(namedGraphURI.getURI());
|
||||
// //delete the named graph from the provenance graph
|
||||
// prov.removeAll(namedGraphURI, null, null);
|
||||
// }
|
||||
// //delete the api from the provenance graph
|
||||
// prov.removeAll(null, null, rApi);
|
||||
// prov.removeAll(rApi, null, null);
|
||||
// prov.close();
|
||||
// return deletedTriples;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private long dropNamedGraph(String namedGraphURI){
|
||||
// Model namedGraph = null;
|
||||
// long deletedTriples = namedGraph.size();
|
||||
// namedGraph.removeAll();
|
||||
// namedGraph.close();
|
||||
// return deletedTriples;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private String getRecordURI(final String objIdentifier, final String datasourceApi) {
|
||||
return "/" + datasourceApi + "/" + objIdentifier;
|
||||
}
|
||||
|
||||
public RecordParserHelper getRecordParserHelper() {
|
||||
return recordParserHelper;
|
||||
}
|
||||
|
||||
public void setRecordParserHelper(final RecordParserHelper recordParserHelper) {
|
||||
this.recordParserHelper = recordParserHelper;
|
||||
}
|
||||
|
||||
public void setDefaultBaseURI(final String defaultBaseURI) {
|
||||
this.graphDBServerUrl = defaultBaseURI;
|
||||
}
|
||||
|
||||
public String getRDFBlock(final String record) throws SaxonApiException{
|
||||
recordParserHelper.init();
|
||||
try {
|
||||
if (StringUtils.isBlank(record)) {
|
||||
log.warn("Got empty record");
|
||||
return "";
|
||||
}
|
||||
String objIdentifier = recordParserHelper.getObjIdentifier(record);
|
||||
if (StringUtils.isBlank(objIdentifier)) {
|
||||
log.warn("Got record with no objIdentifier -- skipping");
|
||||
return "";
|
||||
}
|
||||
log.debug(objIdentifier);
|
||||
String rdfBlock = recordParserHelper.getRDF(record);
|
||||
if (StringUtils.isBlank(rdfBlock)) {
|
||||
log.warn("Missing rdf:RDF in record with objIdentifier " + objIdentifier);
|
||||
}
|
||||
return rdfBlock;
|
||||
}catch(Throwable e){
|
||||
log.error(e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// strQuery =
|
||||
// "SELECT ?name FROM DEFAULT WHERE {" +
|
||||
// "?s <http://xmlns.com/foaf/0.1/name> ?name .}";
|
||||
// }
|
||||
|
||||
|
||||
//
|
||||
// public void queryTest(){
|
||||
// RemoteRepositoryManager manager = new RemoteRepositoryManager(GRAPHDB_SERVER_URL);
|
||||
// manager.init();
|
||||
// logger.debug("manager init");
|
||||
// Repository repository = manager.getRepository("PersonData");
|
||||
// try (RepositoryConnection con = repository.getConnection()) {
|
||||
// logger.debug("connection established");
|
||||
// query(con);
|
||||
// logger.debug("query success");
|
||||
// }
|
||||
// catch (RDF4JException e) {
|
||||
// logger.error("error adding statement ...", e);
|
||||
// }
|
||||
// manager.shutDown();
|
||||
// logger.debug("manager shutDown");
|
||||
// }
|
||||
//
|
||||
// private void query(RepositoryConnection repositoryConnection) {
|
||||
// TupleQuery tupleQuery = repositoryConnection.prepareTupleQuery(QueryLanguage.SPARQL, strQuery);
|
||||
// TupleQueryResult result = null;
|
||||
// try {
|
||||
// result = tupleQuery.evaluate();
|
||||
// int count = 0;
|
||||
// while (result.hasNext()) {
|
||||
// BindingSet bindingSet = result.next();
|
||||
//
|
||||
// SimpleLiteral name = (SimpleLiteral)bindingSet.getValue("name");
|
||||
// logger.info("name = " + name.stringValue());
|
||||
// count++;
|
||||
// }
|
||||
// logger.info("Entries found: ", count);
|
||||
// }
|
||||
// catch (QueryEvaluationException qee) {
|
||||
// logger.error(WTF_MARKER, qee.getStackTrace().toString(), qee);
|
||||
// } finally {
|
||||
// result.close();
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package eu.dnetlib.ariadneplus.graphdb;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import eu.dnetlib.ariadneplus.rdf.RecordParserHelper;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class GraphDBClientFactory {
|
||||
|
||||
private static final Log log = LogFactory.getLog(GraphDBClientFactory.class);
|
||||
@Value("${graphdb.serverUrl}")
|
||||
private String graphDBServerUrl;
|
||||
|
||||
@Autowired
|
||||
private RecordParserHelper recordParserHelper;
|
||||
|
||||
public GraphDBClient getGraphDBClient() {
|
||||
log.debug("Creating GraphDBClient for "+graphDBServerUrl);
|
||||
return new GraphDBClient(recordParserHelper, graphDBServerUrl);
|
||||
}
|
||||
|
||||
public RecordParserHelper getRecordParserHelper() {
|
||||
return recordParserHelper;
|
||||
}
|
||||
|
||||
public void setRecordParserHelper(final RecordParserHelper recordParserHelper) {
|
||||
this.recordParserHelper = recordParserHelper;
|
||||
}
|
||||
|
||||
|
||||
public String getGraphDBServerUrl() {
|
||||
return graphDBServerUrl;
|
||||
}
|
||||
|
||||
|
||||
public void setGraphDBServerUrl(String graphDBServerUrl) {
|
||||
this.graphDBServerUrl = graphDBServerUrl;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package eu.dnetlib.ariadneplus.publisher;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherHelper.AriadnePlusTargets;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@RestController
|
||||
public class AriadnePlusPublisherController {
|
||||
|
||||
private static final Log log = LogFactory.getLog(AriadnePlusPublisherController.class);
|
||||
|
||||
private static final String DEFAULT_TARGET_ENDPOINT = "GRAPHDB";
|
||||
|
||||
@Autowired
|
||||
private AriadnePlusPublisherHelper ariadneplusPublisherHelper;
|
||||
|
||||
@RequestMapping(value = "/version", method = RequestMethod.GET)
|
||||
public String version() throws AriadnePlusPublisherException {
|
||||
return "3.0.0-SNAPSHOT";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/publish", method = RequestMethod.POST)
|
||||
public void publish(@RequestParam final String record, @RequestParam(required = false) String ariadneplusTarget) throws AriadnePlusPublisherException {
|
||||
if (ariadneplusTarget==null) {
|
||||
ariadneplusTarget = DEFAULT_TARGET_ENDPOINT;
|
||||
}
|
||||
getAriadnePlusPublisherHelper().publish(record, getTarget(ariadneplusTarget));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/unpublish", method = RequestMethod.GET)
|
||||
public void unpublish(@RequestParam final String datasourceApi, @RequestParam(required = false) String ariadneplusTarget) throws AriadnePlusPublisherException {
|
||||
getAriadnePlusPublisherHelper().unpublish(datasourceApi, getTarget(ariadneplusTarget));
|
||||
}
|
||||
|
||||
private AriadnePlusTargets getTarget(String value) {
|
||||
return AriadnePlusTargets.valueOf(value);
|
||||
}
|
||||
|
||||
public AriadnePlusPublisherHelper getAriadnePlusPublisherHelper() {
|
||||
return ariadneplusPublisherHelper;
|
||||
}
|
||||
|
||||
public void setAriadnePlusPublisherHelper(final AriadnePlusPublisherHelper ariadneplusPublisherHelper) {
|
||||
this.ariadneplusPublisherHelper = ariadneplusPublisherHelper;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package eu.dnetlib.ariadneplus.publisher;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
public class AriadnePlusPublisherException extends Exception{
|
||||
|
||||
public AriadnePlusPublisherException() {
|
||||
}
|
||||
|
||||
public AriadnePlusPublisherException(final String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public AriadnePlusPublisherException(final String message, final Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public AriadnePlusPublisherException(final Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public AriadnePlusPublisherException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package eu.dnetlib.ariadneplus.publisher;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import eu.dnetlib.ariadneplus.graphdb.GraphDBClient;
|
||||
import eu.dnetlib.ariadneplus.graphdb.GraphDBClientFactory;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class AriadnePlusPublisherHelper {
|
||||
|
||||
private static final Log log = LogFactory.getLog(AriadnePlusPublisherHelper.class);
|
||||
|
||||
public enum AriadnePlusTargets{
|
||||
GRAPHDB
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private GraphDBClientFactory graphdbClientFactory;
|
||||
|
||||
public void publish(final String record, final AriadnePlusTargets target) throws AriadnePlusPublisherException {
|
||||
switch(target){
|
||||
case GRAPHDB:
|
||||
publishGraphDB(record);
|
||||
break;
|
||||
default: throw new AriadnePlusPublisherException("Target "+target+" not supported yet");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public long unpublish(final String datasourceInterface, final AriadnePlusTargets target) throws AriadnePlusPublisherException {
|
||||
long res = 0;
|
||||
switch(target){
|
||||
case GRAPHDB:
|
||||
res = unpublishGraphDB(datasourceInterface);
|
||||
break;
|
||||
default: throw new AriadnePlusPublisherException("Target "+target+" not supported yet");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private void publishGraphDB(final String record) throws AriadnePlusPublisherException {
|
||||
log.debug("Publishing on graphdb");
|
||||
GraphDBClient graphDBClient = this.graphdbClientFactory.getGraphDBClient();
|
||||
graphDBClient.feed(record);
|
||||
}
|
||||
|
||||
private long unpublishGraphDB(final String datasourceInterface) {
|
||||
log.info("Unpublishing from graphdb "+datasourceInterface);
|
||||
GraphDBClient graphDBClient = this.graphdbClientFactory.getGraphDBClient();
|
||||
long deletedTriples = graphDBClient.drop(datasourceInterface);
|
||||
log.info("# triples deleted for "+datasourceInterface+": "+deletedTriples);
|
||||
return deletedTriples;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
package eu.dnetlib.ariadneplus.publisher;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import javax.xml.transform.sax.SAXSource;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.sf.saxon.s9api.*;
|
||||
import net.sf.saxon.s9api.Serializer.Property;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class SaxonHelper {
|
||||
|
||||
private Processor xmlProcessor = new Processor(false);
|
||||
|
||||
|
||||
public Helper help(){
|
||||
return new Helper();
|
||||
}
|
||||
|
||||
public class Helper{
|
||||
private Serializer serializer;
|
||||
|
||||
Helper() {
|
||||
this.serializer = xmlProcessor.newSerializer();
|
||||
serializer.setOutputProperty(Property.METHOD, "xml");
|
||||
serializer.setOutputProperty(Property.INDENT, "yes");
|
||||
}
|
||||
|
||||
public Helper setSerializerProperty(Property p, String value){
|
||||
serializer.setOutputProperty(p, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public XdmNode parseXML(final String xmlSource) throws SaxonApiException {
|
||||
SAXSource source = new SAXSource(new InputSource(new StringReader(xmlSource)));
|
||||
DocumentBuilder docBuilder = xmlProcessor.newDocumentBuilder();
|
||||
return docBuilder.build(source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate the given xpath on the given XML source.
|
||||
*
|
||||
* @param xmlSource XML source string
|
||||
* @param xpath the xpath to evaluate
|
||||
* @param namespaces the map of namespaces to be declared to evaluate the xpath
|
||||
* @return an XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
|
||||
*/
|
||||
public XdmItem evaluateSingle(final String xmlSource, final String xpath, final Map<String, String> namespaces) throws SaxonApiException {
|
||||
XPathSelector xpathSelector = prepareXPathSelector(xpath, namespaces);
|
||||
return evaluateSingle(xmlSource, xpathSelector);
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the given xpath selector on the given XML source.
|
||||
*
|
||||
* @param xmlSource XML source string
|
||||
* @param xpathSelector the configured xpath selector to apply
|
||||
* @return an XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
|
||||
*/
|
||||
public XdmItem evaluateSingle(final String xmlSource, final XPathSelector xpathSelector) throws SaxonApiException {
|
||||
XdmNode xdmNode = parseXML(xmlSource);
|
||||
xpathSelector.setContextItem(xdmNode);
|
||||
return xpathSelector.evaluateSingle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an XPathSelector for the given xpath and namespaces.
|
||||
* @param xpath the xpath
|
||||
* @param namespaces the map of namespaces to be declared to evaluate the xpath
|
||||
* @return XPathSelector
|
||||
* @throws SaxonApiException
|
||||
*/
|
||||
public XPathSelector prepareXPathSelector(final String xpath,final Map<String, String> namespaces) throws SaxonApiException {
|
||||
XPathCompiler compiler = xmlProcessor.newXPathCompiler();
|
||||
for (Entry<String, String> ns : namespaces.entrySet()) {
|
||||
compiler.declareNamespace(ns.getKey(), ns.getValue());
|
||||
}
|
||||
XPathExecutable xpathExecutable = compiler.compile(xpath);
|
||||
XPathSelector xpathSelector = xpathExecutable.load();
|
||||
return xpathSelector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an XPathSelector for the given xpath and namespaces.
|
||||
* @param xpath the xpath
|
||||
* @param nsPrefix namespace prefix
|
||||
* @param ns namespace URI
|
||||
* @return XPathSelector
|
||||
* @throws SaxonApiException
|
||||
*/
|
||||
public XPathSelector prepareXPathSelector(final String xpath,final String nsPrefix, final String ns) throws SaxonApiException {
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put(nsPrefix, ns);
|
||||
return prepareXPathSelector(xpath, map);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate the given xpath on the given XML source.
|
||||
* @param xmlSource XML source string
|
||||
* @param xpath the xpath to evaluate
|
||||
* @param nsPrefix namespace prefix
|
||||
* @param ns namespace URI
|
||||
* @return an XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
|
||||
* @throws SaxonApiException
|
||||
*
|
||||
*/
|
||||
public XdmItem evaluateSingle(final String xmlSource, final String xpath, final String nsPrefix, final String ns) throws SaxonApiException {
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put(nsPrefix, ns);
|
||||
return evaluateSingle(xmlSource, xpath, map);
|
||||
}
|
||||
/**
|
||||
* Evaluate the given xpath on the given XML source.
|
||||
*
|
||||
* @param xmlSource XML source string
|
||||
* @param xpath the xpath to evaluate. xpath must evaluate to an xdmNode
|
||||
* @param namespaces the map of namespaces to be declared to evaluate the xpath
|
||||
* @return the XML serialization as string of the XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
|
||||
* @throws ClassCastException if xpath is not evaluated to a node.
|
||||
*/
|
||||
public String evaluateSingleAsString(final String xmlSource, final String xpath, final Map<String, String> namespaces) throws SaxonApiException {
|
||||
XdmItem item = evaluateSingle(xmlSource, xpath, namespaces);
|
||||
if(item != null){
|
||||
XdmNode node = (XdmNode) item;
|
||||
return serializer.serializeNodeToString(node);
|
||||
}
|
||||
else return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Applies the given xpath selector on the given XML source.
|
||||
*
|
||||
* @param xmlSource XML source string
|
||||
* @param xpathSelector the configured xpath selector to apply
|
||||
* @return the XML serialization as string of the XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
|
||||
* @throws ClassCastException if xpath is not evaluated to a node.
|
||||
*/
|
||||
public String evaluateSingleAsString(final String xmlSource, final XPathSelector xpathSelector) throws SaxonApiException {
|
||||
XdmItem item = evaluateSingle(xmlSource, xpathSelector);
|
||||
if(item != null){
|
||||
XdmNode node = (XdmNode) item;
|
||||
return serializer.serializeNodeToString(node);
|
||||
}
|
||||
else return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate the given xpath on the given XML source.
|
||||
*
|
||||
* @param xmlSource XML source string
|
||||
* @param xpath the xpath to evaluate. xpath must evaluate to an xdmNode
|
||||
* @param nsPrefix namespace prefix
|
||||
* @param ns namespace URI
|
||||
* @return the XML serialization as string of the XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
|
||||
* @throws ClassCastException if xpath is not evaluated to a node.
|
||||
*/
|
||||
public String evaluateSingleAsString(final String xmlSource, final String xpath, final String nsPrefix, final String ns) throws SaxonApiException {
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put(nsPrefix, ns);
|
||||
return evaluateSingleAsString(xmlSource, xpath, map);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package eu.dnetlib.ariadneplus.rdf;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import eu.dnetlib.ariadneplus.publisher.SaxonHelper;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.Serializer;
|
||||
import net.sf.saxon.s9api.XPathSelector;
|
||||
|
||||
/**
|
||||
* @author enrico.ottonello
|
||||
*
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class RecordParserHelper {
|
||||
|
||||
private static final Log log = LogFactory.getLog(RecordParserHelper.class);
|
||||
|
||||
public static final String OAI_NAMESPACE_URI = "http://www.openarchives.org/OAI/2.0/";
|
||||
public static final String DRI_NAMESPACE_URI = "http://www.driver-repository.eu/namespace/dri";
|
||||
public static final String RDF_NAMESPACE_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
||||
|
||||
@Autowired
|
||||
private SaxonHelper saxonHelper;
|
||||
|
||||
private XPathSelector xpathSelectorObjIdentifier;
|
||||
private XPathSelector xpathSelectorCollectionDate;
|
||||
private XPathSelector xpathSelectorTransformationDate;
|
||||
private XPathSelector xpathSelectorDatasourceName;
|
||||
private XPathSelector xpathSelectorDatasourceApi;
|
||||
private XPathSelector xpathSelectorRDF;
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws SaxonApiException {
|
||||
prepareXpathSelectors();
|
||||
}
|
||||
|
||||
public String getCollectionDate(final String record) {
|
||||
return extractFromRecord(record, xpathSelectorCollectionDate);
|
||||
}
|
||||
|
||||
public String getTransformationDate(final String record) {
|
||||
return extractFromRecord(record, xpathSelectorTransformationDate);
|
||||
}
|
||||
|
||||
public String getDatasourceName(final String record) {
|
||||
return extractFromRecord(record, xpathSelectorDatasourceName);
|
||||
}
|
||||
|
||||
public String getDatasourceApi(final String record) {
|
||||
return extractFromRecord(record, xpathSelectorDatasourceApi);
|
||||
}
|
||||
|
||||
public String getObjIdentifier(final String record) {
|
||||
return extractFromRecord(record, xpathSelectorObjIdentifier);
|
||||
}
|
||||
|
||||
public String getRDF(final String record) {
|
||||
return extractFromRecord(record, xpathSelectorRDF);
|
||||
}
|
||||
|
||||
private String extractFromRecord(final String record, final XPathSelector xPathSelector) {
|
||||
try {
|
||||
return this.saxonHelper.help().setSerializerProperty(Serializer.Property.OMIT_XML_DECLARATION, "yes").evaluateSingleAsString(record, xPathSelector);
|
||||
} catch (SaxonApiException e) {
|
||||
log.error(e);
|
||||
throw new RuntimeException("Cannot extract content from path "+ xPathSelector.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private void prepareXpathSelectors() throws SaxonApiException {
|
||||
Map<String, String> namespaces = Maps.newHashMap();
|
||||
namespaces.put("oai", OAI_NAMESPACE_URI);
|
||||
namespaces.put("dri", DRI_NAMESPACE_URI);
|
||||
namespaces.put("rdf", RDF_NAMESPACE_URI);
|
||||
xpathSelectorObjIdentifier = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:objIdentifier/text()", namespaces);
|
||||
xpathSelectorCollectionDate = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:dateOfCollection/text()", namespaces);
|
||||
xpathSelectorTransformationDate = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:dateOfTransformation/text()", namespaces);
|
||||
xpathSelectorDatasourceName = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:datasourcename/text()", namespaces);
|
||||
xpathSelectorDatasourceApi = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:datasourceapi/text()", namespaces);
|
||||
xpathSelectorRDF = this.saxonHelper.help().prepareXPathSelector("//oai:metadata/rdf:RDF", namespaces);
|
||||
}
|
||||
|
||||
public SaxonHelper getSaxonHelper() {
|
||||
return saxonHelper;
|
||||
}
|
||||
|
||||
public void setSaxonHelper(final SaxonHelper saxonHelper) {
|
||||
this.saxonHelper = saxonHelper;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
server.contextPath=/ariadneplus-graphdb
|
||||
server.port=8281
|
||||
|
||||
graphdb.serverUrl=http://localhost:7200/
|
||||
graphdb.sparqlUrl = http://localhost:7200/sparql
|
|
@ -0,0 +1,106 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
<${subjectURL}> a ?type .
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
|
||||
<${subjectURL}> crm:P129_is_about ?about .
|
||||
?about a ?aboutType .
|
||||
?about rdfs:label ?aboutLabel .
|
||||
|
||||
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
|
||||
|
||||
<${subjectURL}> crmpe:PP7i_is_software_object_hosted_by ?host .
|
||||
<${subjectURL}> crmpe:PP32i_is_curated_by ?curatingService .
|
||||
|
||||
<${subjectURL}> crmpe:PP17_has_snapshot ?snapshot1 .
|
||||
<${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshot2 .
|
||||
|
||||
<${subjectURL}> crmpe:PP21_has_software_part ?sw1 .
|
||||
<${subjectURL}> crmpe:PP21i_is_software_part_of ?sw2 .
|
||||
<${subjectURL}> crmpe:PP22_has_release ?sw3 .
|
||||
<${subjectURL}> crmpe:PP22i_is_release_of ?sw4 .
|
||||
|
||||
<${subjectURL}> <usedby> ?adopter .
|
||||
<${subjectURL}> <creationtime> ?creationtime .
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crmdig:D14_Software .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P2_has_type ?e55Type .
|
||||
?e55Type rdfs:label ?e55TypeLabel .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P129_is_about ?about .
|
||||
?about a ?aboutType .
|
||||
?about rdfs:label ?aboutLabel .
|
||||
}
|
||||
UNION{<${subjectURL}> crmpe:PP7i_is_software_object_hosted_by ?host . }
|
||||
UNION{?host crmpe:PP7_hosts_software_object <${subjectURL}> . }
|
||||
UNION{<${subjectURL}> crmpe:PP32i_is_curated_by ?curatingService .}
|
||||
UNION{?curatingService crmpe:PP32_curates <${subjectURL}> .}
|
||||
UNION{
|
||||
<${subjectURL}> crmpe:PP32i_is_curated_by ?curatingService .
|
||||
?curatingService crmpe:PP31_uses_curation_plan ?curationplan .
|
||||
}
|
||||
UNION{
|
||||
?curatingService crmpe:PP32_curates <${subjectURL}> .
|
||||
?curatingService crmpe:PP31_uses_curation_plan ?curationplan .
|
||||
}
|
||||
UNION{<${subjectURL}> crmpe:PP17_has_snapshot ?snapshot1 .}
|
||||
UNION{ ?snapshot1 crmpe:PP17i_is_snapshot_of <${subjectURL}> .}
|
||||
UNION{<${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshot2 .}
|
||||
UNION{ ?snapshot2 crmpe:PP17_has_snapshot <${subjectURL}> .}
|
||||
|
||||
UNION{<${subjectURL}> crmpe:PP21_has_software_part ?sw1 .}
|
||||
UNION{?sw1 crmpe:PP21i_is_software_part_of <${subjectURL}>.}
|
||||
|
||||
UNION{ ?sw2 crmpe:PP21_has_software_part <${subjectURL}> .}
|
||||
UNION{<${subjectURL}> crmpe:PP21i_is_software_part_of ?sw2 .}
|
||||
|
||||
UNION{<${subjectURL}> crmpe:PP22_has_release ?sw3 .}
|
||||
UNION{?sw3 crmpe:PP22i_is_release_of <${subjectURL}> .}
|
||||
|
||||
UNION{<${subjectURL}> crmpe:PP22i_is_release_of ?sw4 .}
|
||||
UNION{?sw4 crmpe:PP22_has_release <${subjectURL}> .}
|
||||
|
||||
UNION{
|
||||
?adopter crm:P94i_was_created_by ?event .
|
||||
?event crmdig:L23_used_software_or_firmware <${subjectURL}> .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crmdig:L23i_was_software_or_firmware_used_by ?event .
|
||||
?adopter crm:P94i_was_created_by ?event .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?event1 .
|
||||
?event1 crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
|
||||
?event1 crm:P4_has_time-span ?timespan .
|
||||
?timespan crm:P81_ongoing_throughout ?creationtime .
|
||||
}
|
||||
}
|
||||
LIMIT 1000
|
|
@ -0,0 +1,51 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
<${subjectURL}> a ?type .
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
|
||||
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
|
||||
|
||||
<${subjectURL}> <usedby> ?adopter .
|
||||
<${subjectURL}> <creationtime> ?creationtime .
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crm:E29_Design_or_Procedure .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P2_has_type ?e55Type .
|
||||
?e55Type rdfs:label ?e55TypeLabel .
|
||||
}
|
||||
UNION {
|
||||
?adopter crmpe:PP31_uses_curation_plan <${subjectURL}> .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?event1 .
|
||||
?event1 crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
|
||||
?event1 crm:P4_has_time-span ?timespan .
|
||||
?timespan crm:P81_ongoing_throughout ?creationtime .
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
<${subjectURL}> a ?type .
|
||||
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
|
||||
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
|
||||
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint crm:P2_has_type ?contactpointType .
|
||||
?contactpoint rdfs:label ?contactpointLabel .
|
||||
?contactpointType rdfs:label ?contactpointTypeLabel .
|
||||
|
||||
<${subjectURL}> crm:P107_has_current_or_former_member ?member1 .
|
||||
<${subjectURL}> crm:P107i_is_current_or_former_member_of ?team .
|
||||
<${subjectURL}> crmpe:PP2i_provides ?service .
|
||||
|
||||
<${subjectURL}> crmpe:PP44i_is_maintaining_team_of ?maintained .
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crm:E39_Actor .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
}
|
||||
UNION{ <${subjectURL}> crm:P3_has_note ?description .}
|
||||
UNION{ <${subjectURL}> rdfs:label ?label .}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P2_has_type ?e55Type .
|
||||
?e55Type rdfs:label ?e55TypeLabel .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint rdfs:label ?contactpointLabel .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint crm:P2_has_type ?contactpointType .
|
||||
?contactpointType rdfs:label ?contactpointTypeLabel .
|
||||
}
|
||||
UNION{ <${subjectURL}> crm:P107_has_current_or_former_member ?member1 .}
|
||||
UNION{ ?member1 crm:P107_has_current_or_former_member <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crm:P107i_is_current_or_former_member_of ?team .}
|
||||
UNION{ ?team crm:P107_has_current_or_former_member <${subjectURL}> .}
|
||||
|
||||
UNION{ <${subjectURL}> crmpe:PP2i_provides ?service .}
|
||||
UNION{ ?service crmpe:PP2_provided_by <${subjectURL}> .}
|
||||
|
||||
UNION{ <${subjectURL}> crmpe:PP44i_is_maintaining_team_of ?maintained .}
|
||||
UNION{ ?maintained crmpe:PP44_has_maintaining_team <${subjectURL}> .}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
<${subjectURL}> a ?type .
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
|
||||
<${subjectURL}> crm:P129_is_about ?about .
|
||||
?about a ?aboutType .
|
||||
?about rdfs:label ?aboutLabel .
|
||||
|
||||
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
|
||||
|
||||
<${subjectURL}> crm:P46_is_composed_of ?Col_Part .
|
||||
|
||||
<${subjectURL}> crmpe:PP4i_is_object_hosted_by ?host_serv .
|
||||
<${subjectURL}> crmpe:PP32i_is_curated_by ?curator .
|
||||
<${subjectURL}> <creator> ?creator .
|
||||
|
||||
<${subjectURL}> crm:P72_has_language ?languageLabel .
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crm:E78_Collection .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P129_is_about ?about .
|
||||
?about a ?aboutType .
|
||||
?about rdfs:label ?aboutLabel .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P2_has_type ?e55Type .
|
||||
?e55Type rdfs:label ?e55TypeLabel .
|
||||
}
|
||||
UNION{ <${subjectURL}> crm:P46_is_composed_of ?Col_Part .}
|
||||
UNION{ ?Col_Part crm:P46i_forms_part_of <${subjectURL}> .}
|
||||
|
||||
UNION{ <${subjectURL}> crmpe:PP4i_is_object_hosted_by ?host_serv .}
|
||||
UNION{ <${subjectURL}> crmpe:PP32i_is_curated_by ?curator .}
|
||||
UNION{ ?host_serv crmpe:PP4_hosts_object <${subjectURL}> .}
|
||||
UNION{ ?curator crmpe:PP32_curates <${subjectURL}> .}
|
||||
|
||||
UNION {
|
||||
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
|
||||
?Creation_event crm:P14_carried_out_by ?creator .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P72_has_language ?language .
|
||||
?language rdfs:label ?languageLabel .
|
||||
}
|
||||
|
||||
} LIMIT 30000
|
|
@ -0,0 +1,138 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
<${subjectURL}> a ?type .
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
|
||||
<${subjectURL}> crm:P129_is_about ?about .
|
||||
?about a ?aboutType .
|
||||
?about rdfs:label ?aboutLabel .
|
||||
|
||||
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
|
||||
|
||||
<${subjectURL}> crmpe:PP8i_is_dataset_hosted_by ?host .
|
||||
<${subjectURL}> crmpe:PP32i_is_curated_by ?curator .
|
||||
|
||||
<${subjectURL}> crm:P106i_forms_part_of ?container .
|
||||
<${subjectURL}> crm:P106_is_composed_of ?d3 .
|
||||
|
||||
<${subjectURL}> crmpe:PP39_is_metadata_for ?anotherdataset .
|
||||
<${subjectURL}> crmpe:PP39i_has_metadata ?metadata .
|
||||
|
||||
<${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshotted .
|
||||
<${subjectURL}> crmpe:PP17_has_snapshot ?snapshot .
|
||||
|
||||
<${subjectURL}> <encoding> ?encoding_label .
|
||||
<${subjectURL}> <used_software> ?sw .
|
||||
<${subjectURL}> <creator> ?creator .
|
||||
<${subjectURL}> <creationtime> ?creationtime .
|
||||
<${subjectURL}> <updatetime> ?updatetime .
|
||||
<${subjectURL}> <custodytime> ?custodytime .
|
||||
<${subjectURL}> <custodialhistorynote> ?custodialhistoryNote .
|
||||
<${subjectURL}> <curationtime> ?curationtime .
|
||||
<${subjectURL}> crm:P72_has_language ?languageLabel .
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crmpe:PE18_Dataset .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P129_is_about ?about .
|
||||
?about a ?aboutType .
|
||||
?about rdfs:label ?aboutLabel .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P2_has_type ?e55Type .
|
||||
?e55Type rdfs:label ?e55TypeLabel .
|
||||
}
|
||||
UNION{ <${subjectURL}> crmpe:PP8i_is_dataset_hosted_by ?host . }
|
||||
UNION{ ?host crmpe:PP8_hosts_dataset <${subjectURL}> . }
|
||||
UNION{ <${subjectURL}> crmpe:PP32i_is_curated_by ?curator .}
|
||||
UNION{ ?curator crmpe:PP32_curates <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crmpe:PP32i_is_curated_by ?curator .}
|
||||
UNION{ ?curator crmpe:PP32_curates <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crmpe:PP31_uses_curation_plan ?curationplan .}
|
||||
UNION{ <${subjectURL}> crm:P106i_forms_part_of ?container .}
|
||||
UNION{ ?container crm:P106_is_composed_of <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crm:P106_is_composed_of ?d3 .}
|
||||
UNION{ ?d3 crm:P106i_forms_part_of <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crmpe:PP39_is_metadata_for ?anotherdataset .}
|
||||
UNION{ ?anotherdataset crmpe:PP39i_has_metadata <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crmpe:PP39i_has_metadata ?metadata .}
|
||||
UNION{ ?metadata crmpe:PP39_is_metadata_for <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crmpe:PP17_has_snapshot ?snapshot .}
|
||||
UNION{ ?snapshot crmpe:PP17i_is_snapshot_of <${subjectURL}> .}
|
||||
UNION{ <${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshotted .}
|
||||
UNION{ ?snapshotted crmpe:PP17_has_snapshot <${subjectURL}> .}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
|
||||
?Creation_event crm:P33_used_specific_technique ?technique .
|
||||
?technique crm:P2_has_type ?techniquetype .
|
||||
?techniquetype rdfs:label ?encoding_label .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
|
||||
?Creation_event crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
|
||||
?Creation_event crmdig:L23_used_software_or_firmware ?sw .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
|
||||
?Creation_event crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
|
||||
?Creation_event crm:P14_carried_out_by ?creator .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?event1 .
|
||||
?event1 crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
|
||||
?event1 crm:P4_has_time-span ?timespan .
|
||||
?timespan crm:P81_ongoing_throughout ?creationtime .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?updateEvent .
|
||||
?updateEvent crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/update> .
|
||||
?updateEvent crm:P4_has_time-span ?timespanUpdate .
|
||||
?timespanUpdate crm:P82_at_some_time_within ?updatetime .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?custodialhistory .
|
||||
?custodialhistory crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/custodialhistory> .
|
||||
?custodialhistory crm:P3_has_note ?custodialhistoryNote .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P94i_was_created_by ?custodialhistory .
|
||||
?custodialhistory crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/custodialhistory> .
|
||||
?custodialhistory crm:P4_has_time-span ?timespanCustody .
|
||||
?timespanCustody crm:P82_at_some_time_within ?custodytime .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> ?hasCurationActivity ?curationActivity .
|
||||
?curationActivity a crm:E87_Curation_Activity .
|
||||
?curationActivity crm:P4_has_time-span ?curationActivitytimespan .
|
||||
?curationActivitytimespan crm:P82_at_some_time_within ?curationtime .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P72_has_language ?language .
|
||||
?language rdfs:label ?languageLabel .
|
||||
}
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
<${subjectURL}> a ?type .
|
||||
<${subjectURL}> crm:P2_has_type ?atypeLabel .
|
||||
|
||||
<${subjectURL}> crmpe:PP2_provided_by ?provider .
|
||||
?provider crm:P1_is_identified_by ?providerTitle .
|
||||
?provider rdfs:label ?providerLabel .
|
||||
?provider crm:P3_has_note ?providerDescr .
|
||||
?provider crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint crm:P2_has_type ?contactpointType .
|
||||
?contactpoint rdfs:label ?contactpointLabel .
|
||||
?contactpointType rdfs:label ?contactpointTypeLabel .
|
||||
|
||||
<${subjectURL}> crmpe:PP4_hosts_object ?object .
|
||||
|
||||
<${subjectURL}> crmpe:PP28_has_designated_access_point ?accesspoint .
|
||||
<${subjectURL}> crmpe:PP1i_is_currently_offered_by ?offerer .
|
||||
<${subjectURL}> crmpe:PP45_has_competency ?competenceLabel .
|
||||
|
||||
<${subjectURL}> crmpe:PP31_uses_curation_plan ?curationplan .
|
||||
|
||||
<${subjectURL}> crmpe:PP29_uses_access_protocol ?protocol .
|
||||
?protocol rdfs:label ?protocolLabel .
|
||||
|
||||
<${subjectURL}> crmpe:PP32_curates ?object2 .
|
||||
|
||||
<${subjectURL}> crmpe:PP15_delivers_on_request ?delivered .
|
||||
<${subjectURL}> crmpe:PP14_runs_on_request ?ran .
|
||||
|
||||
<${subjectURL}> crmpe:PP42_has_declarative_time ?declTime .
|
||||
|
||||
<${subjectURL}> <availability> ?availabilityLabel .
|
||||
<${subjectURL}> <activitytype> ?activitytypeLabel .
|
||||
|
||||
<${subjectURL}> crm:P16_used_specific_object ?Conditions_of_Use .
|
||||
?Conditions_of_Use a crm:E30_Right .
|
||||
?Conditions_of_Use crm:P3_has_note ?Conditions_of_Use_Note .
|
||||
?Conditions_of_Use crm:P2_has_type ?Conditions_of_Use_Type .
|
||||
?Conditions_of_Use_Type rdfs:label ?Conditions_of_Use_Type_label .
|
||||
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crmpe:PE1_Service .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
FILTER NOT EXISTS { ?titleRes a crm:E51_Contact_Point }
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P2_has_type ?atype .
|
||||
?atype rdfs:label ?atypeLabel .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P2_has_type ?availability .
|
||||
?availability rdfs:label ?availabilityLabel .
|
||||
FILTER(STRSTARTS(STR(?availability), "http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/availabilitytype"))
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crm:P2_has_type ?activitytype .
|
||||
?activitytype rdfs:label ?activitytypeLabel .
|
||||
FILTER(STRSTARTS(STR(?activitytype), "http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/activitytype"))
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP2_provided_by ?provider .
|
||||
?provider crm:P1_is_identified_by ?providerTitleRes .
|
||||
?providerTitleRes rdfs:label ?providerTitle .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP2_provided_by ?provider .
|
||||
?provider crm:P3_has_note ?providerDescr .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP2_provided_by ?provider .
|
||||
?provider rdfs:label ?providerLabel .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP2_provided_by ?provider .
|
||||
?provider crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint rdfs:label ?contactpointLabel .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP2_provided_by ?provider .
|
||||
?provider crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint crm:P2_has_type ?contactpointType .
|
||||
?contactpointType rdfs:label ?contactpointTypeLabel .}
|
||||
UNION { <${subjectURL}> crmpe:PP28_has_designated_access_point ?accesspoint .}
|
||||
UNION { ?accesspoint crmpe:PP28i_is_designated_access_point_of <${subjectURL}> .}
|
||||
UNION { <${subjectURL}> crmpe:PP1i_is_currently_offered_by ?offerer .}
|
||||
UNION { ?offerer crmpe:PP1_currently_offers <${subjectURL}> .}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP45_has_competency ?competence .
|
||||
?competence rdfs:label ?competenceLabel .}
|
||||
UNION { <${subjectURL}> crmpe:PP4_hosts_object ?object .}
|
||||
UNION { ?object crmpe:PP4i_is_object_hosted_by <${subjectURL}> .}
|
||||
|
||||
UNION {<${subjectURL}> crmpe:PP31_uses_curation_plan ?curationplan .}
|
||||
UNION { ?curationplan crmpe:PP31i_is_curation_plan_used_by <${subjectURL}> .}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP29_uses_access_protocol ?protocol .
|
||||
?protocol rdfs:label ?protocolLabel .}
|
||||
UNION {
|
||||
?protocol crmpe:PP29i_is_access_protocol_used_by <${subjectURL}> .
|
||||
?protocol rdfs:label ?protocolLabel .}
|
||||
UNION { <${subjectURL}> crmpe:PP32_curates ?object2 .}
|
||||
UNION { ?object2 crmpe:PP32i_is_curated_by <${subjectURL}> .}
|
||||
UNION { <${subjectURL}> crmpe:PP15_delivers_on_request ?delivered .}
|
||||
UNION { ?delivered crmpe:PP15i_is_delivered_by <${subjectURL}>.}
|
||||
UNION { <${subjectURL}> crmpe:PP14_runs_on_request ?ran .}
|
||||
UNION { ?ran crmpe:PP14i_is_run_by <${subjectURL}>.}
|
||||
UNION {
|
||||
<${subjectURL}> crmpe:PP42_has_declarative_time ?declTime .}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P16_used_specific_object ?Conditions_of_Use .
|
||||
?Conditions_of_Use a crm:E30_Right .
|
||||
?Conditions_of_Use crm:P3_has_note ?Conditions_of_Use_Note .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P16_used_specific_object ?Conditions_of_Use .
|
||||
?Conditions_of_Use a crm:E30_Right .
|
||||
?Conditions_of_Use crm:P2_has_type ?Conditions_of_Use_Type .
|
||||
?Conditions_of_Use_Type rdfs:label ?Conditions_of_Use_Type_label .
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
DEFINE input:inference 'ariadneplus_rules'
|
||||
|
||||
CONSTRUCT {
|
||||
<${subjectURL}> rdfs:label ?label .
|
||||
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
|
||||
<${subjectURL}> crm:P102_has_title ?title .
|
||||
|
||||
<${subjectURL}> crm:P3_has_note ?description .
|
||||
|
||||
<${subjectURL}> a ?type .
|
||||
|
||||
<${subjectURL}> crmpe:PP1_currently_offers ?offeredservice .
|
||||
|
||||
<${subjectURL}> crmpe:PP44_has_maintaining_team ?team .
|
||||
?team crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint crm:P2_has_type ?contactpointType .
|
||||
?contactpoint rdfs:label ?contactpointLabel .
|
||||
?contactpointType rdfs:label ?contactpointTypeLabel .
|
||||
|
||||
<${subjectURL}> crm:P4_has_time-span ?time_span .
|
||||
?time_span crm:P82a_begin_of_the_begin ?time_actual .
|
||||
}
|
||||
WHERE {
|
||||
<${subjectURL}> a crmpe:PE35_Project .
|
||||
<${subjectURL}> a ?type .
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
|
||||
?IDRes a crm:E42_Identifier .
|
||||
?IDRes rdfs:label ?ID_label .
|
||||
}
|
||||
UNION
|
||||
{
|
||||
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
|
||||
?titleRes a crm:E41_Appellation .
|
||||
?titleRes rdfs:label ?title .
|
||||
}
|
||||
UNION{ <${subjectURL}> crm:P3_has_note ?description .}
|
||||
UNION{ <${subjectURL}> rdfs:label ?label .}
|
||||
|
||||
UNION{
|
||||
<${subjectURL}> crmpe:PP1_currently_offers ?offeredservice .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crmpe:PP44_has_maintaining_team ?team .
|
||||
}
|
||||
UNION{
|
||||
<${subjectURL}> crmpe:PP44_has_maintaining_team ?team .
|
||||
?team crm:P76_has_contact_point ?contactpoint .
|
||||
?contactpoint crm:P2_has_type ?contactpointType .
|
||||
?contactpoint rdfs:label ?contactpointLabel .
|
||||
?contactpointType rdfs:label ?contactpointTypeLabel .
|
||||
}
|
||||
UNION {
|
||||
<${subjectURL}> crm:P4_has_time-span ?time_span .
|
||||
?time_span crm:P82a_begin_of_the_begin ?time_actual .
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
To check available rules: SELECT * from DB.DBA.SYS_RDF_SCHEMA;
|
||||
|
||||
#### ARIADNEPLUS RULES ####
|
||||
|
||||
### ORIGINAL WITH OFFICIALLY PUBLISHED SCHEMAS
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/>;
|
||||
sparql load <http://www.cidoc-crm.org/sites/default/files2/cidoc_crm_v6.2-draft-2015August.rdfs> into <http://www.cidoc-crm.org/cidoc-crm/>;
|
||||
rdfs_rule_set ('ariadneplus_rules', 'http://www.cidoc-crm.org/cidoc-crm/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
|
||||
sparql load <http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.2.rdfs> into <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
|
||||
rdfs_rule_set ('ariadneplus_rules', 'http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
|
||||
sparql load <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs> into <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
|
||||
rdfs_rule_set ('ariadneplus_rules', 'http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/') ;
|
||||
|
||||
|
||||
### USING SCHEMAS AVAILABLE FROM THE WORKSPACE
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/>;
|
||||
sparql load <http://data.d4science.org/RUhKNlY3Q3RqaWRlcS9seFFpKy9SWFRQMTZ2UmF0U3FHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/>;
|
||||
rdfs_rule_set ('ariadneplus_rules', 'http://www.cidoc-crm.org/cidoc-crm/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
|
||||
sparql load <http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.2.rdfs> into <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
|
||||
rdfs_rule_set ('ariadneplus_rules', 'http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
|
||||
sparql load <http://data.d4science.org/dytWdlJiamw1cVZvQXZGSWUvc283L280RDNwSVRVZjZHbWJQNStIS0N6Yz0> into <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
|
||||
rdfs_rule_set ('ariadneplus_rules', 'http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/') ;
|
||||
|
||||
#### EXTENDED RULES ####
|
||||
|
||||
# CRMext4SKOSandLabel_v1.4___23-03-2016180729___3031___20-09-2016163145___12893.rdfs
|
||||
sparql load <http://data.d4science.org/TVJTdXh0dFBUR2RlcS9seFFpKy9SZnVXcHlzYU5sT0dHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/>;
|
||||
# CRMpc_v1.1.1.rdfs
|
||||
sparql load <http://data.d4science.org/MmJQM1J5czhzODllcS9seFFpKy9SUVR0aW0yZ0NFT1dHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/>;
|
||||
|
||||
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/') ;
|
||||
rdfs_rule_set ('extended_rules', 'http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/') ;
|
||||
rdfs_rule_set ('extended_rules', 'http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <https://vocabs.dariah.eu/bbt/>;
|
||||
sparql load <http://data.d4science.org/RUhKNlY3Q3RqaWRlcS9seFFpKy9SWmUyOEgvYytSZnJHbWJQNStIS0N6Yz0> into <https://vocabs.dariah.eu/bbt/>;
|
||||
rdfs_rule_set ('extended_rules', 'https://vocabs.dariah.eu/bbt/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/CRMarchaeo/>;
|
||||
sparql load <http://data.d4science.org/dkc2d000OGhDZVZlcS9seFFpKy9SVlVJZkl5YlNWeTRHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/CRMarchaeo/>;
|
||||
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/CRMarchaeo/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/CRMgeo/>;
|
||||
sparql load <http://data.d4science.org/TVJTdXh0dFBUR2RlcS9seFFpKy9SWEpWSW5xRnZvT2lHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/CRMgeo/>;
|
||||
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/CRMgeo/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/CRMsci/>;
|
||||
sparql load <http://data.d4science.org/TElzU0lmS3JVN3RlcS9seFFpKy9SY1EzcCt4VEw1NkdHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/CRMsci/>;
|
||||
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/CRMsci/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://iflastandards.info/ns/fr/frbr/frbroo/>;
|
||||
sparql load <http://data.d4science.org/TElzU0lmS3JVN3RlcS9seFFpKy9SUUpxYzlFZVFxaXlHbWJQNStIS0N6Yz0> into <http://iflastandards.info/ns/fr/frbr/frbroo/>;
|
||||
rdfs_rule_set ('extended_rules', 'http://iflastandards.info/ns/fr/frbr/frbroo/') ;
|
||||
|
||||
SPARQL CLEAR GRAPH <http://www.w3.org/2004/02/skos/core#>;
|
||||
sparql load <http://data.d4science.org/OVVnSXpCMjdJTlplcS9seFFpKy9SYlFaZkJnNGgvUVpHbWJQNStIS0N6Yz0> into <http://www.w3.org/2004/02/skos/core#>;
|
||||
rdfs_rule_set ('extended_rules', 'http://www.w3.org/2004/02/skos/core#') ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
<appender name="SAVE-TO-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<Pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</Pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>log_%d{dd-MM-yyyy}_%i.log</fileNamePattern>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
<maxHistory>10</maxHistory>
|
||||
<totalSizeCap>100MB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
<logger name="org.springframework" level="INFO" additivity="false">
|
||||
<appender-ref ref="SAVE-TO-FILE" />
|
||||
</logger>
|
||||
<logger name="root" level="INFO" additivity="false">
|
||||
<appender-ref ref="SAVE-TO-FILE" />
|
||||
</logger>
|
||||
<logger name="eu.dnetlib" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="SAVE-TO-FILE" />
|
||||
</logger>
|
||||
<logger name="eu.dnetlib.ariadneplus" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="SAVE-TO-FILE" />
|
||||
</logger>
|
||||
</configuration>
|
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.ariadneplus.workflows.nodes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.ConnectException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
@ -28,16 +29,12 @@ import org.apache.http.impl.client.HttpClients;
|
|||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* Created by Alessia Bardi on 09/10/2017.
|
||||
*
|
||||
* @author Alessia Bardi
|
||||
*/
|
||||
public abstract class PublishAbstractJobNode extends AsyncJobNode {
|
||||
|
||||
private static final Log log = LogFactory.getLog(PublishAbstractJobNode.class);
|
||||
public class PublishGraphDBJobNode extends AsyncJobNode {
|
||||
|
||||
private String inputEprParam;
|
||||
private static final Log log = LogFactory.getLog(PublishGraphDBJobNode.class);
|
||||
|
||||
private String eprParam;
|
||||
|
||||
@Autowired
|
||||
private ResultSetClient resultSetClient;
|
||||
|
@ -52,8 +49,8 @@ public abstract class PublishAbstractJobNode extends AsyncJobNode {
|
|||
@Override
|
||||
protected String execute(final Env env) throws Exception {
|
||||
|
||||
final ResultSet<?> rsIn = env.getAttribute(getInputEprParam(), ResultSet.class);
|
||||
if ((rsIn == null)) { throw new MSROException("InputEprParam (" + getInputEprParam() + ") not found in ENV"); }
|
||||
final ResultSet<?> rsIn = env.getAttribute(getEprParam(), ResultSet.class);
|
||||
if ((rsIn == null)) { throw new MSROException("EprParam (" + getEprParam() + ") not found in ENV"); }
|
||||
|
||||
int countAll = 0;
|
||||
int countOk = 0;
|
||||
|
@ -67,7 +64,6 @@ public abstract class PublishAbstractJobNode extends AsyncJobNode {
|
|||
HttpPost post = new HttpPost(getPublisherEndpoint());
|
||||
List<NameValuePair> params = Lists.newArrayList();
|
||||
params.add(new BasicNameValuePair("record", record));
|
||||
params.add(new BasicNameValuePair("ariadneplusTarget", getTarget()));
|
||||
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params, "UTF-8");
|
||||
post.setEntity(ent);
|
||||
HttpClient client = HttpClients.createDefault();
|
||||
|
@ -82,7 +78,10 @@ public abstract class PublishAbstractJobNode extends AsyncJobNode {
|
|||
errors.merge(statusCode, 1, Integer::sum);
|
||||
return statusCode;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
} catch (ConnectException ce) {
|
||||
throw new MSROException("unable to connect to Publisher endpoint" + getPublisherEndpoint());
|
||||
}
|
||||
catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
errors.merge(-1, 1, Integer::sum);
|
||||
}
|
||||
|
@ -105,22 +104,12 @@ public abstract class PublishAbstractJobNode extends AsyncJobNode {
|
|||
|
||||
log.info("publishing completed");
|
||||
if (!errors.isEmpty()) {
|
||||
log.warn("Problems in publishing on "+getTarget()+": "+countOk+"/"+countAll+" see error maps for details");
|
||||
log.warn("Problems in publishing: "+countOk+"/"+countAll+" see error maps for details");
|
||||
}
|
||||
if(countAll == 0) log.warn("0 resources to publish");
|
||||
return Arc.DEFAULT_ARC;
|
||||
}
|
||||
|
||||
public abstract String getTarget();
|
||||
|
||||
public String getInputEprParam() {
|
||||
return this.inputEprParam;
|
||||
}
|
||||
|
||||
public void setInputEprParam(final String inputEprParam) {
|
||||
this.inputEprParam = inputEprParam;
|
||||
}
|
||||
|
||||
public String getPublisherEndpoint() {
|
||||
return publisherEndpoint;
|
||||
}
|
||||
|
@ -137,4 +126,12 @@ public abstract class PublishAbstractJobNode extends AsyncJobNode {
|
|||
this.resultSetClient = resultSetClient;
|
||||
}
|
||||
|
||||
public String getEprParam() {
|
||||
return eprParam;
|
||||
}
|
||||
|
||||
public void setEprParam(String eprParam) {
|
||||
this.eprParam = eprParam;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package eu.dnetlib.ariadneplus.workflows.nodes;
|
||||
|
||||
public class PublishJRRJobNode extends PublishAbstractJobNode {
|
||||
|
||||
@Override
|
||||
public String getTarget() {
|
||||
return "JRR";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package eu.dnetlib.ariadneplus.workflows.nodes;
|
||||
|
||||
public class PublishVirtuosoJobNode extends PublishAbstractJobNode {
|
||||
|
||||
@Override
|
||||
public String getTarget() {
|
||||
return "VIRTUOSO";
|
||||
}
|
||||
|
||||
}
|
|
@ -14,21 +14,21 @@ import org.apache.http.client.utils.URIBuilder;
|
|||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
public class UnpublishVirtuosoJobNode extends AsyncJobNode {
|
||||
public class UnpublishGraphDBJobNode extends AsyncJobNode {
|
||||
|
||||
private static final Log log = LogFactory.getLog(UnpublishVirtuosoJobNode.class);
|
||||
private static final Log log = LogFactory.getLog(UnpublishGraphDBJobNode.class);
|
||||
|
||||
private String datasourceInterface;
|
||||
private String publisherEndpoint;
|
||||
|
||||
@Override
|
||||
protected String execute(final Env env) throws Exception {
|
||||
URI getURI = new URIBuilder(getPublisherEndpoint()).addParameter("datasourceApi", getDatasourceInterface()).addParameter("ariadneplusTarget", "VIRTUOSO").build();
|
||||
URI getURI = new URIBuilder(getPublisherEndpoint()).addParameter("datasourceApi", getDatasourceInterface()).build();
|
||||
HttpClient c = HttpClients.createDefault();
|
||||
HttpResponse res = c.execute(new HttpGet(getURI));
|
||||
String nTriples = EntityUtils.toString(res.getEntity());
|
||||
|
||||
log.info("Deleted " + nTriples + " triples in Virtuoso server");
|
||||
log.info("Deleted " + nTriples + " triples in GraphDB server");
|
||||
|
||||
env.setAttribute("triples", nTriples);
|
||||
return Arc.DEFAULT_ARC;
|
|
@ -5,28 +5,18 @@
|
|||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">
|
||||
|
||||
<bean id="wfNodeReportReader"
|
||||
class="eu.dnetlib.ariadneplus.workflows.nodes.ReportReaderJobNode"
|
||||
scope="prototype"/>
|
||||
<bean id="wfNodeReportReader" class="eu.dnetlib.ariadneplus.workflows.nodes.ReportReaderJobNode" scope="prototype"/>
|
||||
|
||||
<bean id="wfNodePublishVirtuoso"
|
||||
class="eu.dnetlib.ariadneplus.workflows.nodes.PublishVirtuosoJobNode"
|
||||
scope="prototype"/>
|
||||
<bean id="wfNodePublishGraphDB" class="eu.dnetlib.ariadneplus.workflows.nodes.PublishGraphDBJobNode" scope="prototype"/>
|
||||
|
||||
<bean id="wfNodePublishJRR"
|
||||
class="eu.dnetlib.ariadneplus.workflows.nodes.PublishJRRJobNode"
|
||||
scope="prototype"/>
|
||||
|
||||
<bean id="wfNodeUnpublishVirtuoso"
|
||||
class="eu.dnetlib.ariadneplus.workflows.nodes.UnpublishVirtuosoJobNode"
|
||||
scope="prototype"/>
|
||||
|
||||
<bean id="wfNodeClarinAPIGenerator" class="eu.dnetlib.ariadneplus.workflows.nodes.ClarinAPIGeneratorJobNode" scope="prototype"/>
|
||||
<bean id="wfNodeRegisterClarinWorkflowFromTemplate" class="eu.dnetlib.ariadneplus.workflows.nodes.RegisterClarinWorkflowFromTemplateJobNode" scope="prototype"/>
|
||||
<bean id="wfNodeUnpublishGraphDB" class="eu.dnetlib.ariadneplus.workflows.nodes.UnpublishGraphDBJobNode" scope="prototype"/>
|
||||
|
||||
<bean id="wfNodeReadVirtuoso" class="eu.dnetlib.ariadneplus.workflows.nodes.ReadVirtuosoJobNode" scope="prototype"/>
|
||||
<bean id="wfNodeReadVirtuosoByType" class="eu.dnetlib.ariadneplus.workflows.nodes.ReadVirtuosoByTypeJobNode" scope="prototype"/>
|
||||
|
||||
<bean id="wfNodeX3MTransformAriadnePlus" class="eu.dnetlib.ariadneplus.workflows.nodes.X3MTransformAriadnePlusJobNode" scope="prototype"/>
|
||||
|
||||
<bean id="wfNodeElasticSearchIndex" class="eu.dnetlib.ariadneplus.workflows.nodes.ElasticSearchIndexJobNode" scope="prototype"/>
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<PARAM name="indexId" description="Identifier of the Index" required="true" managedBy="system" category="INDEX_ID"/>
|
||||
<PARAM name="indexInterpretation" description="Index Interpretation" required="true" managedBy="system" type="string">public</PARAM>
|
||||
<PARAM name="feedingType" description="Index feeding type" required="true" managedBy="user" type="string" function="validValues(['REFRESH','INCREMENTAL'])">REFRESH</PARAM>
|
||||
<PARAM name="publisherEndpoint" description="AriadnePlus Publisher Endpoint" required="true" managedBy="user" type="string">http://beta-ariadneplus.d4science.org:8080/ariadneplus/publish</PARAM>
|
||||
<PARAM name="publisherEndpoint" description="AriadnePlus Publisher Endpoint" required="true" managedBy="user" type="string">http://localhost:8080/ariadneplus/publish</PARAM>
|
||||
</PARAMETERS>
|
||||
<WORKFLOW>
|
||||
<NODE name="virtuoso" type="LaunchWorkflowTemplate" isStart="true">
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
<DATASOURCE id="$dsId$" interface="$interface$" />
|
||||
<CONFIGURATION status="WAIT_SYS_SETTINGS" start="MANUAL">
|
||||
<PARAMETERS>
|
||||
<PARAM name="publisherEndpoint" description="AriadnePlus Publisher Endpoint" required="true" managedBy="user" type="string">http://beta-ariadneplus.d4science.org:8080/ariadneplus/unpublish</PARAM>
|
||||
<PARAM name="publisherEndpoint" description="AriadnePlus Publisher Endpoint" required="true" managedBy="user" type="string">http://localhost:8080/ariadneplus/unpublish</PARAM>
|
||||
</PARAMETERS>
|
||||
<WORKFLOW>
|
||||
<NODE name="unpublishVirtuoso" type="UnpublishVirtuoso" isStart="true">
|
||||
<DESCRIPTION>Drop from Virtuoso</DESCRIPTION>
|
||||
<NODE name="unpublishGraphDB" type="UnpublishGraphDB" isStart="true">
|
||||
<DESCRIPTION>Drop from GraphDB</DESCRIPTION>
|
||||
<PARAMETERS>
|
||||
<PARAM name="publisherEndpoint" ref="publisherEndpoint"/>
|
||||
<PARAM name="datasourceInterface" value="$interface$" />
|
||||
|
@ -29,7 +29,6 @@
|
|||
<ARC to="success"/>
|
||||
</ARCS>
|
||||
</NODE>
|
||||
<!-- TODO: Add node to unpublish from JRR -->
|
||||
</WORKFLOW>
|
||||
<DESTROY_WORKFLOW_TEMPLATE id="23ef4bb3-2383-45b4-9661-ab03472fcd52_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ==">
|
||||
<PARAMETERS/>
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
<PARAM name="indexInterpretation" description="Index Interpretation" required="true" managedBy="system" type="string">transformed</PARAM>
|
||||
<PARAM name="feedingType" description="Index feeding type" required="true" managedBy="user" type="string" function="validValues(['REFRESH','INCREMENTAL'])">REFRESH</PARAM>
|
||||
<PARAM name="mappingUrl" description="mapping url" required="true" managedBy="user" type="string" ></PARAM>
|
||||
</PARAMETERS>
|
||||
<PARAM name="publisherEndpoint" description="AriadnePlus Publisher Endpoint" required="true" managedBy="user" type="string">http://localhost:8080/ariadneplus/publish</PARAM>
|
||||
</PARAMETERS>
|
||||
<WORKFLOW>
|
||||
<NODE isStart="true" name="collection" type="LaunchWorkflowTemplate">
|
||||
<DESCRIPTION>Collect metadata</DESCRIPTION>
|
||||
|
@ -94,6 +95,23 @@
|
|||
</MAP>
|
||||
</PARAM>
|
||||
</PARAMETERS>
|
||||
<ARCS>
|
||||
<ARC to="publishToGraphDB"/>
|
||||
</ARCS>
|
||||
</NODE>
|
||||
<NODE name="publishToGraphDB" type="LaunchWorkflowTemplate">
|
||||
<DESCRIPTION>Publish records to GraphDB</DESCRIPTION>
|
||||
<PARAMETERS>
|
||||
<PARAM name="wfTemplateId" value="7426eaaf-93c9-4914-b69a-c9d5c478405a_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/>
|
||||
<PARAM name="wfTemplateParams">
|
||||
<MAP>
|
||||
<ENTRY key="dsId" value="d52b32f0-2b19-4bef-930d-470ef044def5_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU="/>
|
||||
<ENTRY key="interface" value="api_________::ariadne_plus::ads::1"/>
|
||||
<ENTRY key="cleanMdstoreId" ref="cleanMdstoreId"/>
|
||||
<ENTRY key="publisherEndpoint" ref="publisherEndpoint" />
|
||||
</MAP>
|
||||
</PARAM>
|
||||
</PARAMETERS>
|
||||
<ARCS>
|
||||
<ARC to="success"/>
|
||||
</ARCS>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<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" suffixToBaseUrl="aaa">ads</ACCESS_PROTOCOL>
|
||||
<ACCESS_PROTOCOL splitOnElement="record">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>
|
||||
|
@ -44,7 +44,7 @@
|
|||
<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>
|
||||
<ACCESS_PROTOCOL splitOnElement="record">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>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<RESOURCE_PROFILE>
|
||||
<HEADER>
|
||||
<RESOURCE_IDENTIFIER value="7426eaaf-93c9-4914-b69a-c9d5c478405a_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/>
|
||||
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/>
|
||||
<RESOURCE_KIND value="WorkflowTemplateDSResources"/>
|
||||
<RESOURCE_URI value=""/>
|
||||
<DATE_OF_CREATION value="2019-10-24T16:53:35+02:00"/>
|
||||
</HEADER>
|
||||
<BODY>
|
||||
<CONFIGURATION>
|
||||
<PARAMETERS>
|
||||
<PARAM description="Datasource Id" name="dsId" required="true" type="string"/>
|
||||
<PARAM description="Datasource Interface" name="interface" required="true" type="string"/>
|
||||
<PARAM description="Store for transformed records" name="cleanMdstoreId" required="true" type="string"/>
|
||||
<PARAM name="publisherEndpoint" description="AriadnePlus Publisher Endpoint" required="true" managedBy="user" type="string">http://localhost:8080/ariadneplus/publish</PARAM>
|
||||
</PARAMETERS>
|
||||
<WORKFLOW>
|
||||
<NODE isStart="true" name="fetchMdStore" type="FetchMDStoreRecords">
|
||||
<DESCRIPTION>Fetch records from MDStore</DESCRIPTION>
|
||||
<PARAMETERS>
|
||||
<PARAM name="mdId" ref="cleanMdstoreId"/>
|
||||
<PARAM name="eprParam" value="clean_epr"/>
|
||||
</PARAMETERS>
|
||||
<ARCS>
|
||||
<ARC to="publishToGraphDB"/>
|
||||
</ARCS>
|
||||
</NODE>
|
||||
<NODE name="publishToGraphDB" type="PublishGraphDB">
|
||||
<DESCRIPTION>Feed records to GraphDB</DESCRIPTION>
|
||||
<PARAMETERS>
|
||||
<PARAM name="eprParam" value="clean_epr"/>
|
||||
<PARAM name="publisherEndpoint" ref="publisherEndpoint"/>
|
||||
</PARAMETERS>
|
||||
<ARCS>
|
||||
<ARC to="success"/>
|
||||
</ARCS>
|
||||
</NODE>
|
||||
</WORKFLOW>
|
||||
</CONFIGURATION>
|
||||
</BODY>
|
||||
</RESOURCE_PROFILE>
|
Loading…
Reference in New Issue