SlideShare a Scribd company logo
1 of 17
Querying Linked Data on
Android
Module 2 adaptation for Android
enabled devices
07.04.2014 1
Outline
• This document complements to webinar
Module 2: Querying Linked Data
• It targets querying linked data on mobile
(Android) devices
• Original queries modified to correspond to
limited resources environments
• Triple store implementation by Ontos AG
(http:// www.ontos.com)
07.04.2014 2
Webinar Structure
• OntoQuad installation instructions
• Deployment of preloaded dataset in
OntoQuad
• Running sample queries against the
OntoQuad SPARQL endpoint
07.04.2014 3
OntoQuad Installation
• RDF store for Android
• Detailed setup instructions already provided
by Ontos AG (attached)
• Fresh installations should be started at least
once to initialize their data directory
structures
• OntoQuad should be completely stopped
before deploying preloaded datasets (next
slides)
07.04.2014 4
Prebuild dataset deployment
• Musicbrainz dataset extract
– 5 million RDF triples subset
– No special hardware requirements (<1GB
external storage)
– Sufficient deployment and query response
times
– Still representative for demonstration and
educational purposes
07.04.2014 5
Prebuild dataset setup
• Download the binary files archive
(musicbrainz-5m-bin.zip) on your PC
• Extract the archive on the local file system
– Important files and folders: ./vm, ./txlogs,
.universe, .commands
• Ensure OntoQuad in not active/running
before performing the next steps
07.04.2014 6
Prebuild dataset setup (2)
• Connect the mobile device via appropriate
USB cable to PC and overwrite the
existing files in folder:
/storage/extSdCard/margot/ with the ones
from the archive
• Disconnect the mobile device and start the
OntoQuad server
07.04.2014 7
Setup Verification
• Start the Admin Console and select the
SPARQL section (it will take some time)
• Execute the following query:
SELECT (COUNT(?s) as ?count)
WHERE { ?s ?p ?o }
• The result count value should be
approximately 5 million
07.04.2014 8
Module 2 for Android
• Based on original Webinar Module 2
content
• SPARQL queries adapted for the extracted
data set and the current implementation
limitations
• Each query description refers to the
original location in the Module 2
presentation
07.04.2014 9
Module 2 for Android (2)
• What albums did Queen make (slide 15) ?
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
SELECT ?album
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album a mo:Release ; dc:title ?title
}
ORDER BY ?title
07.04.2014 10
Module 2 for Android (3)
• What albums and tracks did Queen make
(slide 22) ?
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
SELECT ?album_name ?track_title
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album dc:title ?album_name ;
mo:record ?record .
?record mo:track ?track .
?track dc:title ?track_title . }
07.04.2014 11
Module 2 for Android (4)
• Retrieve the albums and tracks recorded by Queen,
where the duration of the song is more than 300 secs.
and no longer than 400 secs (slide 23)
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
SELECT ?album_name ?track_title ?duration
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album dc:title ?album_name ;
mo:record ?record .
?record mo:track ?track .
?track dc:title ?track_title ;
mo:duration ?duration;
FILTER (?duration > 300000 && ?duration < 400000) }
07.04.2014 12
Module 2 for Android (5)
• Retrieve the name of the albums recorded by
Queen which have at least two different
songs (slide 24)
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
SELECT DISTINCT ?album_name
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album dc:title ?album_name ;
mo:record ?record .
?record mo:track ?track1 .
?record mo:track ?track2 .
FILTER (?track1 != ?track2) }
07.04.2014 13
Module 2 for Android (6)
• Retrieve the duration of the albums recorded by
Queen (slide 25)
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
SELECT ?album ?album_name (SUM(?track_duration) AS ?album_duration)
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album mo:record ?record ;
dc:title ?album_name.
?record mo:track ?track .
?track mo:duration ?track_duration .
}
GROUP BY ?album ?album_name
HAVING (SUM(?track_duration) > 3600000)
07.04.2014 14
Module 2 for Android (7)
• Create the dc:creator descriptions for albums
and their tracks recorded by Queen (slide
29)*
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
CONSTRUCT {
?album dc:creator ?band .
?track dc:creator ?band .}
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album mo:record ?record .
?record mo:track ?track . }
*Note: CONSTRUCT queries might not work properly with the current implementation
07.04.2014 15
Module 2 for Android (8)
• Create the dc:creator descriptions of the
albums recorded by Queen whose title
contains the word 'rock’ (slide 31)*
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
CONSTRUCT { ?album dc:creator ?band }
WHERE {
?band foaf:name "Queen" .
?band foaf:made ?album .
?album dc:title ?album_name .
FILTER (REGEX(?album_name, ".*rock.*", "i"))
}
*Note: CONSTRUCT queries might not work properly with the current implementation
07.04.2014 16
Module 2 for Android
Thank you!
07.04.2014 17

More Related Content

What's hot

SPARQL in the Semantic Web
SPARQL in the Semantic WebSPARQL in the Semantic Web
SPARQL in the Semantic Web
Jan Beeck
 
Lecture linked data cloud & sparql
Lecture linked data cloud & sparqlLecture linked data cloud & sparql
Lecture linked data cloud & sparql
Dhavalkumar Thakker
 
OWL: Yet to arrive on the Web of Data?
OWL: Yet to arrive on the Web of Data?OWL: Yet to arrive on the Web of Data?
OWL: Yet to arrive on the Web of Data?
Aidan Hogan
 
Linked data for librarians
Linked data for librariansLinked data for librarians
Linked data for librarians
trevorthornton
 
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
National Information Standards Organization (NISO)
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
Josef Petrák
 

What's hot (20)

RDFa Tutorial
RDFa TutorialRDFa Tutorial
RDFa Tutorial
 
The Semantic Web #5 - RDF (2)
The Semantic Web #5 - RDF (2)The Semantic Web #5 - RDF (2)
The Semantic Web #5 - RDF (2)
 
SPARQL in the Semantic Web
SPARQL in the Semantic WebSPARQL in the Semantic Web
SPARQL in the Semantic Web
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Lecture linked data cloud & sparql
Lecture linked data cloud & sparqlLecture linked data cloud & sparql
Lecture linked data cloud & sparql
 
OWL: Yet to arrive on the Web of Data?
OWL: Yet to arrive on the Web of Data?OWL: Yet to arrive on the Web of Data?
OWL: Yet to arrive on the Web of Data?
 
쉽게 이해하는 LOD
쉽게 이해하는 LOD쉽게 이해하는 LOD
쉽게 이해하는 LOD
 
The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)
 
Linked data for librarians
Linked data for librariansLinked data for librarians
Linked data for librarians
 
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
NISO/DCMI Webinar: Cooperative Authority Control: The Virtual International A...
 
SWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDFSWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDF
 
Linked (Open) Data
Linked (Open) DataLinked (Open) Data
Linked (Open) Data
 
Publishing and Using Linked Open Data - Day 1
Publishing and Using Linked Open Data - Day 1 Publishing and Using Linked Open Data - Day 1
Publishing and Using Linked Open Data - Day 1
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 
2010 06 ipaw_prv
2010 06 ipaw_prv2010 06 ipaw_prv
2010 06 ipaw_prv
 
Linked Data for Libraries: Experiments between Cornell, Harvard and Stanford
Linked Data for Libraries: Experiments between Cornell, Harvard and StanfordLinked Data for Libraries: Experiments between Cornell, Harvard and Stanford
Linked Data for Libraries: Experiments between Cornell, Harvard and Stanford
 
The Semantics of SPARQL
The Semantics of SPARQLThe Semantics of SPARQL
The Semantics of SPARQL
 
Ontology, Semantic Web and DBpedia
Ontology, Semantic Web and DBpediaOntology, Semantic Web and DBpedia
Ontology, Semantic Web and DBpedia
 
Ontology Web services for Semantic Applications
Ontology Web services for Semantic ApplicationsOntology Web services for Semantic Applications
Ontology Web services for Semantic Applications
 
Bio ontologies and semantic technologies
Bio ontologies and semantic technologiesBio ontologies and semantic technologies
Bio ontologies and semantic technologies
 

Viewers also liked

Microtask Crowdsourcing Applications for Linked Data
Microtask Crowdsourcing Applications for Linked DataMicrotask Crowdsourcing Applications for Linked Data
Microtask Crowdsourcing Applications for Linked Data
EUCLID project
 
Sssc2011 ontologies final
Sssc2011 ontologies finalSssc2011 ontologies final
Sssc2011 ontologies final
Elena Simperl
 
Online Learning and Linked Data: An Introduction
Online Learning and Linked Data: An IntroductionOnline Learning and Linked Data: An Introduction
Online Learning and Linked Data: An Introduction
EUCLID project
 
Best Practices for Linked Data Education
Best Practices for Linked Data EducationBest Practices for Linked Data Education
Best Practices for Linked Data Education
EUCLID project
 
Speech Technology and Big Data
Speech Technology and Big DataSpeech Technology and Big Data
Speech Technology and Big Data
EUCLID project
 

Viewers also liked (20)

Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
Usage of Linked Data: Introduction and Application Scenarios
Usage of Linked Data: Introduction and Application ScenariosUsage of Linked Data: Introduction and Application Scenarios
Usage of Linked Data: Introduction and Application Scenarios
 
Mapping Relational Databases to Linked Data
Mapping Relational Databases to Linked DataMapping Relational Databases to Linked Data
Mapping Relational Databases to Linked Data
 
Microtask Crowdsourcing Applications for Linked Data
Microtask Crowdsourcing Applications for Linked DataMicrotask Crowdsourcing Applications for Linked Data
Microtask Crowdsourcing Applications for Linked Data
 
Scaling up Linked Data
Scaling up Linked DataScaling up Linked Data
Scaling up Linked Data
 
Building Linked Data Applications
Building Linked Data ApplicationsBuilding Linked Data Applications
Building Linked Data Applications
 
Datos malos, robots tristes
Datos malos, robots tristesDatos malos, robots tristes
Datos malos, robots tristes
 
Sssc2011 ontologies final
Sssc2011 ontologies finalSssc2011 ontologies final
Sssc2011 ontologies final
 
Online Learning and Linked Data: An Introduction
Online Learning and Linked Data: An IntroductionOnline Learning and Linked Data: An Introduction
Online Learning and Linked Data: An Introduction
 
Best Practices for Linked Data Education
Best Practices for Linked Data EducationBest Practices for Linked Data Education
Best Practices for Linked Data Education
 
Speech Technology and Big Data
Speech Technology and Big DataSpeech Technology and Big Data
Speech Technology and Big Data
 
Creation of visualizations based on Linked Data
Creation of visualizations based on Linked DataCreation of visualizations based on Linked Data
Creation of visualizations based on Linked Data
 
Visualizations using Visualbox
Visualizations using VisualboxVisualizations using Visualbox
Visualizations using Visualbox
 
Web Techologies and Privacy policies for the Smart Grid
Web Techologies and Privacy policies for the Smart GridWeb Techologies and Privacy policies for the Smart Grid
Web Techologies and Privacy policies for the Smart Grid
 
Data Science Curriculum for Professionals
Data Science Curriculum for ProfessionalsData Science Curriculum for Professionals
Data Science Curriculum for Professionals
 
Providing Linked Data
Providing Linked DataProviding Linked Data
Providing Linked Data
 
Ontologies in architecture, engineering and construction (AEC)
Ontologies in architecture, engineering and construction (AEC)Ontologies in architecture, engineering and construction (AEC)
Ontologies in architecture, engineering and construction (AEC)
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data Tutorial
 
Relational Database to RDF (RDB2RDF)
Relational Database to RDF (RDB2RDF)Relational Database to RDF (RDB2RDF)
Relational Database to RDF (RDB2RDF)
 
Interlinking Online Communities and Enriching Social Software with the Semant...
Interlinking Online Communities and Enriching Social Software with the Semant...Interlinking Online Communities and Enriching Social Software with the Semant...
Interlinking Online Communities and Enriching Social Software with the Semant...
 

Similar to Querying Linked Data on Android

ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQLESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
eswcsummerschool
 
Mgangler Virtualization
Mgangler VirtualizationMgangler Virtualization
Mgangler Virtualization
Secure-24
 

Similar to Querying Linked Data on Android (20)

ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQLESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: Introduction to SPARQL
 
Mgangler Virtualization
Mgangler VirtualizationMgangler Virtualization
Mgangler Virtualization
 
Building aosp
Building aospBuilding aosp
Building aosp
 
Easy Access of NASA HDF data via OPeNDAP
Easy Access of NASA HDF data via OPeNDAPEasy Access of NASA HDF data via OPeNDAP
Easy Access of NASA HDF data via OPeNDAP
 
Easy Remote Access Via OPeNDAP
Easy Remote Access Via OPeNDAPEasy Remote Access Via OPeNDAP
Easy Remote Access Via OPeNDAP
 
HDF-Java Products
HDF-Java ProductsHDF-Java Products
HDF-Java Products
 
Opnfv primer how to get into opnfv
Opnfv primer  how to get into opnfv Opnfv primer  how to get into opnfv
Opnfv primer how to get into opnfv
 
Oracle-11g-upgrade
Oracle-11g-upgradeOracle-11g-upgrade
Oracle-11g-upgrade
 
IGUANA: A Generic Framework for Benchmarking the Read-Write Performance of Tr...
IGUANA: A Generic Framework for Benchmarking the Read-Write Performance of Tr...IGUANA: A Generic Framework for Benchmarking the Read-Write Performance of Tr...
IGUANA: A Generic Framework for Benchmarking the Read-Write Performance of Tr...
 
Aosp+
Aosp+Aosp+
Aosp+
 
The New HDF-EOS WebSite - How it can help you
The New HDF-EOS WebSite - How it can help youThe New HDF-EOS WebSite - How it can help you
The New HDF-EOS WebSite - How it can help you
 
Doag data replication with oracle golden gate: Looking behind the scenes
Doag data replication with oracle golden gate: Looking behind the scenesDoag data replication with oracle golden gate: Looking behind the scenes
Doag data replication with oracle golden gate: Looking behind the scenes
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdf
 
Virtuoso RDF Triple Store Analysis Benchmark & mapping tools RDF / OO
Virtuoso RDF Triple Store Analysis Benchmark & mapping tools RDF / OOVirtuoso RDF Triple Store Analysis Benchmark & mapping tools RDF / OO
Virtuoso RDF Triple Store Analysis Benchmark & mapping tools RDF / OO
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
Bio2RDF@BH2010
Bio2RDF@BH2010Bio2RDF@BH2010
Bio2RDF@BH2010
 
Alfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
Alfresco Day Vienna 2015 - Technical Track - Developer Platform UpdatesAlfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
Alfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
 
AGROVOC GACS Working Group
AGROVOC GACS Working GroupAGROVOC GACS Working Group
AGROVOC GACS Working Group
 
Smpe
SmpeSmpe
Smpe
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Querying Linked Data on Android

  • 1. Querying Linked Data on Android Module 2 adaptation for Android enabled devices 07.04.2014 1
  • 2. Outline • This document complements to webinar Module 2: Querying Linked Data • It targets querying linked data on mobile (Android) devices • Original queries modified to correspond to limited resources environments • Triple store implementation by Ontos AG (http:// www.ontos.com) 07.04.2014 2
  • 3. Webinar Structure • OntoQuad installation instructions • Deployment of preloaded dataset in OntoQuad • Running sample queries against the OntoQuad SPARQL endpoint 07.04.2014 3
  • 4. OntoQuad Installation • RDF store for Android • Detailed setup instructions already provided by Ontos AG (attached) • Fresh installations should be started at least once to initialize their data directory structures • OntoQuad should be completely stopped before deploying preloaded datasets (next slides) 07.04.2014 4
  • 5. Prebuild dataset deployment • Musicbrainz dataset extract – 5 million RDF triples subset – No special hardware requirements (<1GB external storage) – Sufficient deployment and query response times – Still representative for demonstration and educational purposes 07.04.2014 5
  • 6. Prebuild dataset setup • Download the binary files archive (musicbrainz-5m-bin.zip) on your PC • Extract the archive on the local file system – Important files and folders: ./vm, ./txlogs, .universe, .commands • Ensure OntoQuad in not active/running before performing the next steps 07.04.2014 6
  • 7. Prebuild dataset setup (2) • Connect the mobile device via appropriate USB cable to PC and overwrite the existing files in folder: /storage/extSdCard/margot/ with the ones from the archive • Disconnect the mobile device and start the OntoQuad server 07.04.2014 7
  • 8. Setup Verification • Start the Admin Console and select the SPARQL section (it will take some time) • Execute the following query: SELECT (COUNT(?s) as ?count) WHERE { ?s ?p ?o } • The result count value should be approximately 5 million 07.04.2014 8
  • 9. Module 2 for Android • Based on original Webinar Module 2 content • SPARQL queries adapted for the extracted data set and the current implementation limitations • Each query description refers to the original location in the Module 2 presentation 07.04.2014 9
  • 10. Module 2 for Android (2) • What albums did Queen make (slide 15) ? PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT ?album WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album a mo:Release ; dc:title ?title } ORDER BY ?title 07.04.2014 10
  • 11. Module 2 for Android (3) • What albums and tracks did Queen make (slide 22) ? PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT ?album_name ?track_title WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album dc:title ?album_name ; mo:record ?record . ?record mo:track ?track . ?track dc:title ?track_title . } 07.04.2014 11
  • 12. Module 2 for Android (4) • Retrieve the albums and tracks recorded by Queen, where the duration of the song is more than 300 secs. and no longer than 400 secs (slide 23) PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT ?album_name ?track_title ?duration WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album dc:title ?album_name ; mo:record ?record . ?record mo:track ?track . ?track dc:title ?track_title ; mo:duration ?duration; FILTER (?duration > 300000 && ?duration < 400000) } 07.04.2014 12
  • 13. Module 2 for Android (5) • Retrieve the name of the albums recorded by Queen which have at least two different songs (slide 24) PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT DISTINCT ?album_name WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album dc:title ?album_name ; mo:record ?record . ?record mo:track ?track1 . ?record mo:track ?track2 . FILTER (?track1 != ?track2) } 07.04.2014 13
  • 14. Module 2 for Android (6) • Retrieve the duration of the albums recorded by Queen (slide 25) PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX mo: <http://purl.org/ontology/mo/> SELECT ?album ?album_name (SUM(?track_duration) AS ?album_duration) WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album mo:record ?record ; dc:title ?album_name. ?record mo:track ?track . ?track mo:duration ?track_duration . } GROUP BY ?album ?album_name HAVING (SUM(?track_duration) > 3600000) 07.04.2014 14
  • 15. Module 2 for Android (7) • Create the dc:creator descriptions for albums and their tracks recorded by Queen (slide 29)* PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX mo: <http://purl.org/ontology/mo/> PREFIX dc: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ?album dc:creator ?band . ?track dc:creator ?band .} WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album mo:record ?record . ?record mo:track ?track . } *Note: CONSTRUCT queries might not work properly with the current implementation 07.04.2014 15
  • 16. Module 2 for Android (8) • Create the dc:creator descriptions of the albums recorded by Queen whose title contains the word 'rock’ (slide 31)* PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ?album dc:creator ?band } WHERE { ?band foaf:name "Queen" . ?band foaf:made ?album . ?album dc:title ?album_name . FILTER (REGEX(?album_name, ".*rock.*", "i")) } *Note: CONSTRUCT queries might not work properly with the current implementation 07.04.2014 16
  • 17. Module 2 for Android Thank you! 07.04.2014 17