1 An Introduction to RDF and the Jena RDF API. 2 Outline Introduction Statements Writing RDF Reading RDF Navigating a Graph Querying a Graph Operations.

Slides:



Advertisements
Similar presentations
RDF/XML Syntax Specification Ming Jing Team W. Tutorial Overview - Introduction - An XML Syntax for RDF - Syntax Data Model (*) Order - Concept and Standard.
Advertisements

CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
10-Sep-02 Page 1 Gadjah Mada University - Yogyakarta - Indonesia Gadjah Mada University10-Sep-02 Page 1 Gadjah Mada University - Yogyakarta - Indonesia.
SPARQL- A QUERY LANGUAGE FOR RDF( S ) Fred Freitas - CIn/UFPE - Brazil.
An Introduction to RDF(S) and a Quick Tour of OWL
1 RDF Tutorial. C. Abela RDF Tutorial2 What is RDF? RDF stands for Resource Description Framework It is used for describing resources on the web Makes.
인터넷기술 강혜원 Java 를 이용한 RDF Process 인터넷기술 012ITI01 강혜원.
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
Master Informatique 1 Semantic Technologies Part 4Jena Werner Nutt.
RDF Tutorial.
JENA –A SEMANTIC WEB TOOL by Ranjani Sankaran & krishna Priyanka Chebrolu.
ICE0534 – Web-based Software Development ICE1338 – Programming for WWW Lecture #12 Lecture #12 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information.
Jena Sparql 4/11/2017.
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
SPARQL RDF Query.
Progress Update Semantic Web, Ontology Integration, and Web Query Seminar Department of Computing David George.
Chapter 3 RDF Syntax 1. Topics Basic concepts of RDF resources, properties, values, statements, triples URIs and URIrefs RDF graphs Literals and Qnames.
CoFfTeA seminarie1 Maandag 24 november CoFfTeA seminarie2 Agenda (1) Welkom: Chris Van Keer (departementsbestuur) Inleiding: Patrick De Causmaecker.
Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010.
RDF(S) Tools Adrian Pop, Programming Environments Laboratory Linköping University.
Jena --- A Java API for RDF Jing deng CSCI 7818 Web Technologies Computer Science Department University of Colorado at Boulder Wednesday, October 31, 2001.
COMP 6703 eScience Project Semantic Web for Museums Student : Lei Junran Client/Technical Supervisor : Tom Worthington Academic Supervisor : Peter Strazdins.
Internet Technologies1 RDF Bibliography: “XML How To Program” by Deitel, Deitel, Nieto, Lin and Sadhu. “XML Bible” by Elliotte Rusty Harold. HP’s Jena.
Internet Technologies 1 Master of Information System Management Internet Technologies The Resource Description Framework (RDF)
Jena 4/17/2017.
Module 2b: Modeling Information Objects and Relationships IMT530: Organization of Information Resources Winter, 2007 Michael Crandall.
Using Java in Linked Data Applications Fuming Shih Oct 12.
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
Co-funded by the European Union Semantic CMS Community Semantic Data Access Copyright IKS Consortium 1 SRDC Ltd. August, 2011.
INF 384 C, Spring 2009 Ontologies Knowledge representation to support computer reasoning.
Logics for Data and Knowledge Representation
Chapter 3 Querying RDF stores with SPARQL. Why an RDF Query Language? Why not use an XML query language? XML at a lower level of abstraction than RDF.
Database Support for Semantic Web Masoud Taghinezhad Omran Sharif University of Technology Computer Engineering Department Fall.
Ontology Query. What is an Ontology Ontologies resemble faceted taxonomies but use richer semantic relationships among terms and attributes, as well as.
RDF (Resource Description Framework). 2 Table of Contents  Introduction  Basic RDF –Basic RDF Model –Basic Syntax  Containers  Statements about Statements.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 2: RDF Model & Syntax Aidan Hogan
Metadata. Generally speaking, metadata are data and information that describe and model data and information For example, a database schema is the metadata.
Jena2: a semantic web toolkit
Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter.
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.
INF5120 ”Modellbasert Systemutvikling” ”Modelbased System development” Lecture 11 (part 2): MDI I, Part II: Semantic Web.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lecture 5, Jan 23 th, 2003 Lotzi Bölöni.
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.
© Copyright 2008 STI INNSBRUCK Semantic Web Repositories and SPARQL Dieter Fensel Federico Facca.
Using the DAWG Test Cases with Relational Databases Matthew Gheen October 26, 2007.
User Profiling using Semantic Web Group members: Ashwin Somaiah Asha Stephen Charlie Sudharshan Reddy.
Ontology based e-Real Estate Agency Information System By Moein Mehrolhasani Bijan Zamanian cmpe 588.
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lotzi Bölöni.
Motivation Dynamically identify and understand information sources Provide interoperability between agents in a semantic manner Enable distributed extensible.
Silterra, April 2004 RDF, RSS and all that THREADING THE RDF MAZE.
Knowledge Technologies Manolis Koubarakis 1 Some Other Useful Features of RDF.
Experience with Software Watermarking Jens Palsberg, Sowmya Krishnaswamy, Minseok Kwon, Di Ma, Qiuyun Shao, Yi Zhang CERIAS and Department of Computer.
Other RDF Capabilities. Exercise: Write the following information into a set of statements (triples) and then draw them into and RDF graph The article.
Chapter 04 Semantic Web Application Architecture 23 November 2015 A Team 오혜성, 조형헌, 권윤, 신동준, 이인용.
CHAPTER 8 – Jena:RDF in Java 박형우 SNU OOPSLA Lab. August 27, 2004.
Setting the stage: linked data concepts Moving-Away-From-MARC-a-thon.
Linked Data & Semantic Web Technology The Semantic Web Part 4. Resource Description Framework (1) Dr. Myungjin Lee.
Chapter 2 RDF Syntax 1.
Jena 6/8/2018.
SPARQL ดร.มารุต บูรณรัช
Introduction to the Semantic Web (tutorial) 2009 Semantic Technology Conference San Jose, California, USA June 15, 2009 Ivan Herman, W3C
Jena Sparql (for Mac) 9/22/2018.
Decision Properties of Regular Languages
CC La Web de Datos Primavera 2016 Lecture 2: RDF Model & Syntax
RDF 1.1 Concepts and Abstract Syntax
Resource Description Framework (RDF)
Presentation transcript:

1 An Introduction to RDF and the Jena RDF API

2 Outline Introduction Statements Writing RDF Reading RDF Navigating a Graph Querying a Graph Operations on Graphs

3 Introduction An example of RDF : 3-Tuple representation : {creator , [ , [John]} Graph representation : creator John

4 Introduction The Resource Description Framework (RDF) is a standard for describing resources. A resource is anything we can identify. The resources in this tutorial will be about people. They use an RDF representation of VCARDS.

5 Introduction (contd.) RDF is best thought of in the form of node and arc diagrams. A simple vcard might look like this in RDF: resource property value ◆ Fig 1.

6 Introduction (contd.) Jena is a Java API which can be used to create and manipulate RDF graphs. Jena has object classes to represent graphs, resources and properties.

7 Introduction (contd.) The code to create the model above is : // some definitions static String personURI = " static String fullName = "John Smith"; // create an empty graph Model model = new ModelMem(); // create the resource Resource johnSmith = model.createResource(personURI); // add the property johnSmith.addProperty(VCARD.FN, fullName);

8 Introduction (contd.) The code above can be more compactly written in a cascading style: Resource johnSmith = model.createResource(personURI); johnSmith.addProperty(VCARD.FN, fullName); Resource johnSmith = model.createResource(personURI).addProperty(VCARD.FN, fullName);

9 Introduction (contd.) RDF properties can also take other resources as their value. property Value (blank node) ◆ Fig 2.

10 Introduction (contd.) The Jena code to construct the example above is : // some definitions String personURI = " String givenName = "John"; String familyName = "Smith"; String fullName = givenName + " " + familyName; // create an empty graph Model model = new ModelMem(); // create the resource // and add the properties cascading style Resource johnSmith = model.createResource(personURI).addProperty(VCARD.FN, fullName).addProperty(VCARD.N, model.createResource().addProperty(VCARD.Given, givenName).addProperty(VCARD.Family, familyName));

11 Statements Each arc in an RDF graph is called a statement. Each statement asserts a fact about a resource. A statement has three parts: ˙subject ˙predicate ˙object A statement is sometimes called a triple, because of its three parts. John Smith vcard:FN

12 Statements (contd.) We can run a program to get the statements in the Fig2. anon:150bd4d:1015b258a60:-7fff "Smith". "John Smith". anon:150bd4d:1015b258a60:-7fff "John". anon:150bd4d:1015b258a60:-7fff ◆ Fig 2.

13 Writing RDF Jena has methods for reading and writing RDF as XML. These can be used to save an RDF model to a file and later, read it back in again. It can be easily done by creating a PrintWriter and call the model.write method. // now write the model in XML form to a file model.write(new PrintWriter(System.out));

14 Reading RDF Jena also has methods for reading the statements recorded in RDF XML form into a model. The code is : // use the class loader to find the input file InputStream in = Tutorial05.class.getClassLoader().getResourceAsStream(inputFileName); // read the RDF/XML file model.read(new InputStreamReader(in), "");

15 Navigating a Graph Given the URI of a resource, the resource object can be retrieved from a model. // retrieve the John Smith vcard resource from the model Resource vcard = model.getResource(johnSmithURI); Also can accessing a property of the resource. // retrieve the value of the N property Resource name = vcard.getProperty(VCARD.N).getResource(); // retrieve the given name property String fullName = vcard.getProperty(VCARD.FN).getString();

16 Navigating a Graph (contd.) The graph of the code above is : John Smith JohnSmith vcard:FN vcard:Family vcard:Given vcard:N Resource vcard

17 Navigating a Graph (contd.) RDF permits a resource to repeat a property : // add two nick name properties to vcard vcard.addProperty(VCARD.NICKNAME, "Smithy").addProperty(VCARD.NICKNAME, "Adman"); John Smith JohnSmith vcard:FN vcard:Family vcard:Given vcard:N Smithy Adman vcard:NICKNAME

18 Querying a Graph For example, we can select all the resources with a VCARD.FN property in the model : John Smith Tom SmithTom Taylor vcard:FN vcard:N vcard:FN

19 Querying a Graph (contd.) We also can select all the resources with a VCARD.FN property whose value ends with “ Smith ” : John Smith Tom SmithTom Taylor vcard:FN vcard:N vcard:FN

20 Operations on Graphs Jena provides three operations for manipulating graphs as a whole : ˙ union, intersection and difference. Consider the following two graphs :

21 Operations on Graphs (contd.) When the two models above are merged, the graph will be :