Design and Implementation of An RDF Data Store - PowerPoint PPT Presentation

1 / 78
About This Presentation
Title:

Design and Implementation of An RDF Data Store

Description:

Design and Implementation of An RDF Data Store. Ching-Long Yeh ??? ... Semantics, By Harold Boley, Stefan Decker, and Michael Sintek, IJCAI-01 Tutorial, ... – PowerPoint PPT presentation

Number of Views:170
Avg rating:3.0/5.0
Slides: 79
Provided by: cseTt
Category:

less

Transcript and Presenter's Notes

Title: Design and Implementation of An RDF Data Store


1
Design and Implementation of An RDF Data Store
  • Ching-Long Yeh ???
  • Department of Computer Science and Engineering
  • Tatung University
  • Email chingyeh_at_cse.ttu.edu.tw
  • URL httP//www.cse.ttu.edu.tw/chingyeh

2
Outline
  • Introduction to the Semantic Web
  • Semantic Web Layered Architecture
  • XML, RDF(S), DAML(-S)
  • The Big Picture of the Semantic Web
  • An Architecture of RDF Triple Data Store
  • An RDF Parser in Prolog
  • The Repository storage
  • APIs and User Interface
  • Semantic Community Portal
  • Future Work and Conclusions

3
Sources
  • Part of the slides are selected from the
    following sources
  • Knowledge Markup and Resource Semantics, By
    Harold Boley, Stefan Decker, and Michael Sintek,
    IJCAI-01 Tutorial, http//www.ijcai-01.org/
  • Anupriya Ankolenkar, et al., DAML-S Semantic
    Markup For Web Services,, Proceedings of SWWS
    01, the First Semantic Web Working Symposium,
    California, USA, July 30 - August 1, 2001.

4
Introduction to Semantic Web
  • Facilities to put machine-understandable data on
    the Web are becoming a high priority for many
    communities.
  • The Web can reach its full potential only if it
    becomes a place where data can be shared and
    processed by automated tools as well as by
    people.
  • For the Web to scale, tomorrow's programs must be
    able to share and process data even when these
    programs have been designed totally independently.

5
Introduction to Semantic Web
  • The Semantic Web is a vision the idea of having
    data on the web defined and linked in a way that
    it can be used by machines not just for display
    purposes, but for automation, integration and
    reuse of data across various applications.
  • See W3C Semantic Web Activity, by Marja-Riitta
    Koivunen, for more descriptions.

6
The Semantic Web Layered Architecture
Tim Berners-Lee Axioms, Architecture and
Aspirations W3C all-working group plenary
Meeting 28 February 2001
(http//www.w3.org/2001/Talks/0228-tbl/slide5-0.ht
ml)
7
AIs Chance
Namespaces
CSS
  • Increasing demand for formalized knowledge on
    the Web AIs chance!
  • XML- RDF-based markup languages provide a
    'universal' storage/interchange format for such
    Web-distributed knowledge representation.

DTDs
XSLT
Stylesheets
DAML
Agents
Transformations
Ontobroker
XQL
XML
HornML
Rules
Queries
RuleML
XQuery
XML-QL
SHOE
RDFS
Frames
Acquisition
TopicMaps
Protégé
8
XML Fundamentals
  • Source http//www.ibiblio.org/xml/slides/sd2001ea
    st/fundamentals/XML_Fundamentals.html

9
What is XML?
  • Extensible Markup Language
  • A syntax for documents
  • A Meta-Markup Language
  • A Structural and Semantic language, not a
    formatting language
  • Not just for Web pages

10
Extensible Markup Language
  • Language
  • It has a grammar
  • It has a vocabulary (sort of)
  • It can be parsed by machines
  • Markup Language
  • It says what things are not what they do
  • It is not a programming language
  • It is not compiled
  • Extensible
  • You can add words to the language

11
XML is a Meta Markup Language
  • Not like HTML, troff, LaTeX
  • Make up the tags you need as you need them
  • The tags you create can be documented in a
    Document Type Definition (DTD)
  • A meta syntax for domain-specific markup
    languages like MusicML, MathML, and XHTML

12
XML Applications
  • A specific markup language that uses the XML
    meta-syntax is called an XML application
  • Different XML applications have their own more
    constricted syntaxes and vocabularies within the
    broader XML syntax
  • Further syntax can be layered on top of this
    e.g. data typing through schemas

13
XML describes structure and semantics, not
formatting
  • XML documents form a tree
  • Document Object Model (DOM)
  • Element and attribute names reflect the kind of
    the element
  • DTD, Schema
  • Formatting can be added with a style sheet
  • Cascading Style Sheets (CSS)
  • Extensible Stylesheet language (XSL)

14
XML Hypertext
  • A Uniform Resource Identifier (URI) names or
    locates a resource
  • An XLink defines connections between two or more
    documents identified by URIs
  • XPath identifies particular nodes within a
    document
  • An XPointer adds an XPath to a URI
  • XBase defines the URI against which relative URIs
    are resolved
  • XInclude embeds a document identified by a URI
    inside an XML document.

15
A Song Description in HTML
ltdtgtHot Cop ltddgt by Jacques Morali, Henri Belolo,
and Victor Willis ltulgt ltligtProducer Jacques
Morali ltligtPublisher PolyGram Records ltligtLength
620 ltligtWritten 1978 ltligtArtist Village
People lt/ulgt
16
A Song Description in XML
ltSONGgt ltTITLEgtHot Coplt/TITLEgt
ltCOMPOSERgtJacques Moralilt/COMPOSERgt
ltCOMPOSERgtHenri Belololt/COMPOSERgt
ltCOMPOSERgtVictor Willislt/COMPOSERgt
ltPRODUCERgtJacques Moralilt/PRODUCERgt
ltPUBLISHERgtPolyGram Recordslt/PUBLISHERgt
ltLENGTHgt620lt/LENGTHgt ltYEARgt1978lt/YEARgt
ltARTISTgtVillage Peoplelt/ARTISTgt lt/SONGgt
17
Style Sheets Provide Formatting(CSS)
SONG display block font-family New
York, Times New Roman, serif TITLE display
block font-size 24pt font-weight
bold font-family Helvetica, sans COMPOSER
display block PRODUCER display block YEAR
display block PUBLISHER display
block LENGTH display block ARTIST display
block font-style italic
18
Attaching Style Sheets to Documents
lt?xml-stylesheet type"text/css"
href"song.css"?gt ltSONGgt ltTITLEgtHot
Coplt/TITLEgt ltCOMPOSERgtJacques
Moralilt/COMPOSERgt ltCOMPOSERgtHenri
Belololt/COMPOSERgt ltCOMPOSERgtVictor
Willislt/COMPOSERgt ltPRODUCERgtJacques
Moralilt/PRODUCERgt ltPUBLISHERgtPolyGram
Recordslt/PUBLISHERgt ltLENGTHgt620lt/LENGTHgt
ltYEARgt1978lt/YEARgt ltARTISTgtVillage
Peoplelt/ARTISTgt lt/SONGgt
19
An XSLT Stylesheet (Part 1)
ltxslstylesheet version"1.0"
xmlnsxsl"http//www.w3.org/1999/XSL/Transform"gt
ltxsltemplate match"/"gt lthtmlgt
ltheadgtlttitlegtSonglt/titlegtlt/headgt ltbodygt
ltxslapply-templates select"SONG"/gt
lt/bodygt lt/htmlgt lt/xsltemplategt
20
An XSLT Stylesheet (Part 2)
ltxsltemplate match"SONG"gt lth1gt
ltxslvalue-of select"TITLE"/gt by the
ltxslvalue-of select"ARTIST"/gt lt/h1gt
ltulgt ltligtLength ltxslvalue-of
select"LENGTH"/gtlt/ligt ltligtProducer
ltxslvalue-of select"PRODUCER"/gtlt/ligt
ltligtPublisher ltxslvalue-of select"PUBLISHER"/gtlt
/ligt ltligtYear ltxslvalue-of
select"YEAR"/gtlt/ligt ltxslapply-templates
select"COMPOSER"/gt lt/ulgt lt/xsltemplategt
ltxsltemplate match"COMPOSER"gt
ltligtComposer ltxslvalue-of select"."/gtlt/ligt
lt/xsltemplategt lt/xslstylesheetgt
21
Transforming the Document
lthtmlgt ltheadgt ltmeta http-equiv"Content-T
ype" content"text/html
charsetutf-8"gt lttitlegtSonglt/titlegt
lt/headgt ltbodygt lth1gtHot Cop by
the Village People lt/h1gt
ltulgt ltligtLength 620lt/ligt
ltligtProducer Jacques Moralilt/ligt
ltligtPublisher PolyGram Recordslt/ligt
ltligtYear 1978lt/ligt ltligtComposer
Jacques Moralilt/ligt ltligtComposer Henri
Belololt/ligt ltligtComposer Victor
Willislt/ligt lt/ulgt lt/bodygt lt/htmlgt
XSL document (template rules)
XML document
XSLT Processor (IE 5)
Output
22
A DTD for Songs
lt!ELEMENT SONG (TITLE, COMPOSER, PRODUCER,
PUBLISHER, LENGTH?, YEAR?, ARTIST)gt lt!ELEMENT
TITLE (PCDATA)gt lt!ELEMENT COMPOSER
(PCDATA)gt lt!ELEMENT PRODUCER (PCDATA)gt lt!ELEMENT
PUBLISHER (PCDATA)gt lt!ELEMENT LENGTH
(PCDATA)gt lt!-- This should be a four digit year
like "1999", not a two-digit year like "99"
--gt lt!ELEMENT YEAR (PCDATA)gt lt!ELEMENT ARTIST
(PCDATA)gt
23
Well-formedness
  • Rules
  • Open and close all tags
  • Empty tags end with /gt
  • There is a unique root element
  • Elements may not overlap
  • Attribute values are quoted
  • lt and are only used to start tags and entities
  • Only the five predefined entity references are
    used
  • Plus more...

24
Validity
  • To be valid an XML document must be
  • Well-formed
  • Must have a Document Type Definition (DTD)
  • Must comply with the constraints specified in the
    DTD

25
What Is XML Used for?
  • Domain-Specific Markup Languages
  • XML in industrial applications
    http//www.xml.org/xml/industry_industrysectors.js
    p
  • Self-Describing Data
  • Much data is lost due to format problems.
  • Interchange of Data Among Applications
  • Electronic business RosettaNet, ebXML

26
XML Namespaces
  • XML namespaces are akin to namespaces, packages,
    and modules in programming languages
  • Disambiguation of tagand attributenames from
    different XML applications (spaces) through
    different prefixes
  • A prefix is separated from the local name by a
    , obtaining prefixname tags
  • Namespaces constitute a layer on top of XML 1.0,
    since prefixname is again a valid tag name and
    namespace bindings are ignored by some tools

27
Namespace Bindings
  • Prefixes are bound to namespace URIs by attaching
    an xmlnsprefix attribute to the prefixed element
    or one of its ancestors, prefixname1 ,...,
    prefixnamen
  • The value of the xmlnsprefix attribute is a URI,
    which may or (unlike for DTDs!) may not point to
    a description of the namespaces syntax
  • An element can use bindings for multiple
    name-spaces via attributes xmlnsprefix1 ,...,
    xmlnsprefixm

28
Two-Namespace ExampleSnail-Mail and Telecoms
Address Parts
ltmailaddress xmlnsmail"http//www.deutschepost.
de/" xmlnstele"http//www.telekom.
de/"gt ltmailnamegtXaver M. Lindelt/mailnamegt
ltmailstreetgtWikingerufer 7lt/mailstreetgt
ltmailtowngt10555 Berlinlt/mailtowngt
ltmailbillgt12.50lt/mailbillgt
lttelephonegt030/1234567lt/telephonegt
lttelephonegt030/1234568lt/telephonegt
lttelefaxgt030/1234569lt/telefaxgt
lttelebillgt76.20lt/telebillgt lt/ mailaddressgt
bill disambiguation through mail and tele
prefixes
29
Introduction to RDF
  • RDF (Resource Description Framework)
  • Beyond Machine readable to Machine understandable
  • RDF unites a wide variety of stakeholders
  • Digital librarians, content-raters, privacy
    advocates, B2B industries, AI...
  • Significant (but less than XML) industrial
    momentum, lead by W3C
  • RDF consists of two parts
  • RDF Model (a set of triples)
  • RDF Syntax (different XML serialization syntaxes)
  • RDF Schema for definition of Vocabularies (simple
    Ontologies) for RDF (and in RDF)

Knowledge Markup and Resource Semantics, By
Harold Boley, Stefan Decker, and Michael Sintek,
IJCAI-01 Tutorial, http//www.ijcai-01.org/
30
RDF Data Model
  • Resources
  • A resource is a thing you talk about (can
    reference)
  • Resources have URIs
  • RDF definitions are themselves Resources
    (linkage, see requirement 1)
  • Properties
  • slots, define relationships to other resources or
    atomic values
  • Statements
  • Resource has Property with Value
  • (Values can be resources or atomic XML data)
  • Similar to Frame Systems

31
A Simple Example
  • Statement
  • Ora Lassila is the creator of the resource
    http//www.w3.org/Home/Lassila
  • Structure
  • Resource (subject) http//www.w3.org/Home/Las
    sila
  • Property (predicate) http//www.schema.org/Cre
    ator
  • Value (object) "Ora Lassila
  • Directed graph

sCreator
http//www.w3.org/Home/Lassila
32
Another Example
  • To add properties to Creator, point through an
    intermediate Resource.

http//www.w3.org/Home/Lassila
sCreator
Person//fi/654645635
Email
Name
Ora Lassila
lassila_at_w3.org
33
Collection Containers
  • Multiple occurrences of the same PropertyType
    dont establish a relation between the values
  • The Millers own a boat, a bike, and a TV set
  • The Millers need (a car or a truck)
  • (Sarah and Bob) bought a new car
  • RDF defines three special Resources
  • Bag unordered values rdfBag
  • Sequence ordered values rdfSeq
  • Alternative single value rdfAlt
  • Core RDF does not enforce set semantics amongst
    values

34
Example Bag
  • The students incourse 6.001 are Amy, Tim,John,
    Mary,and Sue

RdfBag
rdftype
/Students/Amy
students
rdf_1
rdf_2
/Students/Tim
bagid1
rdf_3
/Students/John
rdf_4
/Students/Mary
rdf_5
/Students/Sue
35
Example Alternative
  • The source code for X11 may be found at
    ftp.x.org, ftp.cs.purdue.edu, or ftp.eu.net

http//x.org/package/X11
rdfAlt
rdftype
source
altid
rdf_1
ftp.x.org
rdf_2
ftp.cs.purdue.edu
rdf_3
ftp.eu.net
36
Statements About Statements
  • Making statements about statements requires a
    process for transforming them into Resources
  • subject the original resource
  • predicate the original property
  • object the original value
  • type rdfStatement

37
Statements About Statements
Ralph Swick says that Ora Lassila is the creator
of the resource http//www.w3.org/Home/Lassila.
ltrdfRDF xmlnsrdf"http//www.w3.org/1999/
02/22-rdf-syntax-ns" xmlnsa"http//descr
iption.org/schema/"gt ltrdfDescriptiongt
ltrdfsubject resource"http//www.w3.org/Home/Lass
ila" /gt ltrdfpredicate resource"http//descr
iption.org/schema/Creator" /gt
ltrdfobjectgtOra Lassilalt/rdfobjectgt
ltrdftype resource"http//www.w3.org/1999/02/22-r
df-syntax-nsStatement" /gt
ltaattributedTogtRalph Swicklt/aattributedTogt
lt/rdfDescriptiongt lt/rdfRDFgt
38
Representation of a reified statement
Ora Lasilla
http//www.w3.org/Home/Lassila
rdfobject
rdfsubject
rdfpredicate
rdftype
rdfStatement
sCreator
aattributedTo
Ralph Swick
39
Statements About Statements
ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila" bagID"D_001"gt
ltsCreatorgtOra Lassilalt/sCreatorgt
ltsTitlegtOra's Home Pagelt/sTitlegt
lt/rdfDescriptiongt ltrdfDescription
aboutEach"D_001"gt ltaattributedTogtRalph
Swicklt/aattributedTogt lt/rdfDescriptiongt lt/rdf
RDFgt
40
RDF Syntax I
  • Data model does not enforce particular syntax
  • Specification suggests many different syntaxes
    based on XML
  • General form

Subject (OID)
Starts an RDF-Description
ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila"gt ltsCreatorgtOra
Lassilalt/sCreatorgt ltscreatedWith
rdfresourcehttp//www.w3c.org/amaya/gt
lt/rdfDescriptiongt lt/rdfRDFgt
Literal
Resource (possibly another RDF-description)
Properties
41
Resulting Graph
http//www.w3.org/Home/Lassila
screatedWith
sCreator
http//www.w3c.org/amaya
Ora Lassila
ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila"gt ltsCreatorgtOra
Lassilalt/sCreatorgt ltscreatedWith
rdfresourcehttp//www.w3c.org/amaya/gt
lt/rdfDescriptiongt lt/rdfRDFgt
42
RDF Syntax II Syntactic Varieties
Typing Information
Subject (OID)
In-Element Property
ltsHomepage rdfabout"http//www.w3.org/Home/Lass
ila
sCreatorOra Lassila/gt ltscreatedWithgt
ltsHTMLEditor rdfabouthttp//www.w3c.org/a
maya/gt lt/screatedWithgt lt/sHomepagegt
rdftype
sHomepage
http//www.w3.org/Home/Lassila
Property
screatedWith
sCreator
rdftype
HTMLEditor
http//www.w3c.org/amaya
Ora Lassila
43
RDF Schema
44
RDF Schema (RDFS)
  • RDF just defines the data model
  • Need for definition of vocabularies for the data
    model - an Ontology Language!
  • The RDF Schema mechanism provides a basic type
    system for use in RDF models.
  • The RDF schema specification language is less
    expressive, but much simpler to implement, than
    full predicate calculus languages such as CycL
    and KIF.

45
Most Important Modeling Primitives
  • Core Classes
  • Root-Class rdfsResource
  • MetaClass rdfsClass
  • Literals rdfsLiteral
  • rdfssubclassOf-property
  • Inherited from RDF properties (slots)
  • rdfsdomain rdfsrange
  • rdfslabel, rdfscomment, etc.
  • Inherited from RDF InstanceOf (rdftype)

46
Classes and Properties
Resources
Property
  • rdftype
  • rdfssubClassOf
  • rdfssubPropertyOf
  • rdfscomment
  • rdfslabel
  • rdfsseeAlso
  • rdfsisDefinedBy

Classes
  • rdfsResource
  • rdfsClass
  • rdfProperty
  • rdfsConstraintProperty
  • rdfsLiteral

ConstraintProperty
  • rdfsdomain
  • rdfsrange

Classes and Resources as Sets and Elements
47
DARPA Agent Markup LanguageDAML
48
DARPA Agent Markup Language Program
  • DARPA funded Research Program (also funded the
    Development of the ARPANNET -gt Internet)
  • Focusing on building the foundation for the
    Semantic Web http//www.daml.org
  • Ontology Language DAMLOIL Result of a Joint
    (European US-American) Committee
  • Rule Language in preparation

49
DAMLOIL
  • Extension of RDF Schema
  • Ontology Language DAMLOIL Result of a Joint
    (European US-American) Committee
  • Extension of RDF Schema
  • Class Expressions (Intersection, Union,
    Complement)
  • XML Schema Datatypes
  • Enumerations
  • Property Restrictions
  • Cardinality Constraints
  • Value Restrictions

50
Example Intersection Synonyms
ltdamlClass rdfID"TallMan"gt ltdamlintersection
Of rdfparseType"damlcollection"gt
ltdamlClass rdfabout"TallThing"/gt
ltdamlClass rdfabout"Man"/gt
lt/damlintersectionOfgt lt/damlClassgt
ltdamlClass rdfID"HumanBeing"gt ltdamlsameClassA
s rdfresource"Person"/gt lt/damlClassgt
51
Example Disjoint Complement
ltdamlDisjoint rdfparseType"damlcollection"gt lt
damlClass rdfabout"Car"/gt ltdamlClass
rdfabout"Person"/gt ltdamlClass
rdfabout"Plant"/gt lt/damlDisjointgt
Disjoint not strictly necessary, since
expressible via pairwise subClassOf of
complementOf, as for Car and Person
ltdamlClass rdfID"Car"gt ltrdfscommentgtno car
is a personlt/rdfscommentgt ltrdfssubClassOfgt lt
damlClassgt ltdamlcomplementOf
rdfresource"Person"/gt lt/damlClassgt
lt/rdfssubClassOfgt lt/damlClassgt
52
Example Properties (Transitive, Inverse,
subProperty, UniqueProperty, range, Datatypes)
ltdamlTransitiveProperty rdfID"hasAncestor"/gt
ltdamlObjectProperty rdfID"hasChild"gt ltdamlinv
erseOf rdfresource"hasParent"/gt lt/damlObjectPr
opertygt
ltdamlUniqueProperty rdfID"hasMother"gt ltrdfssu
bPropertyOf rdfresource"hasParent"/gt ltrdfsran
ge rdfresource"Female"/gt lt/damlUniqueProperty
gt
ltdamlDatatypeProperty rdfID"age"gt ltrdftype
rdfresource"http//www.daml.org/2001/03/damloil
UniqueProperty"/gt ltrdfsrange
rdfresource"http//www.w3.org/.../XMLSchemanonN
egativeInteger"/gt lt/damlDatatypePropertygt
53
Using User-defined Datatypes(based on XML Schema)
ltxsdsimpleType name"over17"gt lt!--over17 is an
XMLS datatype based on decimal--gt lt!--with the
added restriction that values must be gt18--gt
ltxsdrestriction base"xsddecimal"gt
ltxsdminInclusive value"18"/gt lt/xsdrestriction
gt lt/xsdsimpleTypegt
ltdamlClass rdfID"Adult"gt ltdamlintersectionOf
rdfparseType"damlcollection"gt ltdamlClass
rdfabout"Person"/gt ltdamlRestrictiongt ltda
mlonProperty rdfresource"age"/gt ltdamlhasCl
ass rdfresource"somefileover17"/gt
lt/damlRestrictiongt lt/damlintersectionOfgt
lt/damlClassgt
54
Instances (Individuals)
ltdamlClass rdfID"Person"gt . .
. lt/damlClassgt
ltPerson rdfID"Adam"gt ltrdfslabelgtAdamlt/rdfsla
belgt ltrdfscommentgtAdam is a person.lt/rdfscomme
ntgt ltagegtltxsdinteger rdfvalue"13"/gtlt/agegt
ltshoesizegt ltxsddecimal rdfvalue"9.5"/gt lt/s
hoesizegt lt/Persongt
55
Semantic Web Services
  • Source Anupriya Ankolenkar, et al., DAML-S
    Semantic Markup For Web Services,, Proceedings
    of SWWS 01, the First Semantic Web Working
    Symposium, California, USA, July 30 - August 1,
    2001

56
Web Services
57
What Is DAML-S
  • Users and software agents should be able to
    discover, invoke, compose, and monitor Web
    resources offering particular services and having
    particular properties.
  • As part of the DARPA Agent Markup Language
    program, we have begun to develop an ontology of
    services, called DAML-S.

58
Some Motivating Tasks
  • Automatic Web service discovery
  • Automatic Web service invocation
  • Automatic Web service composition and
    interoperation
  • Automatic Web service execution monitoring

59
Top Level of the Service Ontology
Resource
ServiceProfile
provide
presents
(what it does)
Service
(how it works)
(how to access it)
supports
describedBy
ServiceGrounding
ServiceModel
60
Process Modeling Ontology
61
The Big Picture of SW
62
Editing and Annotation Tools
  • Protégé-2000
  • OntoEdit
  • OilED
  • Amaya

63
An Architecture of RDF Triple Data Store
64
RDF Parser and Generator
  • Using DCG in Prolog as the development tool
  • Formal grammar in RDF MS Spec http//www.w3.org/T
    R/1999/REC-rdf-syntax-19990222/grammar

Formal grammar rules in DCG
Prologs working storage
Prologs inference engine
User interface
65
6.1 RDF 'ltrdfRDFgt' obj
'lt/rdfRDFgt' 6.2 obj
description container 6.3 description
'ltrdfDescription' idAboutAttr? bagIdAttr?
propAttr '/gt'
'ltrdfDescription' idAboutAttr? bagIdAttr?
propAttr 'gt'
propertyElt 'lt/rdfDescriptiongt'
typedNode 6.4 container
sequence bag alternative
rdf(Objs) --gt ('lt?', (nm/'xml'nm/'XML
' nm/'xmls'nm/'XMLS'),
(nm/'version','',qs/_),
(nm/'encoding','',qs/_),
'?gt',wl('XML heading') ),
(fullSTG('RDF',NS) halfSTG('RDF',NS),
'gt' ), objStar(Objs),
(fullETG('RDF',NS) ). objStar(Out) --gt
obj(O), objStar(R),OutOR
,Out.
obj(Obj) --gt container(Obj)
description(_),getAllTriples(Obj). getAllTriples
(Obj)- findall(statement(A,B,C),statement(A,B,C),
Obj). description(_) --gt halfSTG('Descriptio
n',NS), (idAboutAttr(IdAboutAttr)),
(bagIdAttr(BagIdAttr)), propAttrStar(IdAbout
Attr), ('/gt' 'gt', propertyEltS
tar(IdAboutAttr), fullETG('Description',NS)
), reificationOfStatements(IdAboutAttr,BagI
dAttr) typedNode.
66
ltrdfRDF xmlnsrdf"http//www.w3.org/1999/02/22
-rdf-syntax-ns" xmlnsdc"http//purl.org/metad
ata/dublin_core"gt ltrdfDescription
about"http//www.foo.com/cool.html"gt
ltdcCreatorgt ltrdfSeq ID"CreatorsAlphabetic
alBySurname"gt ltrdfligtMary Andrewlt/rdfligt ltrdf
ligtJacky Crystallt/rdfligt lt/rdfSeqgt
lt/dcCreatorgt ltdcIdentifiergt ltrdfBag
ID"MirroredSites"gt ltrdfli rdfresource"http/
/www.foo.com.au/cool.html"/gt ltrdfli
rdfresource"http//www.foo.com.it/cool.html"/gt
lt/rdfBaggt lt/dcIdentifiergt
ltdcTitlegt ltrdfAltgt ltrdfli
xmllang"en"gtThe Coolest Web Pagelt/rdfligt ltrdf
li xmllang"it"gtIl Pagio di Web Fubalt/rdfligt
lt/rdfAltgt lt/dcTitlegtlt/rdfDescriptiongtlt/r
dfRDFgt
RDF input
statement(about/http//www.foo.com/cool.html,
Title, alt(_87882,string/The
Coolest Web Page,
string/Il Pagio di Web Fuba)),
statement(about/http//www.foo.com/cool.html,
Identifier, bag(id/MirroredSites
,resource/http//www.foo.com.au/cool.html,
resource/http//www.foo
.com.it/cool.html)), statement(about/http//www.
foo.com/cool.html, Creator,
seq(id/CreatorsAlphabeticalBySurname,string/Mary
Andrew,
string/Jacky Crystal))
Prolog output
67
RDF Statements in RDB Tables
RDF_NameSpace
RDF_Resource
RDF_Statement
RDF_Predicate
RDF_Literal
68
Application Program Interfaces
  • RDF Query language is syntactically verbose.

ltrdfquerygt ltrdfqFromgt ltrdfBaggt ltli
resource"http//www.research.ibm.com/people/ashok
/paper1.html"/gt ltli resource"http//www.re
search.ibm.com/people/ashok/paper3.html"/gt
ltli resource"http//www.research.ibm.com/people/n
eel/paper1.html"/gt ltli resource"http//www
.research.ibm.com/people/neel/paper7.html"/gt
lt/rdfBaggt lt/rdfqFromgt lt/rdfquerygt
Selecting all resources from a collection
69
Application Program Interfaces
  • We propose a set of frame-based APIs for
    programmers to access the RDF repository.

get_frame - retrieves attribute values for a
frame add_frame - adds or updates attribute
values for a frame del_frame - deletes attribute
values from a frame
70
User Interface
  • Natural language interface is the best choice,
    but is very difficult to obtain a good result.
  • Form-based interface is easy to implement, but is
    too restricted.
  • Hierarchical directory browsing is perhaps a good
    idea, if the domain in question is well
    organized.
  • We also propose a frame-based query interface.

target_concept(attribute1value1, )
teacher(office6th_floor)
71
Related Work
  • Jena
  • HP Labs in Bristol, England
  • Jena is an API in the Java programming language,
    for the creation and manipulation of RDF graphs
  • RDFSuite
  • ICS, Forth, Greece
  • The Validating RDF Parser (VRP)
  • The RDF Schema Specific DataBase (RSSDB)
  • The RDF Query Language (RQL)

72
Related Work
  • CWM (Closed World Machine)
  • A popular Semantic Web RDF program, written in
    Python by Tim Berners-Lee and Dan Connolly.
  • It can handle the Notation3 format, as well as
    XML RDF and NTriples, and can perform a number of
    functions, including applying rules as a forward
    chaining inference engine.

73
Semantic Community Portal
74
Semantic Community Portal
75
Semantic Community Portal
76
Recap The Big Picture of SW
77
Future Work
  • RDF schema-specific validator
  • Frame-based RDF schema-specific query language
  • User interface
  • Automatic generation of community portals
  • Application of digital library and archives
  • Automatic generation of FAQs
  • Agent-Mediated B2B Electronic Commerce
  • Trust on the web

78
Summary
  • RDF repository
  • RDF parser and generator using Prolog
  • RDF triples storage in Prolog and RDB tables
  • Application program interfaces
  • User interfaces (inference engine)
  • Building community portals
  • Agent-based architecture
  • Trust on the Web
Write a Comment
User Comments (0)
About PowerShow.com