Data from Application Source Code

looneyvillebiologistInternet and Web Development

Oct 21, 2013 (3 years and 9 months ago)

96 views

Semantic Web Admission Free


Obtaining RDF and OWL

Data from Application Source Code

Matthias Quasthoff, Christoph Meinel

Hasso Plattner Institute, University of Potsdam


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

2

HOW WILL WE IMPLEMENT

SEMANTIC SOFTWARE

?


WILL IT BE FUN

?


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

3

Benefit from semantic technologies in
arbitrary software projects


Software development guidelines


provide some specific functionality (the “service“)


reuse existing data as much as possible/feasible


publish processing results as much as possible/feasible



Example: Web platform to recommend conferences and
plan submission, travel, meetings related to conferences


Functionality: Conference Social Network:

organize CFP mails, manage connections between users/CFPs


Reuse: Semantic descriptions of conferences (SWRC, ESWC),
publications (DC, Bibtex, …), users (FOAF, SWRC)


Publish: Semantic descriptions of conferences, conf. attendance




Competing implementation approaches
for semantic software


Do everything in RDF, SPARQL & Co.




skills, Web frameworks



Do functionality OO, import/export with RDF API

+

skills, Web frameworks



reusability, flexibility



Do everything OO, create OO/SW meta
-
programming feature

+

skills, Web frameworks, reusability, flexibility



extra efforts for meta
-
programming feature



Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

4

Meta
-
Programming with Annotations


@Semantics
(base="http://xmlns.com/foaf/0.1/",


value="Person")

interface/class User {



@Semantics

// guess "name" as relative URI



String name; // property URI automatically



@Semantics
("knows")



Collection<User> getFriends();

}



Have written generic translation OO/SW mechanism


Makes use of
@Semantics

annotations


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

5


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

6

Focus on what to do, not how to do it


Generic mapping between Java classes and ontologies


out …


out.write user.rdf()

… and in …


user = retrieve(identityUri)


// immediately access user.name, user.mbox, …


No need to worry about anonymous individuals, properties, …


1

def user = new Individual(identityUri);


2

new Assertion(user, "foaf:name", "Joe");

3

for(User friend : getFriends())


4


new Assertion(user, "foaf:knows", friend);


5
-


OO/SW Challenges: Trust and Provenance


Trust:

Differing information from different sources


keep provenance (e.g. named graphs), make accessible in OO


provenance useful for context
-
aware trust mechanisms



Fundamental difference in what we expect in OO programs and GUI

class User {


String name;


// one name per user

}



and what we find on the SW


<ex:john> foaf:name "John Doe";


foaf:name "John D. Doe"



Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

7

OO/SW Challenges: Privacy/Performance


Privacy:

Can service retrieve/process/publish data on the Web?


retrieving service needs to assess its compatibility with

-

licenses ( , GNU FDL, Talis, … )

-

privacy policies (e.g. P3P)


when publishing a personal profile, what to publish about
friends (
name

or
mbox_sha1sum
)?


Performance:

Publishing whole connected components expensive


What is relevant about a resource? About neighbor resources?


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

8

OO/SW Mock
-
up and vision


try {


resource = retrieve(uri);


process(resource);

} catch(PolicyException e)

{…}


// processing personal info

} catch(LicensingException e)

{…}

// violating terms of use



resource = retrieve(uri);

myServiceDescription.p3p().strip(resource);

if(myServiceDescription.suits(resource.policy()) {


process(resource);

}



Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

9

Object
-
orientation/Semantic Web
Meta
-
programming


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

10

Semantic Web
-
related

standards + technologies

Meta
-
programming

interface to SW APIs

(Jena, Redland, …)

Application logic,

business processes,

OO functionality

(Java, C#, …, PHP, …)

11

Summary and Future Research


OO familiar to developers, Semantic technology extra


Cumbersome translation OO/Semantic Web


Solution: Map OO classes/fields to semantic concepts


Translation of the objects/individuals without coding



Still required: Best practices


What to code OO, what to do semantic?


Coding vs. reasoning, traversing objects vs. SPARQL, …


How to make provenance transparent to developers


Where to handle trust and privacy?


Semantic Web Admission Free | Matthias Quasthoff | Karlsruhe, Oct. 26, 2008

12

Thank you!



Matthias Quasthoff

Hasso Plattner Institute

University of Potsdam

PF 900460 | 14440 Potsdam

Germany




Get the code

svn://svn.hpi.uni
-
potsdam.de/fb10_util/serialize/trunk


Phone

+49 331 5509
-
512

Mail

Matthias.Quasthoff@hpi.uni
-
potsdam.de

Web

http://www.hpi.uni
-
potsdam.de/meinel/quasthoff