COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 5 1COMP9321, 15s2, Week.

Slides:



Advertisements
Similar presentations
Dr. Leo Obrst MITRE Information Semantics Information Discovery & Understanding Command & Control Center February 6, 2014February 6, 2014February 6, 2014.
Advertisements

CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
The Semantic Web – WEEK 4: RDF
CS570 Artificial Intelligence Semantic Web & Ontology 2
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
RDF Tutorial.
Semantic Web Introduction
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
Ontology Notes are from:
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
SKOS and Other W3C Vocabulary Related Activities Gail Hodge Information International Assoc. NKOS Workshop Denver, CO June 10, 2005.
Dr. Alexandra I. Cristea RDF.
COMP 6703 eScience Project Semantic Web for Museums Student : Lei Junran Client/Technical Supervisor : Tom Worthington Academic Supervisor : Peter Strazdins.
RDF Kitty Turner. Current Situation there is hardly any metadata on the Web search engine sites do the equivalent of going through a library, reading.
RDF: Building Block for the Semantic Web Jim Ellenberger UCCS CS5260 Spring 2011.
Semantic Web Presented by: Edward Cheng Wayne Choi Tony Deng Peter Kuc-Pittet Anita Yong.
The RDF meta model: a closer look Basic ideas of the RDF Resource instance descriptions in the RDF format Application-specific RDF schemas Limitations.
Module 2b: Modeling Information Objects and Relationships IMT530: Organization of Information Resources Winter, 2007 Michael Crandall.
Semantic Web Technologies Lecture # 2 Faculty of Computer Science, IBA.
Ontologies: Making Computers Smarter to Deal with Data Kei Cheung, PhD Yale Center for Medical Informatics CBB752, February 9, 2015, Yale University.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
1 Ontology Query and Reasoning Payam Barnaghi Institute for Communication Systems (ICS) Faculty of Engineering and Physical Sciences University of Surrey.
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
Practical RDF Chapter 1. RDF: An Introduction
The Semantic Web Service Shuying Wang Outline Semantic Web vision Core technologies XML, RDF, Ontology, Agent… Web services DAML-S.
INF 384 C, Spring 2009 Ontologies Knowledge representation to support computer reasoning.
Logics for Data and Knowledge Representation
The Semantic Web Web Science Systems Development Spring 2015.
Metadata. Generally speaking, metadata are data and information that describe and model data and information For example, a database schema is the metadata.
Towards a semantic web Philip Hider. This talk  The Semantic Web vision  Scenarios  Standards  Semantic Web & RDA.
Coastal Atlas Interoperability - Ontologies (Advanced topics that we did not get to in detail) Luis Bermudez Stephanie Watson Marine Metadata Interoperability.
Semantic Web - an introduction By Daniel Wu (danielwujr)
RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections.
©Ferenc Vajda 1 Semantic Grid Ferenc Vajda Computer and Automation Research Institute Hungarian Academy of Sciences.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lecture 5, Jan 23 th, 2003 Lotzi Bölöni.
RELATORS, ROLES AND DATA… … similarities and differences.
1 Tutorial on the Semantic Web (Last update: 26 May 2009) adapted from (C) Ivan Herman, W3C Given at WE course by Peter Dolog Adapted: October 2010.
The future of the Web: Semantic Web 9/30/2004 Xiangming Mu.
Introduction to the Semantic Web and Linked Data Module 1 - Unit 2 The Semantic Web and Linked Data Concepts 1-1 Library of Congress BIBFRAME Pilot Training.
Introduction to the Semantic Web and Linked Data
Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource.
Of 33 lecture 1: introduction. of 33 the semantic web vision today’s web (1) web content – for human consumption (no structural information) people search.
The RDF meta model Basic ideas of the RDF Resource instance descriptions in the RDF format Application-specific RDF schemas Limitations of XML compared.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Metadata : an overview XML and Educational Metadata, SBU, London, 10 July 2001 Pete Johnston UKOLN, University of Bath Bath, BA2 7AY UKOLN is supported.
Problems with XML & XML Schemas XML falls apart on the Scalability design goal. 1.The order in which elements appear in an XML document is significant.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 12 (Wrap-up) 1COMP9321,
1cs The Need “Most of the Web's content today is designed for humans to read, not for computer programs to manipulate meaningfully.” Berners-Lee,
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
THE SEMANTIC WEB By Conrad Williams. Contents  What is the Semantic Web?  Technologies  XML  RDF  OWL  Implementations  Social Networking  Scholarly.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lotzi Bölöni.
Semantic Web COMS 6135 Class Presentation Jian Pan Department of Computer Science Columbia University Web Enhanced Information Management.
OWL Web Ontology Language Summary IHan HSIAO (Sharon)
What is the Semantic Web? 17 th XBRL International Conference Eindhoven, the Netherlands 5 st May, 2008 Ivan Herman, W3C.
Shared innovation Linking Distributed Data across the Web Dr Tom Heath Researcher, Platform Division Talis Information Ltd t
Semantic Web. P2 Introduction Information management facilities not keeping pace with the capacity of our information storage. –Information Overload –haphazardly.
Setting the stage: linked data concepts Moving-Away-From-MARC-a-thon.
Semantic and geographic information system for MCDA: review and user interface building Christophe PAOLI*, Pascal OBERTI**, Marie-Laure NIVET* University.
RDF RESOURCE DESCRIPTION FRAMEWORK Scott Ainsworth & Louis Nguyen Old Dominion University, CS 791: Web Syndication Formats, February 20,
Overview of the Semantic Web Ralph R. Swick World Wide Web Consortium (W3C) 17 October 2009.
OWL (Ontology Web Language and Applications) Maw-Sheng Horng Department of Mathematics and Information Education National Taipei University of Education.
COMP9321 Web Application Engineering Semester 2, 2016
Introduction to Persistent Identifiers
RDFa How and Why Ralph R. Swick World Wide Web Consortium
Overview of the Semantic Web Ralph R
Grid Computing 7700 Fall 2005 Lecture 18: Semantic Grid
RDF For Semantic Web Dhaval Patel 2nd Year Student School of IT
Logics for Data and Knowledge Representation
Grid Computing 7700 Fall 2005 Lecture 18: Semantic Grid
LOD reference architecture
Presentation transcript:

COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 5 1COMP9321, 15s2, Week 5

Semantic Web 2COMP9321, 15s2, Week 5 standard technologies Web of Data It is a collection of standard technologies to realize a Web of Data! RDF, OWL, SPARQL, etc. DataDocuments Web of Data beyond the Web of Documents! Machine Readable Human Readable The amount of information is growing exponentially.

W3C's "Semantic Web Vision“ 3COMP9321, 15s2, Week 5 1.Web information has exact meaning! e.g. automatic airline reservation Knows about your preferences: builds up a knowledge-base using your past activities Combines the local knowledge with remote services: social networks airline preferences Hospital Information Systems dietary requirements Linkedin Jobs and Calendaring information …

W3C's "Semantic Web Vision“ 4COMP9321, 15s2, Week 5 1.Web information has exact meaning 2.Web information can be understood and processed by computers Provide a common way to describe information: so it can be read and understood by computer applications e.g. Describing : properties for publications, such as Author and Title information about web pages such as content, author, and creation date content and rating for web pictures content for search engines electronic libraries …

W3C's "Semantic Web Vision“ 5COMP9321, 15s2, Week 5 1.Web information has exact meaning 2.Web information can be understood and processed by computers Provide a common way to describe information: so it can be read and understood by computer applications e.g. Describing : properties for publications, such as Author and Title information about web pages such as content, author, and creation date content and rating for web pictures content for search engines electronic libraries …  Data should be available for machines for further processing: It is important as tasks often require to combine data on the Web: hotel and travel information may come from different sites searches in different digital libraries …  Information should easily be exchanged between different platforms.

W3C's "Semantic Web Vision“ 6COMP9321, 15s2, Week 5 1.Web information has exact meaning 2.Web information can be understood and processed by computers 3.Computers can integrate information from the web A. Map the various data onto an abstract data representation B. Merge the resulting representations C. Start making queries on the whole!  queries that could not have been done on the individual data sets

W3C's "Semantic Web Vision“ 7COMP9321, 15s2, Week 5 1.Web information has exact meaning 2.Web information can be understood and processed by computers 3.Computers can integrate information from the web A. Map the various data onto an abstract data representation B. Merge the resulting representations C. Start making queries on the whole!  queries that could not have been done on the individual data sets

3A. Map the various data onto an abstract data representation 8COMP9321, 15s2, Week 5 Example: A simplified bookstore data (dataset “A”) IDAuthor-idTitlePublisher-idYear ISBN-13: id-BHOThe Audacity of Hope id IDAuthor-NameHome Page id-BHOBarack Obamahttps:// IDPub-NameHeadquarter Location id-1954Vintage BooksNew York

3A. Map the various data onto an abstract data representation 9COMP9321, 15s2, Week 5 Example: A simplified bookstore data (dataset “A”) ISBN-13: The Audacity of Hope 2008 A:Title A:Year Vintage Books New York Barack Obama A:Pub-Name A:hq-Location A:Publisher A: Author A: Author-Name A: Homepage

3A. Map the various data onto an abstract data representation 10COMP9321, 15s2, Week 5 Example: A simplified Knowledge Base (dataset “B”) A knowledge base (KB) typically consists of a set of concepts organized into a taxonomy, instances for each concept, and relationships among the concepts. Examples: Freebase, DBpedia, YAGO, Wikidata ~ Chai, Xiaoyong, et al. "Social Media Analytics: The Kosmix Story." IEEE Data Eng. Bull (2013): 4-12.

3A. Map the various data onto an abstract data representation 11COMP9321, 15s2, Week 5 Example: A simplified Knowledge Base (dataset “B”) Barak Obama Hawaii B: BirthPlace B: BirthDate B: Spouse Michelle Obama Lawyer B: Name B: Profession Harvard Law School B: GraduateFrom

3A. Map the various data onto an abstract data representation 12COMP9321, 15s2, Week 5 Example: A simplified Knowledge Base (dataset “B”) same-as

W3C's "Semantic Web Vision“ 13COMP9321, 15s2, Week 5 1.Web information has exact meaning 2.Web information can be understood and processed by computers 3.Computers can integrate information from the web A. Map the various data onto an abstract data representation B. Merge the resulting representations C. Start making queries on the whole!  queries that could not have been done on the individual data sets

3B. Merge the resulting representations 14COMP9321, 15s2, Week 5 Example: A simplified Knowledge Base (dataset “B”) A: Author A: Author-Name A: Homepage

W3C's "Semantic Web Vision“ 15COMP9321, 15s2, Week 5 1.Web information has exact meaning 2.Web information can be understood and processed by computers 3.Computers can integrate information from the web A. Map the various data onto an abstract data representation B. Merge the resulting representations C. Start making queries on the whole!  queries that could not have been done on the individual data sets

3C. Start making queries on the whole! 16COMP9321, 15s2, Week 5 Queries that could not have been done on the individual data sets : Give me list of the books whose : author was born in Hawaii. author was born in author is married. author’s spouse was graduated from Harvard … More? We could add extra knowledge to the merged datasets, e.g.:  Full classification of various types of library data;  Geographical information, maps;  Images;  Social Media Accounts;  …

3C. Start making queries on the whole! 17COMP9321, 15s2, Week 5 Queries that could not have been done on the individual data sets : Give me list of the books whose : author was born in Hawaii. author was born in author is married. author’s spouse was graduated from Harvard … More? We could add extra knowledge to the merged datasets, e.g.:  Full classification of various types of library data;  Geographical information, maps;  Images;  Social Media Accounts;  … Even more powerful queries can be asked as a result

Semantic Web 18COMP9321, 15s2, Week 5 standard technologies Web of Data It is a collection of standard technologies to realize a Web of Data! RDF RDF, OWL, SPARQL, etc.

Resource Description Framework (RDF) 19COMP9321, 15s2, Week 5 resources RDF is a framework for describing resources on the web. Publishing such descriptions on the Web creates the Semantic Web. URI RDF uses Web identifiers (URIs) to identify resources. Web documents concepts from the real world (e.g. people, organisations, topics, things) e.g. URIs (Uniform Resource Identifiers) are very important, providing both the core of the framework itself and the link between RDF and the Web.

Resource Description Framework (RDF) 20COMP9321, 15s2, Week 5 On the Semantic Web, URIs identify not just Web documents, but also real-world objects like people and cars. Example (Web Documents): The company “Example Inc.” has a Web site at Part of the site is a white-pages service listing the names and contact details of the employees. Alice and Bob both work at Example Inc. The structure of the Web site might thus be: each of the pages mentioned above are Web documents.

Resource Description Framework (RDF) 21COMP9321, 15s2, Week 5 On the Semantic Web, URIs identify not just Web documents, but also real-world objects like people and cars. Example (objects): The company “Example Inc.” wants to publish contact data of their employees on the Semantic Web. Business partners can import this data into their address books. FOAF (an acronym of Friend of a friend) is a machine-readable ontology describing persons, their activities and their relations to other people and objects. Hash URIs 303 URIs

RDF Resource, Property, and Property Value 22COMP9321, 15s2, Week 5 Resource: anything that can have a URI e.g. Property: a Resource that has a name, such as “author”… Property Value: the value of a Property, such as “Barack Obama" a property value can be another resource Barack Obama

RDF Resource, Property, and Property Value 23COMP9321, 15s2, Week 5 The combination of a Resource, a Property, and a Property value forms a Statement. known as the subject, predicate and object Example: Statement: The author of “ is Barack Obama. Subject: Predicate: author Object: Barack Obama Subject Predicate Object

RDF (DBLP Example) 24COMP9321, 15s2, Week 5 <rdf:RDF xmlns:dblp=" xmlns:rdf=" Web Services - Concepts, Architectures and Applications Data-Centric Systems and Applications 2004 Springer

RDF (DBLP Example) 25COMP9321, 15s2, Week 5 <rdf:RDF xmlns:dblp=" xmlns:rdf=" Web Services - Concepts, Architectures and Applications Data-Centric Systems and Applications 2004 Springer The xmlns:rdf namespace, specifies that elements with the rdf prefix are from the namespace The xmlns:dblp namespace, specifies that elements with the cd prefix are from the namespace The element contains the description of the resource identified by the rdf:about attribute. Other elements are the properties of the resource. The xmlns:rdf namespace, specifies that elements with the rdf prefix are from the namespace The xmlns:dblp namespace, specifies that elements with the cd prefix are from the namespace The element contains the description of the resource identified by the rdf:about attribute. Other elements are the properties of the resource.

RDF (DBLP Example) 26COMP9321, 15s2, Week 5 <rdf:RDF xmlns:dblp=" xmlns:rdf=" Web Services - Concepts, Architectures and Applications Data-Centric Systems and Applications 2004 Springer Properties as Attributes Properties as Resources

RDF Schema (RDFS) 27COMP9321, 15s2, Week 5 RDF Schema provides a data-modelling vocabulary for RDF data. RDF Schema is an extension of the basic RDF vocabulary. RDF Schema provides the framework to describe application-specific classes and properties. Classes in RDF Schema are much like classes in object oriented programming languages. “classes” are also resources, but… they are also a collection of possible resources

RDF Schema (RDFS) 28COMP9321, 15s2, Week 5 RDF Schema provides a data-modelling vocabulary for RDF data. RDF Schema is an extension of the basic RDF vocabulary. RDF Schema provides the framework to describe application-specific classes and properties. Classes in RDF Schema are much like classes in object oriented programming languages. “classes” are also resources, but… they are also a collection of possible resources Dublin Core Metadata Initiative (DCMI) is an open organization supporting innovation in metadata design and best practices across the metadata ecology. DCMI has created some predefined properties for describing documents.

Web Ontology Language (OWL) 29COMP9321, 15s2, Week 5 Ontology is about the exact description of things (web information) and their relationships. OWL was designed to provide a common way to process the content of web information OWL and RDF are much of the same thing, but OWL is a stronger language with greater machine interpretability than RDF. OWL provides additional vocabulary along with a formal semantics OWL making it easier for machines to automatically process and integrate information available on the Web. OWL has three sublanguages OWL Lite OWL DL OWL Full OWL is complex: OWL is a large set of additional terms

OWL: OWL: Term equivalences 30COMP9321, 15s2, Week 5 For classes: owl:equivalentClass: two classes have the same individuals owl:disjointWith: no individuals in common For properties: owl:equivalentProperty owl:propertyDisjointWith For individuals: owl:sameAs: two URIs refer to the same concept (“individual”) owl:differentFrom: negation of owl:sameAs

OWL: OWL: Term equivalences 31COMP9321, 15s2, Week 5 For classes: owl:equivalentClass: two classes have the same individuals owl:disjointWith: no individuals in common For properties: owl:equivalentProperty owl:propertyDisjointWith For individuals: owl:sameAs: two URIs refer to the same concept (“individual”) owl:differentFrom: negation of owl:sameAs Example: Connecting to French…

OWL: Ontology development 32COMP9321, 15s2, Week 5 The hard work is to create the ontologies requires a good knowledge of the area to be described OWL is just a tool to formalize ontologies large scale ontologies are often developed in a community process Ontologies should be shared and reused can be via the simple namespace mechanisms… …or via explicit import

Ontologies Examples 33COMP9321, 15s2, Week 5 eClassOwl: eBusiness ontology for products and services, 75,000 classes and 5,500 properties National Cancer Institute’s ontology: about 58,000 classes Open Biomedical Ontologies Foundry: a collection of ontologies, including the Gene Ontology to describe gene and gene product attributes in any organism or protein sequence and annotation terminology and data (UniProt) BioPAX: for biological pathway data

Rules Rule Interchange Format (RIF) 34COMP9321, 15s2, Week 5

Rules 35COMP9321, 15s2, Week 5 There is a long history of rule languages and rule-based systems eg: logic programming (Prolog), production rules Lots of small and large rule systems E.g. from mail filters to expert systems Why rules on the Semantic Web? There are conditions that ontologies (ie, OWL) cannot express a well known example is Horn rules: (P1 ∧ P2 ∧ …) → C

Rules 36COMP9321, 15s2, Week 5 Example a novel with over 500 pages and costing less than $5 is a cheap book. If { ?x rdf:type p:Novel; p:page_number ?p; p:price rdf:value ?z ?p > "500"^^xsd:integer. ?z < "5.0"^^xsd:double. } then { ?x rdf:type p:CheapBook }

A new requirement: exchange of rules 37COMP9321, 15s2, Week 5 Applications may want to exchange their rules: e.g. negotiate eBusiness contracts across platforms e.g. describe privacy requirements and policies Rule Interchange Format (RIF): Goals: expresses the rules a bit like a rule language can be used to exchange rules among engines Challenges: Rule based systems can be very different different rule semantics A universal exchange format is not feasible

A new requirement: exchange of rules 38COMP9321, 15s2, Week 5 Rule Interchange Format (RIF): The idea is to define “cores” for a family of languages with “variants” Introduction to the Semantic Web (tutorial), Ivan Herman, W3C

A new requirement: exchange of rules 39COMP9321, 15s2, Week 5 Rule Interchange Format (RIF): The idea is to define “cores” for a family of languages with “variants” Introduction to the Semantic Web (tutorial), Ivan Herman, W3C Possible dialects: F-logic, production rules, fuzzy or probabilistic logic, …

A new requirement: exchange of rules 40COMP9321, 15s2, Week 5 Rule Interchange Format (RIF): The idea is to define “cores” for a family of languages with “variants” Introduction to the Semantic Web (tutorial), Ivan Herman, W3C

Rules vs OWL? 41COMP9321, 15s2, Week 5 In a SW application, should I use RIF, OWL, or both? The two approaches are complimentary there are things that rules cannot really express or infer eg, inferencing complex relationships among classes there are things that ontologies cannot really express or in only a very complicated manner eg, complex Horn rules Often, applications require both Interesting paper: Paul Suganthan, G. C., et al. "Why Big Data Industrial Systems Need Rules and What We Can Do About It." (SIGMOD’2015). Introduction to the Semantic Web (tutorial), Ivan Herman, W3C

Linking Open Data (LOD) 42COMP9321, 15s2, Week 5

Linking Open Data (LOD) 43COMP9321, 15s2, Week 5 - Goal: “expose” open datasets in RDF - Set RDF links among the data items from different datasets - Set up query endpoints - Result: billions of triples and millions of links… - The important point here is that : the data becomes available to the World via a unified format (ie, RDF). the various datasets are interlinked together e.g. DBpedia project

Linking Open Data (LOD) 44COMP9321, 15s2, Week 5

Linking Open Data (LOD) 45COMP9321, 15s2, Week 5 Linked Data: … exposing, sharing, and connecting pieces of data, information, and knowledge on the Semantic Web using URIs and RDF

More? 46COMP9321, 15s2, Week 5 The Google Knowledge Graph is a system that Google launched in May 2012 that understands facts about people, places and things and how these entities are all connected.

Query RDF Data (SPARQL) 47COMP9321, 15s2, Week 5

Query RDF Data (SPARQL) 48COMP9321, 15s2, Week 5 RDF is a directed, labelled graph data format for representing information in the Web.

Query RDF Data (SPARQL) 49COMP9321, 15s2, Week 5 SPARQL Protocol And RDF Query Language, is an RDF query language. This specification defines the syntax and semantics of the SPARQL query language for RDF. SPARQL can be used to express queries across diverse data sources. SPARQL contains capabilities for querying required and optional graph patterns The results of SPARQL queries can be results sets or RDF graphs.

Query RDF Data (SPARQL) 50COMP9321, 15s2, Week 5 The (subject,?p,?o) is a pattern for what we are looking for with ?p and ?o as “unknowns” SELECT ?p ?o WHERE { subject ?p ?o } SELECT ?p ?o WHERE { subject ?p ?o } The triples in WHERE define the graph pattern The query returns all p,o pairs SPARQL query:

SPARQL: Simple Query 51COMP9321, 15s2, Week 5 Data : Query : Result :

SPARQL: Simple Query 52COMP9321, 15s2, Week 5 Data : Query : Result : SPARQL is not based on XML Names beginning with a ? or a $ are variables. Graph patterns are given as a list of triple patterns enclosed within braces {} The variables named after the SELECT keyword are the variables that will be returned as results.

SPARQL: Multiple Matches 53COMP9321, 15s2, Week 5 Data : Query : Result :

SPARQL: SPARQL: Constraints 54COMP9321, 15s2, Week 5 Data : Query : Result : SPARQL FILTER functions like regex can test RDF literals.

SPARQL: SPARQL: Constraints 55COMP9321, 15s2, Week 5 Data : Query : Result : SPARQL FILTERs can restrict on arithmetic expressions.

SPARQL usage in practice SPARQL usage in practice 56COMP9321, 15s2, Week 5 SPARQL is usually used over the network separate documents define the protocol and the result format SPARQL Protocol for RDF with HTTP and SOAP bindings SPARQL results in XML or JSON formats Big datasets usually offer “SPARQL endpoints” using this protocol typical example: SPARQL endpoint to DBpedia

SPARQL usage in practice SPARQL usage in practice 57COMP9321, 15s2, Week 5 SPARQL is usually used over the network separate documents define the protocol and the result format SPARQL Protocol for RDF with HTTP and SOAP bindings SPARQL results in XML or JSON formats Big datasets usually offer “SPARQL endpoints” using this protocol typical example: SPARQL endpoint to DBpedia

Apache Jena 58COMP9321, 15s2, Week 5 A free and open source Java framework for building Semantic Web and Linked Data applications. The framework is composed of different APIs interacting together to process RDF data.

Apache Jena 59COMP9321, 15s2, Week 5 Main Java packages: oaj -> org.apache.jena

Apache Jena 60COMP9321, 15s2, Week 5 ARQ - A SPARQL Processor for Jena ARQ is a query engine for Jena that supports the SPARQL RDF Query language. ARQ - Application API The application API is in the package org.apache.jena.query Key Classes Query - a class that represents the application query. QueryExecution - represents one execution of a query. QueryExecutionFactory - a place to get QueryExecution instances. DatasetFactory - a place to make datasets.

Apache Jena 61COMP9321, 15s2, Week 5 SELECT queries: 1. A query is created from a string using the QueryFactory. 2. The query and model or RDF dataset to be queried are then passed to QueryExecutionFactory to produce an instance of a query execution. 3. QueryExecution objects are java.lang.AutoCloseable and can be used in try- resource. 4.Result are handled in a loop and finally the query execution is closed.

References 62COMP9321, 15s2, Week 5 Introduction to the Semantic Web (tutorial), Ivan Herman, W3C

63COMP9321, 15s2, Week 5