SlideShare uma empresa Scribd logo
1 de 37
Baixar para ler offline
Introduction to metadata cleansing 
using SPARQL update queries 
April 2014 PwC EU Services
Learning objectives 
By the end of this module, you will have an understanding of: 
How to transform your metadata using simple SPARQL Update queries 
How to conform to the ADMS-AP to get your interoperability solutions ready to be shared on Joinup 
The main types of errors that you could face when uploading metadata of interoperability solutions on Joinup 
2
How can this tutorial help you? 
Interoperability solutions’ owners may have the possibility to generate automatically in RDF the descriptive metadata of their solutions. Sometimes, this metadata may not be conform to the ADMS Application Profile for Joinup (ADMS-AP), preventing it from being uploaded on Joinup. 
This tutorial provides basic knowledge on how to transform and cleanse RDF metadata using SPARQL Update queries in order to conform to the ADMS- AP. 
SPARQL is the query language for RDF and also allows for creating, updating and deleting RDF triples. 
“Since its launch in 2011 Joinup has been steadily growing in popularity. It currently receives more than 60.000 visits per month and is hosting some 130 online communities.” 
3 
3 
ADMS-AP: https://joinup.ec.europa.eu/asset/adms/asset_release/adms- application-profile-joinup
Outline 
•ADMS-AP for describing your interoperability solutions 
•About SPARQL 
•About RDF 
1. The context 
•Why? 
•Construct queries 
2. Construct ADMS-AP compliant RDF 
•Why? 
•The main queries 
•3 examples 
3. Metadata cleansing 
4. Metadata upload to Joinup 
4
What is the ADMS Application Profile for Joinup (ADMS-AP) 
•The Asset Description Metadata Schema Application Profile is a common vocabulary used for all type of interoperability solutions. 
•It allows interoperability solutions providers to describe their solutions and easily upload the descriptions on Joinup. 
•It allows users to easily discover and re-use interoperability solutions coming from Joinup using a common vocabulary. 
5
ADMS-AP for describing your interoperability solutions on Joinup 
Repository 
Repository 
ADMS-AP 
Your repository 
Repository 
Using the ADMS Application Profile 
Public administrations 
Academic 
Standardisation bodies 
Businesses 
Explore Find Select Obtain 
6
Automatic or manual path to generate ADMS-AP 
Cleansing with SPARQL 
Interoperability solutions 
Transformation with Open Refine 
This tutorial focuses on the automatic path to generate ADMS-AP compliant RDF. 
See how to transform with Open Refine: https://joinup.ec.europa.eu/svn/adms/trainings/Introduction_to_Open_Refine_RDF_tool.pptx 
7
SPARQL Protocol and RDF Query Language (SPARQL) 
SPARQL is the standard language to query graph data represented as RDF triples. 
oOne of the three core standards of the Semantic Web, along with RDF and OWL. 
oBecame a W3C standard January 2008. 
oSPARQL 1.1 standard as of 2013. 
8
The Resource Description Framework (RDF) 
RDF represents data as (subject, predicate, object) triples. A set of triples is an RDF graph. 
rdf:type 
dct:title 
http://myasset.eu/ 
adms:Asset 
My asset name 
Resources (URIs), often abbreviated 
•Resources 
•Plain literals: “Text”, “Text”@en 
•Typed literals: “42”^^xsd:integer, “2014-01-01”^^xsd:date 
NB: subjects and objects may also be blank nodes. 
9
A graph can be represented with different syntaxes 
•RDF/XML required by Joinup 
•Turtle used in SPARQL and in this tutorial 
<rdf:Description about=“http://myasset.eu/”> 
<rdf:type rdf:resource=“http://www.w3.org/ns/adms#Asset”/> 
<dct:title>My asset name</dct:title> 
<dct:description>Description of the asset</dct:description> 
<dct:modified rdf:datatype=“http://www.w3.org/2001/XMLSchema#dateTime”> 
2014-01-01T00:00:00Z 
</dct:modified> 
</rdf:Description> 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My asset name” ; 
dct:description “Description of the asset” ; 
dct:modified “2014-01-01T00:00:00Z”^^xsd:dateTime . 
Syntaxes are equivalent. It is easy to transform one into another. 
10
SPARQL is a query language for RDF data 
SELECT * WHERE { 
?asset a adms:Asset ; 
dct:title ?title . 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My asset name” ; 
dct:description “Description of the asset” ; 
dct:modified “2014-01-01T00:00:00Z”^^xsd:dateTime . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your asset name” ; 
dct:description “Another asset” . 
?asset 
?title 
<http://myasset.eu/> 
“My asset name” 
<http://yourasset.eu/> 
“Your asset name” 
Results: 
Query: 
Graph pattern: an RDF graph with placeholder variables (e.g., ?asset) 
11
SPARQL queries have many forms 
SPARQL CONSTRUCT to transform one graph into another (used for creating ADMS-AP from existing RDF) 
SPARQL Update to modify a graph in place (used to cleanse ADMS-AP metadata) 
SPARQL SELECT to query data from a graph 
(not used in this tutorial) 
12
A useful tool to transform RDF files 
•Used to create and edit RDF files and run SPARQL queries over them. 
•A free version is also available. 
For download: 
http://www.topquadrant.com/downloads/ 
“TopBraid Composer is the leading industrial-strength RDF editor and OWL ontology editor, as well as the best SPARQL tool on the market.” 
Source: http://semanticweb.org/ 
13
Outline 
•ADMS-AP for describing your interoperability solutions 
•About SPARQL 
•About RDF 
1. The context 
•Why? 
•Construct queries 
2. Construct ADMS-AP compliant RDF 
•Why? 
•The main queries 
•3 examples 
3. Cleanse metadata 
4. Metadata upload to Joinup 
14
Construct ADMS-AP from existing RDF Why? 
•You may already have the metadata description of your interoperability solutions in a RDF file that is not compliant with ADMS-AP (e.g. missing out on mandatory properties or on the use of recommended controlled vocabularies). 
•The following slides help you to create a compliant ADMS-AP RDF graph from your initial RDF. 
15
Construct ADMS-AP from existing RDF 
… using a SPARQL CONSTRUCT query 
CONSTRUCT { 
?asset a adms:Asset ; 
dct:title ?title ; 
dct:description ?description ; 
dct:modified ?modified ; 
dct:type <http://purl.org/adms/assettype/Ontology> ; 
dct:relation ?related ; 
dcat:distribution ?d . 
?d a adms:AssetDistribution ; 
dcat:accessURL ?asset . 
} WHERE { 
?asset a voaf:Vocabulary ; 
dct:title ?title ; 
dct:description ?description ; 
dct:modified ?modified . 
OPTIONAL { ?asset voaf:similar ?related } 
BIND(IRI(CONCAT(STR(?asset), "?type=distribution")) AS ?d) 
} 
Result graph to construct 
Graph pattern to query 
Recommended and optional fields 
Construct new URIs using expressions 
16
Construct ADMS-AP from existing RDF 
… the result is a new RDF graph 
17 
<http://data.lirmm.fr/ontologies/food> 
a voaf:Vocabulary ; 
dct:title “Food Ontology”@en ; 
dct:description “This ontology…”@en ; 
dct:modified “2013-09-24” ; 
voaf:similar <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food> . 
<http://www.w3.org/TR/2003/PR-owl-guide-20031215/food> 
a voaf:Vocabulary ; 
dct:title “Food Ontology in OWL”@en ; 
dct:description “Along with…”@en ; 
dct:modified “2003-12-15” . 
<http://data.lirmm.fr/ontologies/food> 
a adms:Asset ; 
dct:title “Food Ontology”@en ; 
dct:description “This ontology…”@en ; 
dct:modified “2013-09-24” ; 
dct:type <http://purl.org/adms/assettype/Ontology> ; 
dct:relation 
<http://www.w3.org/TR/2003/PR-owl-guide-20031215/food> ; 
dcat:distribution 
<http://data.lirmm.fr/ontologies/food?type=distribution> . 
<http://data.lirmm.fr/ontologies/food?type=distribution> 
a adms:AssetDistribution ; 
dcat:accessURL <http://data.lirmm.fr/ontologies/food> . 
<http://www.w3.org/TR/2003/PR-owl-guide-20031215/food> 
a adms:Asset ; 
dct:title “Food Ontology in OWL”@en ; 
dct:description “Along with…”@en ; 
dct:modified “2003-12-15” ; 
dct:type <http://purl.org/adms/assettype/Ontology> ; 
dcat:distribution <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food?type=distribution> . 
<http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food?type=distribution> 
a adms:AssetDistribution ; 
dcat:accessURL <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food> . 
Example from the Linked Open Vocabulary repository. 
17
Outline 
•ADMS-AP for describing your interoperability solutions 
•About SPARQL 
•About RDF 
1. The context 
•Why? 
•Construct queries 
2. Construct ADMS-AP compliant RDF 
•Why? 
•The main queries 
•3 examples 
3. Metadata cleansing 
4. Metadata upload to Joinup 
18
Metadata cleansing Why? 
•You may need to make some small modifications to your RDF graph in order to have it fully compliant to ADMS-AP 
•Only ADMS-AP compliant descriptive metadata can be uploaded on Joinup. 
•Joinup has a built-in ADMS-AP validation feature to help you pinpoint inconsistencies with the standard. 
19
Metadata cleansing … with SPARQL update queries 
•Add static triples (INSERT DATA) 
•Remove static triples (DELETE DATA) 
•Modify static triples (combine INSERT DATA and DELETE DATA) 
•Add triples based on query results (INSERT) 
•Remove triples based on query results (DELETE) 
•Modify triples based on query results (DELETE/INSERT) 
For more info: 
http://www.w3.org/TR/sparql11-update/#graphUpdate 
https://joinup.ec.europa.eu/community/ods/document/tm13-introduction-rdf-sparql-en 
20
Metadata cleansing … add static triples 
<http://myasset.eu/> 
a adms:Asset ; 
dct:description “Description…” . 
INSERT DATA { 
<http://myasset.eu/> dct:title “Asset name”@en . 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…” . 
Before: 
After: 
Query: 
Example: add the title of a specific interoperability solution (modelled as an adms:Asset) 
21
Metadata cleansing 
… remove static triples 
Example: remove an erroneous date of a specific asset 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…” ; 
dct:issued “2242-01-01”^^xsd:date . 
DELETE DATA { 
<http://myasset.eu/> dct:issued “2242-01-01”^^xsd:date . 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…” . 
Before: 
After: 
Query: 
22
Metadata cleansing 
… modify static triples 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…” . 
DELETE DATA { 
<http://myasset.eu/> dct:title “Asset name”@en . 
} 
INSERT DATA { 
<http://myasset.eu/> dct:title “My asset name”@en . 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My asset name”@en ; 
dct:description “Description…” . 
Before: 
After: 
Query: 
Example: modify the title of a specific asset 
23
Metadata cleansing 
… add triples based on query results 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My Asset Schema” ; 
dct:description “Description…” . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your Asset Vocabulary” . 
INSERT { 
?asset dct:type <http://purl.org/adms/assettype/Schema> . 
} WHERE { 
?asset a adms:Asset ; 
dct:title ?title . 
FILTER(CONTAINS(?title, “Schema”)) 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My Asset Schema” ; 
dct:description “Description…” ; 
dct:type <http://purl.org/adms/assettype/Schema> . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your Asset Vocabulary” . 
Before: 
After: 
Query: 
Example: add asset type for all assets whose name contain “Schema” 
24
Metadata cleansing 
… remove triples based on query results 
Example: remove all asset modification dates in the future 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:modified 
“2242-01-01T00:00:00Z”^^xsd:dateTime . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your Asset Vocabulary” ; 
dct:modified 
“2000-08-12T11:42:22Z”^^xsd:dateTime . 
DELETE { 
?asset dct:modified ?date . 
} WHERE { 
?asset a adms:Asset ; 
dct:modified ?date . 
FILTER(?date > NOW()) 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…” . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your Asset Vocabulary” ; 
dct:modified 
“2000-08-12T11:42:22Z”^^xsd:dateTime . 
Before: 
After: 
Query: 
25
Metadata cleansing 
… modify triples based on query results 
Example: replace a word in all asset titles 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My grt asset” . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your asset” . 
DELETE { ?asset dct:title ?title . } 
INSERT { ?asset dct:title ?newtitle . } 
WHERE { 
?asset a adms:Asset ; 
dct:title ?title . 
BIND(REPLACE(?title, “grt”, “great”) AS ?newtitle) 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “My great asset” . 
<http://yourasset.eu/> 
a adms:Asset ; 
dct:title “Your asset” . 
Before: 
After: 
Query: 
26
Metadata cleansing 
Proposed fixes for 3 common issues 
•Ensure all text fields have a language tag 
•Transform date strings into xsd:dateTime values 
•Add missing asset modification dates 
27
Metadata cleansing 
Ensure all text fields have a language tag 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name” ; 
dct:description “Description…”@en . 
DELETE { ?s ?p ?o . } 
INSERT { ?s ?p ?olang . } 
WHERE { 
?s ?p ?o . 
FILTER(?p IN (foaf:name, dct:title, dct:description)) 
FILTER(LANG(?o) = “”) 
BIND(STRLANG(?o, “en”) AS ?olang) 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…”@en . 
Before: 
After: 
Query: 
28
Metadata cleansing 
Transform “YYYY-MM-DD” strings into xsd:dateTime values 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…”@en ; 
dct:modified “2014-02-24” . 
DELETE { ?s dct:modified ?str . } 
INSERT { ?s dct:modified ?date . } 
WHERE { 
?s dct:modified ?str . 
BIND(xsd:dateTime(CONCAT(?str, “T00:00:00Z”)) AS ?date) 
} 
<http://myasset.eu/> 
a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:description “Description…”@en ; 
dct:modified 
“2014-02-24T00:00:00Z”^^xsd:dateTime . 
Before: 
After: 
Query: 
29
Metadata cleansing 
Add missing asset modification dates, copying the creation date 
<http://myasset.eu/> a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:issued 
“2014-02-24T00:00:00Z”^^xsd:dateTime . 
<http://yourasset.eu/> a adms:Asset ; 
dct:title “Your asset”@en ; 
dct:issued 
“2012-01-01T00:00:00Z”^^xsd:dateTime ; 
dct:modified 
“2014-03-04T00:00:00Z”^^xsd:dateTime . 
INSERT { 
?asset dct:modified ?date . 
} WHERE { 
?asset a adms:Asset ; 
dct:issued ?date . 
FILTER NOT EXISTS { ?asset dct:modified ?modified } 
} 
<http://myasset.eu/> a adms:Asset ; 
dct:title “Asset name”@en ; 
dct:issued 
“2014-02-24T00:00:00Z”^^xsd:dateTime ; 
dct:modified 
“2014-02-24T00:00:00Z”^^xsd:dateTime . 
<http://yourasset.eu/> a adms:Asset ; 
dct:title “Your asset”@en ; 
dct:issued 
“2012-01-01T00:00:00Z”^^xsd:dateTime ; 
dct:modified 
“2014-03-04T00:00:00Z”^^xsd:dateTime . 
Before: 
After: 
Query: 
30
Outline 
•ADMS-AP for describing your interoperability solutions 
•About SPARQL 
•About RDF 
1. The context 
•Why? 
•Construct queries 
2. Construct ADMS-AP compliant RDF 
•Why? 
•The main queries 
•3 examples 
3. Metadata cleansing 
4. Metadata upload to Joinup 
31
Metadata upload to Joinup Upload an RDF/XML file to Joinup 
1.On your repository page, click on “Upload metadata” 
2.Select the RDF/XML file 
3.Click on “Upload the metadata file” 
32 
1 
2 
3
1.Log in with your account 
2.Go to the repository page 
3.Click on “Report file” 
Metadata upload to Joinup Get the upload status 
33
Lines have the format: 
Metadata upload to Joinup Reading the upload log 
34 
2013-08-30 17:36:02 INFO - Treatment of the repository … 
Timestamp 
Level 
Message 
INFO 
Information message 
WARN 
Warning (you may ignore it) 
ERROR 
Error (you should fix it)
Related learning resources 
•Introduction to ADMS-AP 
•How to import and export ADMS-AP conform metadata of interoperability solutions on Joinup 
•Introduction to the Open Refine RDF tool 
•Using Joinup as catalogue for interoperability solutions 
•Introduction to the advanced search functionality of EFIR 
35
Disclaimers 
1.The views expressed in this presentation are purely those of the authors and may not, in any circumstances, be interpreted as stating an official position of the European Commission. 
The European Commission does not guarantee the accuracy of the information included in this presentation, nor does it accept any responsibility for any use thereof. 
Reference herein to any specific products, specifications, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favouring by the European Commission. 
All care has been taken by the author to ensure that s/he has obtained, where necessary, permission to use any parts of manuscripts including illustrations, maps, and graphs, on which intellectual property rights already exist from the titular holder(s) of such rights or from her/his or their legal representative. 
2.This presentation has been carefully compiled by PwC, but no representation is made or warranty given (either express or implied) as to the completeness or accuracy of the information it contains. PwC is not liable for the information in this presentation or any decision or consequence based on the use of it. PwC will not be liable for any damages arising from the use of the information contained in this presentation. The information contained in this presentation is of a general nature and is solely for guidance on matters of general interest. This presentation is not a substitute for professional advice on any particular matter. No reader should act on the basis of any matter contained in this publication without considering appropriate professional advice.
Follow @Joinup_EU on Twitter 
Join the CISR community on 
Joinup 
Project Officer Szabolcs.SZEKACS@ec.europa.eu 
Contractors Nikolaos.Loutas@be.pwc.com 
Joan.Bremers@be.pwc.com 
Visit our initiatives Get involved 
ADMS. 
SW 
CISR 
COMMUNITY OF 
INTEROPERABILITY 
SOLUTION 
REPOSITORIES 
37 
Joinup and ADMS are funded 
by the ISA Programme

Mais conteúdo relacionado

Semelhante a Introduction to metadata cleansing using SPARQL update queries

GraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph DatabasesGraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph DatabasesLinkurious
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-descriptionSTIinnsbruck
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 
spark interview questions & answers acadgild blogs
 spark interview questions & answers acadgild blogs spark interview questions & answers acadgild blogs
spark interview questions & answers acadgild blogsprateek kumar
 
An Introduction to Spark
An Introduction to SparkAn Introduction to Spark
An Introduction to Sparkjlacefie
 
An Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark MeetupAn Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark Meetupjlacefie
 
Force11 JDDCP workshop presentation, @ Force2015, Oxford
Force11 JDDCP workshop presentation, @ Force2015, OxfordForce11 JDDCP workshop presentation, @ Force2015, Oxford
Force11 JDDCP workshop presentation, @ Force2015, OxfordMark Wilkinson
 
Apache Spark - Intro to Large-scale recommendations with Apache Spark and Python
Apache Spark - Intro to Large-scale recommendations with Apache Spark and PythonApache Spark - Intro to Large-scale recommendations with Apache Spark and Python
Apache Spark - Intro to Large-scale recommendations with Apache Spark and PythonChristian Perone
 
NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...
NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...
NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...Amazon Web Services
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails SiddheshSiddhesh Bhobe
 
RDFa Semantic Web
RDFa Semantic WebRDFa Semantic Web
RDFa Semantic WebRob Paok
 
Wed roman tut_open_datapub
Wed roman tut_open_datapubWed roman tut_open_datapub
Wed roman tut_open_datapubeswcsummerschool
 
A BASILar Approach for Building Web APIs on top of SPARQL Endpoints
A BASILar Approach for Building Web APIs on top of SPARQL EndpointsA BASILar Approach for Building Web APIs on top of SPARQL Endpoints
A BASILar Approach for Building Web APIs on top of SPARQL EndpointsEnrico Daga
 
TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...
TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...
TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...Debraj GuhaThakurta
 
TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...
TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...
TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...Debraj GuhaThakurta
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPMSGUNC
 
DataGraft Platform: RDF Database-as-a-Service
DataGraft Platform: RDF Database-as-a-ServiceDataGraft Platform: RDF Database-as-a-Service
DataGraft Platform: RDF Database-as-a-ServiceMarin Dimitrov
 
Machine Learning with SparkR
Machine Learning with SparkRMachine Learning with SparkR
Machine Learning with SparkROlgun Aydın
 

Semelhante a Introduction to metadata cleansing using SPARQL update queries (20)

GraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph DatabasesGraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph Databases
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-description
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 
spark interview questions & answers acadgild blogs
 spark interview questions & answers acadgild blogs spark interview questions & answers acadgild blogs
spark interview questions & answers acadgild blogs
 
An Introduction to Spark
An Introduction to SparkAn Introduction to Spark
An Introduction to Spark
 
An Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark MeetupAn Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark Meetup
 
Force11 JDDCP workshop presentation, @ Force2015, Oxford
Force11 JDDCP workshop presentation, @ Force2015, OxfordForce11 JDDCP workshop presentation, @ Force2015, Oxford
Force11 JDDCP workshop presentation, @ Force2015, Oxford
 
Apache Spark - Intro to Large-scale recommendations with Apache Spark and Python
Apache Spark - Intro to Large-scale recommendations with Apache Spark and PythonApache Spark - Intro to Large-scale recommendations with Apache Spark and Python
Apache Spark - Intro to Large-scale recommendations with Apache Spark and Python
 
NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...
NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...
NEW LAUNCH! How to build graph applications with SPARQL and Gremlin using Ama...
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
 
RDFa Semantic Web
RDFa Semantic WebRDFa Semantic Web
RDFa Semantic Web
 
Wed roman tut_open_datapub
Wed roman tut_open_datapubWed roman tut_open_datapub
Wed roman tut_open_datapub
 
A BASILar Approach for Building Web APIs on top of SPARQL Endpoints
A BASILar Approach for Building Web APIs on top of SPARQL EndpointsA BASILar Approach for Building Web APIs on top of SPARQL Endpoints
A BASILar Approach for Building Web APIs on top of SPARQL Endpoints
 
Drupal and the Semantic Web
Drupal and the Semantic WebDrupal and the Semantic Web
Drupal and the Semantic Web
 
TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...
TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...
TDWI Accelerate, Seattle, Oct 16, 2017: Distributed and In-Database Analytics...
 
TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...
TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...
TWDI Accelerate Seattle, Oct 16, 2017: Distributed and In-Database Analytics ...
 
Semantic Web talk TEMPLATE
Semantic Web talk TEMPLATESemantic Web talk TEMPLATE
Semantic Web talk TEMPLATE
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHP
 
DataGraft Platform: RDF Database-as-a-Service
DataGraft Platform: RDF Database-as-a-ServiceDataGraft Platform: RDF Database-as-a-Service
DataGraft Platform: RDF Database-as-a-Service
 
Machine Learning with SparkR
Machine Learning with SparkRMachine Learning with SparkR
Machine Learning with SparkR
 

Último

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Último (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Introduction to metadata cleansing using SPARQL update queries

  • 1. Introduction to metadata cleansing using SPARQL update queries April 2014 PwC EU Services
  • 2. Learning objectives By the end of this module, you will have an understanding of: How to transform your metadata using simple SPARQL Update queries How to conform to the ADMS-AP to get your interoperability solutions ready to be shared on Joinup The main types of errors that you could face when uploading metadata of interoperability solutions on Joinup 2
  • 3. How can this tutorial help you? Interoperability solutions’ owners may have the possibility to generate automatically in RDF the descriptive metadata of their solutions. Sometimes, this metadata may not be conform to the ADMS Application Profile for Joinup (ADMS-AP), preventing it from being uploaded on Joinup. This tutorial provides basic knowledge on how to transform and cleanse RDF metadata using SPARQL Update queries in order to conform to the ADMS- AP. SPARQL is the query language for RDF and also allows for creating, updating and deleting RDF triples. “Since its launch in 2011 Joinup has been steadily growing in popularity. It currently receives more than 60.000 visits per month and is hosting some 130 online communities.” 3 3 ADMS-AP: https://joinup.ec.europa.eu/asset/adms/asset_release/adms- application-profile-joinup
  • 4. Outline •ADMS-AP for describing your interoperability solutions •About SPARQL •About RDF 1. The context •Why? •Construct queries 2. Construct ADMS-AP compliant RDF •Why? •The main queries •3 examples 3. Metadata cleansing 4. Metadata upload to Joinup 4
  • 5. What is the ADMS Application Profile for Joinup (ADMS-AP) •The Asset Description Metadata Schema Application Profile is a common vocabulary used for all type of interoperability solutions. •It allows interoperability solutions providers to describe their solutions and easily upload the descriptions on Joinup. •It allows users to easily discover and re-use interoperability solutions coming from Joinup using a common vocabulary. 5
  • 6. ADMS-AP for describing your interoperability solutions on Joinup Repository Repository ADMS-AP Your repository Repository Using the ADMS Application Profile Public administrations Academic Standardisation bodies Businesses Explore Find Select Obtain 6
  • 7. Automatic or manual path to generate ADMS-AP Cleansing with SPARQL Interoperability solutions Transformation with Open Refine This tutorial focuses on the automatic path to generate ADMS-AP compliant RDF. See how to transform with Open Refine: https://joinup.ec.europa.eu/svn/adms/trainings/Introduction_to_Open_Refine_RDF_tool.pptx 7
  • 8. SPARQL Protocol and RDF Query Language (SPARQL) SPARQL is the standard language to query graph data represented as RDF triples. oOne of the three core standards of the Semantic Web, along with RDF and OWL. oBecame a W3C standard January 2008. oSPARQL 1.1 standard as of 2013. 8
  • 9. The Resource Description Framework (RDF) RDF represents data as (subject, predicate, object) triples. A set of triples is an RDF graph. rdf:type dct:title http://myasset.eu/ adms:Asset My asset name Resources (URIs), often abbreviated •Resources •Plain literals: “Text”, “Text”@en •Typed literals: “42”^^xsd:integer, “2014-01-01”^^xsd:date NB: subjects and objects may also be blank nodes. 9
  • 10. A graph can be represented with different syntaxes •RDF/XML required by Joinup •Turtle used in SPARQL and in this tutorial <rdf:Description about=“http://myasset.eu/”> <rdf:type rdf:resource=“http://www.w3.org/ns/adms#Asset”/> <dct:title>My asset name</dct:title> <dct:description>Description of the asset</dct:description> <dct:modified rdf:datatype=“http://www.w3.org/2001/XMLSchema#dateTime”> 2014-01-01T00:00:00Z </dct:modified> </rdf:Description> <http://myasset.eu/> a adms:Asset ; dct:title “My asset name” ; dct:description “Description of the asset” ; dct:modified “2014-01-01T00:00:00Z”^^xsd:dateTime . Syntaxes are equivalent. It is easy to transform one into another. 10
  • 11. SPARQL is a query language for RDF data SELECT * WHERE { ?asset a adms:Asset ; dct:title ?title . } <http://myasset.eu/> a adms:Asset ; dct:title “My asset name” ; dct:description “Description of the asset” ; dct:modified “2014-01-01T00:00:00Z”^^xsd:dateTime . <http://yourasset.eu/> a adms:Asset ; dct:title “Your asset name” ; dct:description “Another asset” . ?asset ?title <http://myasset.eu/> “My asset name” <http://yourasset.eu/> “Your asset name” Results: Query: Graph pattern: an RDF graph with placeholder variables (e.g., ?asset) 11
  • 12. SPARQL queries have many forms SPARQL CONSTRUCT to transform one graph into another (used for creating ADMS-AP from existing RDF) SPARQL Update to modify a graph in place (used to cleanse ADMS-AP metadata) SPARQL SELECT to query data from a graph (not used in this tutorial) 12
  • 13. A useful tool to transform RDF files •Used to create and edit RDF files and run SPARQL queries over them. •A free version is also available. For download: http://www.topquadrant.com/downloads/ “TopBraid Composer is the leading industrial-strength RDF editor and OWL ontology editor, as well as the best SPARQL tool on the market.” Source: http://semanticweb.org/ 13
  • 14. Outline •ADMS-AP for describing your interoperability solutions •About SPARQL •About RDF 1. The context •Why? •Construct queries 2. Construct ADMS-AP compliant RDF •Why? •The main queries •3 examples 3. Cleanse metadata 4. Metadata upload to Joinup 14
  • 15. Construct ADMS-AP from existing RDF Why? •You may already have the metadata description of your interoperability solutions in a RDF file that is not compliant with ADMS-AP (e.g. missing out on mandatory properties or on the use of recommended controlled vocabularies). •The following slides help you to create a compliant ADMS-AP RDF graph from your initial RDF. 15
  • 16. Construct ADMS-AP from existing RDF … using a SPARQL CONSTRUCT query CONSTRUCT { ?asset a adms:Asset ; dct:title ?title ; dct:description ?description ; dct:modified ?modified ; dct:type <http://purl.org/adms/assettype/Ontology> ; dct:relation ?related ; dcat:distribution ?d . ?d a adms:AssetDistribution ; dcat:accessURL ?asset . } WHERE { ?asset a voaf:Vocabulary ; dct:title ?title ; dct:description ?description ; dct:modified ?modified . OPTIONAL { ?asset voaf:similar ?related } BIND(IRI(CONCAT(STR(?asset), "?type=distribution")) AS ?d) } Result graph to construct Graph pattern to query Recommended and optional fields Construct new URIs using expressions 16
  • 17. Construct ADMS-AP from existing RDF … the result is a new RDF graph 17 <http://data.lirmm.fr/ontologies/food> a voaf:Vocabulary ; dct:title “Food Ontology”@en ; dct:description “This ontology…”@en ; dct:modified “2013-09-24” ; voaf:similar <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food> . <http://www.w3.org/TR/2003/PR-owl-guide-20031215/food> a voaf:Vocabulary ; dct:title “Food Ontology in OWL”@en ; dct:description “Along with…”@en ; dct:modified “2003-12-15” . <http://data.lirmm.fr/ontologies/food> a adms:Asset ; dct:title “Food Ontology”@en ; dct:description “This ontology…”@en ; dct:modified “2013-09-24” ; dct:type <http://purl.org/adms/assettype/Ontology> ; dct:relation <http://www.w3.org/TR/2003/PR-owl-guide-20031215/food> ; dcat:distribution <http://data.lirmm.fr/ontologies/food?type=distribution> . <http://data.lirmm.fr/ontologies/food?type=distribution> a adms:AssetDistribution ; dcat:accessURL <http://data.lirmm.fr/ontologies/food> . <http://www.w3.org/TR/2003/PR-owl-guide-20031215/food> a adms:Asset ; dct:title “Food Ontology in OWL”@en ; dct:description “Along with…”@en ; dct:modified “2003-12-15” ; dct:type <http://purl.org/adms/assettype/Ontology> ; dcat:distribution <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food?type=distribution> . <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food?type=distribution> a adms:AssetDistribution ; dcat:accessURL <http://www.w3.org/TR/2003/PR-owl-guide- 20031215/food> . Example from the Linked Open Vocabulary repository. 17
  • 18. Outline •ADMS-AP for describing your interoperability solutions •About SPARQL •About RDF 1. The context •Why? •Construct queries 2. Construct ADMS-AP compliant RDF •Why? •The main queries •3 examples 3. Metadata cleansing 4. Metadata upload to Joinup 18
  • 19. Metadata cleansing Why? •You may need to make some small modifications to your RDF graph in order to have it fully compliant to ADMS-AP •Only ADMS-AP compliant descriptive metadata can be uploaded on Joinup. •Joinup has a built-in ADMS-AP validation feature to help you pinpoint inconsistencies with the standard. 19
  • 20. Metadata cleansing … with SPARQL update queries •Add static triples (INSERT DATA) •Remove static triples (DELETE DATA) •Modify static triples (combine INSERT DATA and DELETE DATA) •Add triples based on query results (INSERT) •Remove triples based on query results (DELETE) •Modify triples based on query results (DELETE/INSERT) For more info: http://www.w3.org/TR/sparql11-update/#graphUpdate https://joinup.ec.europa.eu/community/ods/document/tm13-introduction-rdf-sparql-en 20
  • 21. Metadata cleansing … add static triples <http://myasset.eu/> a adms:Asset ; dct:description “Description…” . INSERT DATA { <http://myasset.eu/> dct:title “Asset name”@en . } <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…” . Before: After: Query: Example: add the title of a specific interoperability solution (modelled as an adms:Asset) 21
  • 22. Metadata cleansing … remove static triples Example: remove an erroneous date of a specific asset <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…” ; dct:issued “2242-01-01”^^xsd:date . DELETE DATA { <http://myasset.eu/> dct:issued “2242-01-01”^^xsd:date . } <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…” . Before: After: Query: 22
  • 23. Metadata cleansing … modify static triples <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…” . DELETE DATA { <http://myasset.eu/> dct:title “Asset name”@en . } INSERT DATA { <http://myasset.eu/> dct:title “My asset name”@en . } <http://myasset.eu/> a adms:Asset ; dct:title “My asset name”@en ; dct:description “Description…” . Before: After: Query: Example: modify the title of a specific asset 23
  • 24. Metadata cleansing … add triples based on query results <http://myasset.eu/> a adms:Asset ; dct:title “My Asset Schema” ; dct:description “Description…” . <http://yourasset.eu/> a adms:Asset ; dct:title “Your Asset Vocabulary” . INSERT { ?asset dct:type <http://purl.org/adms/assettype/Schema> . } WHERE { ?asset a adms:Asset ; dct:title ?title . FILTER(CONTAINS(?title, “Schema”)) } <http://myasset.eu/> a adms:Asset ; dct:title “My Asset Schema” ; dct:description “Description…” ; dct:type <http://purl.org/adms/assettype/Schema> . <http://yourasset.eu/> a adms:Asset ; dct:title “Your Asset Vocabulary” . Before: After: Query: Example: add asset type for all assets whose name contain “Schema” 24
  • 25. Metadata cleansing … remove triples based on query results Example: remove all asset modification dates in the future <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:modified “2242-01-01T00:00:00Z”^^xsd:dateTime . <http://yourasset.eu/> a adms:Asset ; dct:title “Your Asset Vocabulary” ; dct:modified “2000-08-12T11:42:22Z”^^xsd:dateTime . DELETE { ?asset dct:modified ?date . } WHERE { ?asset a adms:Asset ; dct:modified ?date . FILTER(?date > NOW()) } <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…” . <http://yourasset.eu/> a adms:Asset ; dct:title “Your Asset Vocabulary” ; dct:modified “2000-08-12T11:42:22Z”^^xsd:dateTime . Before: After: Query: 25
  • 26. Metadata cleansing … modify triples based on query results Example: replace a word in all asset titles <http://myasset.eu/> a adms:Asset ; dct:title “My grt asset” . <http://yourasset.eu/> a adms:Asset ; dct:title “Your asset” . DELETE { ?asset dct:title ?title . } INSERT { ?asset dct:title ?newtitle . } WHERE { ?asset a adms:Asset ; dct:title ?title . BIND(REPLACE(?title, “grt”, “great”) AS ?newtitle) } <http://myasset.eu/> a adms:Asset ; dct:title “My great asset” . <http://yourasset.eu/> a adms:Asset ; dct:title “Your asset” . Before: After: Query: 26
  • 27. Metadata cleansing Proposed fixes for 3 common issues •Ensure all text fields have a language tag •Transform date strings into xsd:dateTime values •Add missing asset modification dates 27
  • 28. Metadata cleansing Ensure all text fields have a language tag <http://myasset.eu/> a adms:Asset ; dct:title “Asset name” ; dct:description “Description…”@en . DELETE { ?s ?p ?o . } INSERT { ?s ?p ?olang . } WHERE { ?s ?p ?o . FILTER(?p IN (foaf:name, dct:title, dct:description)) FILTER(LANG(?o) = “”) BIND(STRLANG(?o, “en”) AS ?olang) } <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…”@en . Before: After: Query: 28
  • 29. Metadata cleansing Transform “YYYY-MM-DD” strings into xsd:dateTime values <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…”@en ; dct:modified “2014-02-24” . DELETE { ?s dct:modified ?str . } INSERT { ?s dct:modified ?date . } WHERE { ?s dct:modified ?str . BIND(xsd:dateTime(CONCAT(?str, “T00:00:00Z”)) AS ?date) } <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:description “Description…”@en ; dct:modified “2014-02-24T00:00:00Z”^^xsd:dateTime . Before: After: Query: 29
  • 30. Metadata cleansing Add missing asset modification dates, copying the creation date <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:issued “2014-02-24T00:00:00Z”^^xsd:dateTime . <http://yourasset.eu/> a adms:Asset ; dct:title “Your asset”@en ; dct:issued “2012-01-01T00:00:00Z”^^xsd:dateTime ; dct:modified “2014-03-04T00:00:00Z”^^xsd:dateTime . INSERT { ?asset dct:modified ?date . } WHERE { ?asset a adms:Asset ; dct:issued ?date . FILTER NOT EXISTS { ?asset dct:modified ?modified } } <http://myasset.eu/> a adms:Asset ; dct:title “Asset name”@en ; dct:issued “2014-02-24T00:00:00Z”^^xsd:dateTime ; dct:modified “2014-02-24T00:00:00Z”^^xsd:dateTime . <http://yourasset.eu/> a adms:Asset ; dct:title “Your asset”@en ; dct:issued “2012-01-01T00:00:00Z”^^xsd:dateTime ; dct:modified “2014-03-04T00:00:00Z”^^xsd:dateTime . Before: After: Query: 30
  • 31. Outline •ADMS-AP for describing your interoperability solutions •About SPARQL •About RDF 1. The context •Why? •Construct queries 2. Construct ADMS-AP compliant RDF •Why? •The main queries •3 examples 3. Metadata cleansing 4. Metadata upload to Joinup 31
  • 32. Metadata upload to Joinup Upload an RDF/XML file to Joinup 1.On your repository page, click on “Upload metadata” 2.Select the RDF/XML file 3.Click on “Upload the metadata file” 32 1 2 3
  • 33. 1.Log in with your account 2.Go to the repository page 3.Click on “Report file” Metadata upload to Joinup Get the upload status 33
  • 34. Lines have the format: Metadata upload to Joinup Reading the upload log 34 2013-08-30 17:36:02 INFO - Treatment of the repository … Timestamp Level Message INFO Information message WARN Warning (you may ignore it) ERROR Error (you should fix it)
  • 35. Related learning resources •Introduction to ADMS-AP •How to import and export ADMS-AP conform metadata of interoperability solutions on Joinup •Introduction to the Open Refine RDF tool •Using Joinup as catalogue for interoperability solutions •Introduction to the advanced search functionality of EFIR 35
  • 36. Disclaimers 1.The views expressed in this presentation are purely those of the authors and may not, in any circumstances, be interpreted as stating an official position of the European Commission. The European Commission does not guarantee the accuracy of the information included in this presentation, nor does it accept any responsibility for any use thereof. Reference herein to any specific products, specifications, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favouring by the European Commission. All care has been taken by the author to ensure that s/he has obtained, where necessary, permission to use any parts of manuscripts including illustrations, maps, and graphs, on which intellectual property rights already exist from the titular holder(s) of such rights or from her/his or their legal representative. 2.This presentation has been carefully compiled by PwC, but no representation is made or warranty given (either express or implied) as to the completeness or accuracy of the information it contains. PwC is not liable for the information in this presentation or any decision or consequence based on the use of it. PwC will not be liable for any damages arising from the use of the information contained in this presentation. The information contained in this presentation is of a general nature and is solely for guidance on matters of general interest. This presentation is not a substitute for professional advice on any particular matter. No reader should act on the basis of any matter contained in this publication without considering appropriate professional advice.
  • 37. Follow @Joinup_EU on Twitter Join the CISR community on Joinup Project Officer Szabolcs.SZEKACS@ec.europa.eu Contractors Nikolaos.Loutas@be.pwc.com Joan.Bremers@be.pwc.com Visit our initiatives Get involved ADMS. SW CISR COMMUNITY OF INTEROPERABILITY SOLUTION REPOSITORIES 37 Joinup and ADMS are funded by the ISA Programme