Upload
philipp-frischmuth
View
1.205
Download
0
Tags:
Embed Size (px)
DESCRIPTION
A presentation of the OntoWiki Application Framework and the Erfurt API held at the Indian-summer school on Linked Data in Leipzig.
Citation preview
Creating Knowledge out of Interlinked Data
LOD2 Presentation . 02.09.2010 . Page http://lod2.euAKSW, Universität Leipzig
Philipp Frischmuth
OntoWiki Application Framework & Erfurt API
Developing Linked Data Applications with the LOD2 Stack
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Semantic Wiki
OntoWiki• Differences
• Similarities
• Demo
Architecture• Erfurt
• OntoWiki AF
Use Cases
Agenda
2
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Semantic Wiki
• Wiki with added semantics
• Goal: Wiki pages + background knowledge base
• Examples: Semantic MediaWiki, Rhizome, IkeWiki
• OntoWiki takes another approach
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 4
OntoWiki
Semantic (Data-)Wiki
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 5
Conceptual Differences
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 6
Views over Articles
Resource views Wiki articles
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 7
Forms over Markup
Forms Wiki code
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 8
Why do you call that thing a Wiki?
Conceptual Similarities
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 9
© Andrew Laing
WikiWikiWeb
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Wikiwiki Concepts
• Everyone can edit anything
• Content is edited in the same way as structure is
• Activity can be watched and reviewed by everyone
Ward Cunningham
10
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Versioning
Everything can be undone
Philosophy: make it easy to correct mistakes
11
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 12
Vision
1.Generic data wiki for RDF models• No data model mismatch (structured vs.
unstructured)
2.Application framework:• Knowledge-intensive applications,
• Agile processes,
• Distributed user groups
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 13
Demo
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 14
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 14
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 15
Zend Framework
• PHP Framework for web applications
• Extensive documentation
• Outstanding code quality
• BSD-licensed
• Flexibly usable
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Zend Framework contd.
ControllerModel View
16
Provides MVC environment
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Zend Framework contd.
ControllerModel View
• Business logic• SPARQL is here!
16
Provides MVC environment
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Zend Framework contd.
ControllerModel View
• Business logic• SPARQL is here!
• Components• Controller's methods
are called actions• Accessible via URLs
16
Provides MVC environment
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Zend Framework contd.
ControllerModel View
• Business logic• SPARQL is here!
• Components• Controller's methods
are called actions• Accessible via URLs
• OntoWiki_View class• Templates run in
View‘s context• View‘s variables
filled within the controller
16
Provides MVC environment
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 17
Config
Controller
View
Auth Cache
Feed Log
OpenId Session Uri
XmlRpc ...
Zend Framework contd.
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 17
Config
Controller
View
Auth Cache
Feed Log
OpenId Session Uri
XmlRpc ...
Zend Framework contd.
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 18
Architecture
Erfurt API
RDFauthor Extensions
OntoWiki Application Framework
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 18
Architecture
Erfurt API
RDFauthor Extensions
OntoWiki Application Framework
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 19
Erfurt API
• Based on ZF
• Components:• Triple (Quad) Store abstraction
• Authentication + access control
• SPARQL support
• Caching
• Versioning
• ...
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 20
App
Erfurt Packages
Ac Auth
Event
Owl
Cache
Rdf
Rdfs
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 20
App
Erfurt Packages
Ac Auth
Event
Owl
Cache
Rdf
Rdfs
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
App package
• Contains only one class: Erfurt_App
• Base for every Erfurt application
• Singleton pattern
$config = new Zend_Config_Ini('/path/to/config.ini', 'default', true);
// initialize Erfurt application$app = Erfurt_App::start($config);
21
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
App package contd.
• Access Erfurt_App instance from everywhere
• Contains shortcut methods
22
$app = Erfurt_App::getInstance();
$app->authenticate();$app->addUser($username, $password, $email);$app->isActionAllowed($actionSpec);
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
• Grants access to required objects, e.g.:
App package contd.
23
// access the Zend_Auth instance$auth = $app->getAuth();
// access the Erfurt_Ac_Default instance$ac = $app getAc();
// access the Efurt_Store instance$store = $app->getStore();
// access the Erfurt_Cache object, if caching enabled$cache = $app->getCache();
// access the Erfurt_Log object, if logging is enabled$log = $app->getLog()
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 24
Ac AuthApp
Event
Owl
Cache
Rdf
Rdfs
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 24
Ac AuthApp
Event
Owl
Cache
Rdf
Rdfs
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Auth & Ac packages
• RDF based authentication and access control
• Model, action (and statement) based
• Users & groups
• Built-in system ontology contains vocabulary
• Configurable
25
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Auth & Ac packages contd.
26
<sioc:User rdf:about="Admin" rdfs:label="Admin"> <rdfs:comment>This is the pre-configured Admin User.</rdfs:comment> <foaf:accountName rdf:datatype="&xsd;string">Admin</foaf:accountName></sioc:User>
<sioc:Usergroup rdf:about="AdminGroup" rdfs:label="AdminGroup"> <sysont:denyModelEdit rdf:resource="&SysOnt;"/> <sysont:grantAccess rdf:resource="&SysOnt;AnyAction"/> <sysont:grantModelEdit rdf:resource="&SysOnt;AnyModel"/> <sysont:grantModelView rdf:resource="&SysOnt;AnyModel"/> <rdfs:comment>The group of all admins. If not changed, they can trigger all actions and can edit all models but the system ontology.</rdfs:comment> <sioc:has_member rdf:resource="Admin"/></sioc:Usergroup>
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Auth & Ac packages contd.
• Authenticate a user
• Logout
• Gather user information
• Add a new user
27
$app->authenticate('Admin', 'secretpassword');
$app->getAuth()->clearIdentity();
$user = $app->getAuth()->getIdentity();
$app->addUser($username, $password, $email);
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Auth & Ac packages contd.
• Model based access control
• Action based access control
28
$app->getAc()->isModelAllowed('view', $modelUri);$app->getAc()->isAnyModelAllowed('view');$app->getAc()->getAllowedModels('view');$app->getAc()->getDeniedModels('edit');
$app->getAc()->isActionAllowed('RegisterNewUser');$app->getAc()->isAnyActionAllowed();$app->getAc()->getAllowedActions();$app->getAc()->getDeniedActions();
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 29
Store
Ac AuthApp
Event
Owl
Cache
Rdf
Rdfs
Plugin
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 29
Store
Ac AuthApp
Event
Owl
Cache
Rdf
Rdfs
Plugin
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Store package
• Developers use Erfurt_Store class
• Represents a triple (quad) store
• Abstracts different backends
• Adapter pattern
30
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Zend_Db
VirtuosoMySQ
L
Oracle
SQLite
MS SQ
L
PostgreSQL
...
...
Erfurt_Store
Erfurt_App $app->getStore();
31
Store package contd.
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Store package contd.
• Obtain new and existing models
• Remove models from store
• Executes the tasks of Model classes, e.g. SPARQL, adding and removing triples
• Imports and exports RDF in different formats, e.g. RDF/XML, N3, RDF/JSON
32
$app->getStore()->getModel($modelUri);$app->getStore()->getNewModel($modelUri, $baseUri, 'owl');
$app->getStore()->deleteModel($modelUri);
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 33
Owl Rdf
Rdfs
Ac AuthApp
EventCache
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 33
Owl Rdf
Rdfs
Ac AuthApp
EventCache
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
inheritanceRdf, Rdfs & Owl packages
Erfurt_Rdf_Node
Erfurt_Rdf_Resource Erfurt_Rdf_Literal
Erfurt_Rdfs_Resource
Erfurt_Rdfs_Property Erfurt_Rdfs_Instance Erfurt_Rdfs_Class
Erfurt_Owl_Property Erfurt_ Owl_Instance Erfurt_ Owl_Class
Erfurt_Rdf_Model
Erfurt_Rdfs_Model
Erfurt_Owl_Model
34
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Rdf, Rdfs & Owl packages contd.
• Add and delete statements through model class
• Simple way to execute SPARQL queries through model class
35
$model->addStatement($s, $p, $o, $options);$model->deleteStatement($s, $p, $o, $options);$model->deleteMatchingStatements($s, null, null, $options);
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 36
Sparql
Ac AuthApp
Event
Owl
Cache
Rdf
Rdfs
Plugin
Store
Syntax
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 36
Sparql
Ac AuthApp
Event
Owl
Cache
Rdf
Rdfs
Plugin
Store
Syntax
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Sparql package
• Derived from rdfapi-php (RAP)
• Transforms SPARQL Queries to SQL Queries
• Result renderers
• Improvements and bug fixes
37
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Sparql package contd.
• Execute a SPARQL Query
• Result is an array containing s, p and o as keys
• Values are strings
38
$model->sparqlQueryWithPlainResult('SELECT ?s ?p ?o WHERE {?s ?p ?o}');
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Sparql package contd.
• More flexible way through store class
39
$queryObj = Erfurt_Sparql_SimpleQuery::initWithString('SELECT...{ ?s ?p ?o }');
$app->getStore()->sparqlQuery($queryObj, 'xml');
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 40
Event
Plugin
Ac AuthApp
Owl
Cache
Rdf
Rdfs Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 40
Event
Plugin
Ac AuthApp
Owl
Cache
Rdf
Rdfs Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Event & Plugin packages
• Event dispatcher
• Plugin manager
• Base for Erfurt and OntoWiki plugins
41
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 42
Cache
Ac AuthApp
Event
Owl Rdf
Rdfs
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 42
Cache
Ac AuthApp
Event
Owl Rdf
Rdfs
Plugin
Store
Syntax
Sparql
Namespaces
Uri Utils
WrapperVersioning
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Cache package
• Caching of exspensive SPARQL queries
• Uses triple patterns for invalidation
• Object cache for complex/expensive results
43
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
• Erfurt is open source
• Github: https://github.com/AKSW/Erfurt
44
Erfurt on Github
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 45
Architecture
OntoWiki Application Framework
RDFauthor Extensions
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 45
Architecture
OntoWiki Application Framework
RDFauthor Extensions
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Interfaces
• SPARQL Endpoint
• Linked Data Endpoint
• WebDAV
• REST API
• Command Line Interface
• LDAP
46
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Extensibility
• Components, Plugins, Modules, Wrapper
• Views/Templates
• Themes
• Localizations
47
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Access Control
• Model-based
• Action-based
• (Statement-based)
48
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 49
RDFauthor
Architecture
Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 49
RDFauthor
Architecture
Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 50
RDFa
RDFauthor
• Automatically generates forms from RDFa annoated content
• JavaScript library
• Used within OntoWiki but independent
• „Save to OntoWiki“ functionality
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 51
Architecture
ExtensionsRDFauthor
OntoWiki Application Framework
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 51
Architecture
ExtensionsRDFauthor
OntoWiki Application Framework
Erfurt API
Zend Framework
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 52
Components
• Provide controller
• Access via URL
• Custom views (optional)
• Map, OpenId, Community
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 53
Modules
• „Little Boxes“
• Provide additional GUI-elements
• Navigation, Login
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 54
Plugins
• Register for events
• Execution of arbitrary code
• Manipulation of input data
• Versioning, image links
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 55
Wrapper
• Generate RDF data for arbitrary resources
• Examples:
• Linked Data
• Exif
• Geodata
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 56
Extension mechanisms
• Components
• Modules
• Plugins
• Wrapper
• Additional: Themes, Localizations
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 57
Use Cases
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
SoftWiki Platform
• Collaborative requirements engineering
• OntoWiki base system
• Custom views
58
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 59
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
Caucasian Spiders
• Faunistic database on spiders of the Caucasus
• Taxonomy
• Localities
• 240k triples
60
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 61
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 62
Vakantieland.nl
• Dutch tourism portal
• Independent application based on Erfurt
• OntoWiki for data management
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 63
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 64
Catalogus Professorum
• Knowledge base with historical data
• Teaching staff of Universität Leipzig
• Generic OntoWiki with Virtuoso backend for data management
• Generation of HTML pages from RDF content
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 65
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page 66
Creating Knowledge out of Interlinked Data
http://lod2.euISSLOD 2011 . 2011-09-14 . Leipzig . Page
• OntoWiki is open source
• Google Code:
• http://code.google.com/p/ontowiki/
67
OntoWiki on Google Code
Creating Knowledge out of Interlinked Data
LOD2 Presentation . 02.09.2010 . Page http://lod2.eu
Thank you for your attention!
Creating Knowledge out of Interlinked Data
LOD2 Presentation . 02.09.2010 . Page http://lod2.eu
Thank you for your attention!
Questions?