FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
OntoWiki Application Framework & Erfurt API
1. Creating Knowledge out of Interlinked Data
Developing Linked Data Applications
with the LOD2 Stack
OntoWiki Application Framework & Erfurt API
Philipp Frischmuth
AKSW, Universität Leipzig
LOD2 Presentation . 02.09.2010 . Page http://lod2.eu
2. Creating Knowledge out of Interlinked Data
Agenda
Semantic Wiki
OntoWiki
• Differences
• Similarities
• Demo
Architecture
• Erfurt
• OntoWiki AF
Use Cases
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 2 http://lod2.eu
3. Creating Knowledge out of Interlinked Data
Semantic Wiki
• Wiki with added semantics
• Goal: Wiki pages + background knowledge
base
• Examples: Semantic MediaWiki, Rhizome,
IkeWiki
• OntoWiki takes another approach
ISSLOD 2011 . 2011-09-14 . Leipzig . Page http://lod2.eu
4. Creating Knowledge out of Interlinked Data
OntoWiki
Semantic (Data-)Wiki
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 4 http://lod2.eu
5. Creating Knowledge out of Interlinked Data
Conceptual Differences
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 5 http://lod2.eu
6. Creating Knowledge out of Interlinked Data
Views over Articles
Resource views Wiki articles
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 6 http://lod2.eu
7. Creating Knowledge out of Interlinked Data
Forms over Markup
Forms Wiki code
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 7 http://lod2.eu
8. Creating Knowledge out of Interlinked Data
Why do you call that thing a
Wiki?
Conceptual Similarities
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 8 http://lod2.eu
10. Creating Knowledge out of Interlinked Data
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
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 10 http://lod2.eu
11. Creating Knowledge out of Interlinked Data
Versioning
Everything can be undone
Philosophy: make it easy to correct mistakes
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 11 http://lod2.eu
12. Creating Knowledge out of Interlinked Data
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
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 12 http://lod2.eu
13. Creating Knowledge out of Interlinked Data
Demo
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 13 http://lod2.eu
14. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 14 http://lod2.eu
15. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 14 http://lod2.eu
16. Creating Knowledge out of Interlinked Data
Zend Framework
• PHP Framework for web applications
• Extensive documentation
• Outstanding code quality
• BSD-licensed
• Flexibly usable
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 15 http://lod2.eu
17. Creating Knowledge out of Interlinked Data
Zend Framework contd.
Provides MVC environment
Model Controller View
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 16 http://lod2.eu
18. Creating Knowledge out of Interlinked Data
Zend Framework contd.
Provides MVC environment
Model Controller View
• Business logic
• SPARQL is here!
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 16 http://lod2.eu
19. Creating Knowledge out of Interlinked Data
Zend Framework contd.
Provides MVC environment
Model Controller View
• Business logic • Components
• SPARQL is here! • Controller's methods
are called actions
• Accessible via URLs
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 16 http://lod2.eu
20. Creating Knowledge out of Interlinked Data
Zend Framework contd.
Provides MVC environment
Model Controller View
• Business logic • Components • OntoWiki_View
• SPARQL is here! • Controller's methods class
are called actions • Templates run in
• Accessible via URLs View‘s context
• View‘s variables
filled within the
controller
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 16 http://lod2.eu
21. Creating Knowledge out of Interlinked Data
Zend Framework contd.
Auth Cache Config
Controller Feed Log
OpenId Session Uri
View XmlRpc ...
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 17 http://lod2.eu
22. Creating Knowledge out of Interlinked Data
Zend Framework contd.
Auth Cache Config
Controller Feed Log
OpenId Session Uri
View XmlRpc ...
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 17 http://lod2.eu
23. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 18 http://lod2.eu
24. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 18 http://lod2.eu
25. Creating Knowledge out of Interlinked Data
Erfurt API
• Based on ZF
• Components:
• Triple (Quad) Store abstraction
• Authentication + access control
• SPARQL support
• Caching
• Versioning
• ...
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 19 http://lod2.eu
26. Creating Knowledge out of Interlinked Data
Erfurt Packages
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 20 http://lod2.eu
27. Creating Knowledge out of Interlinked Data
Erfurt Packages
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 20 http://lod2.eu
28. Creating Knowledge out of Interlinked Data
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);
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 21 http://lod2.eu
29. Creating Knowledge out of Interlinked Data
App package contd.
• Access Erfurt_App instance from everywhere
$app = Erfurt_App::getInstance();
• Contains shortcut methods
$app->authenticate();
$app->addUser($username, $password, $email);
$app->isActionAllowed($actionSpec);
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 22 http://lod2.eu
30. Creating Knowledge out of Interlinked Data
App package contd.
• Grants access to required objects, e.g.:
// 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()
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 23 http://lod2.eu
31. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 24 http://lod2.eu
32. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 24 http://lod2.eu
33. Creating Knowledge out of Interlinked Data
Auth & Ac packages
• RDF based authentication and access control
• Model, action (and statement) based
• Users & groups
• Built-in system ontology contains vocabulary
• Configurable
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 25 http://lod2.eu
34. Creating Knowledge out of Interlinked Data
Auth & Ac packages contd.
<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>
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 26 http://lod2.eu
35. Creating Knowledge out of Interlinked Data
Auth & Ac packages contd.
• Authenticate a user
$app->authenticate('Admin', 'secretpassword');
• Logout
$app->getAuth()->clearIdentity();
• Gather user information
$user = $app->getAuth()->getIdentity();
• Add a new user
$app->addUser($username, $password, $email);
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 27 http://lod2.eu
36. Creating Knowledge out of Interlinked Data
Auth & Ac packages contd.
• Model based access control
$app->getAc()->isModelAllowed('view', $modelUri);
$app->getAc()->isAnyModelAllowed('view');
$app->getAc()->getAllowedModels('view');
$app->getAc()->getDeniedModels('edit');
• Action based access control
$app->getAc()->isActionAllowed('RegisterNewUser');
$app->getAc()->isAnyActionAllowed();
$app->getAc()->getAllowedActions();
$app->getAc()->getDeniedActions();
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 28 http://lod2.eu
37. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 29 http://lod2.eu
38. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 29 http://lod2.eu
39. Creating Knowledge out of Interlinked Data
Store package
• Developers use Erfurt_Store class
• Represents a triple (quad) store
• Abstracts different backends
• Adapter pattern
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 30 http://lod2.eu
40. Creating Knowledge out of Interlinked Data
Store package contd.
Erfurt_App $app->getStore();
Erfurt_Store
Zend_Db
Virtuoso ...
PostgreSQL
MS SQL
MySQL
SQLite
Oracle
...
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 31 http://lod2.eu
41. Creating Knowledge out of Interlinked Data
Store package contd.
• Obtain new and existing models
$app->getStore()->getModel($modelUri);
$app->getStore()->getNewModel($modelUri, $baseUri, 'owl');
• Remove models from store
$app->getStore()->deleteModel($modelUri);
• 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
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 32 http://lod2.eu
42. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 33 http://lod2.eu
43. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 33 http://lod2.eu
45. Creating Knowledge out of Interlinked Data
Rdf, Rdfs & Owl packages contd.
• Add and delete statements through model class
$model->addStatement($s, $p, $o, $options);
$model->deleteStatement($s, $p, $o, $options);
$model->deleteMatchingStatements($s, null, null, $options);
• Simple way to execute SPARQL queries
through model class
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 35 http://lod2.eu
46. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 36 http://lod2.eu
47. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 36 http://lod2.eu
48. Creating Knowledge out of Interlinked Data
Sparql package
• Derived from rdfapi-php (RAP)
• Transforms SPARQL Queries to SQL Queries
• Result renderers
• Improvements and bug fixes
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 37 http://lod2.eu
49. Creating Knowledge out of Interlinked Data
Sparql package contd.
• Execute a SPARQL Query
$model->sparqlQueryWithPlainResult('SELECT ?s ?p ?o WHERE {?s ?p ?o}');
• Result is an array containing s, p and o as
keys
• Values are strings
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 38 http://lod2.eu
50. Creating Knowledge out of Interlinked Data
Sparql package contd.
• More flexible way through store class
$queryObj = Erfurt_Sparql_SimpleQuery::initWithString('SELECT...{ ?s ?p ?o }');
$app->getStore()->sparqlQuery($queryObj, 'xml');
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 39 http://lod2.eu
51. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 40 http://lod2.eu
52. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 40 http://lod2.eu
53. Creating Knowledge out of Interlinked Data
Event & Plugin packages
• Event dispatcher
• Plugin manager
• Base for Erfurt and OntoWiki plugins
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 41 http://lod2.eu
54. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 42 http://lod2.eu
55. Creating Knowledge out of Interlinked Data
Ac App Auth
Cache Event Namespaces
Owl Plugin Rdf
Rdfs Sparql Store
Syntax Uri Utils
Versioning Wrapper
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 42 http://lod2.eu
56. Creating Knowledge out of Interlinked Data
Cache package
• Caching of exspensive SPARQL queries
• Uses triple patterns for invalidation
• Object cache for complex/expensive results
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 43 http://lod2.eu
57. Creating Knowledge out of Interlinked Data
Erfurt on Github
• Erfurt is open source
• Github: https://github.com/AKSW/Erfurt
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 44 http://lod2.eu
58. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 45 http://lod2.eu
59. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 45 http://lod2.eu
60. Creating Knowledge out of Interlinked Data
Interfaces
• SPARQL Endpoint
• Linked Data Endpoint
• WebDAV
• REST API
• Command Line Interface
• LDAP
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 46 http://lod2.eu
61. Creating Knowledge out of Interlinked Data
Extensibility
• Components, Plugins, Modules, Wrapper
• Views/Templates
• Themes
• Localizations
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 47 http://lod2.eu
62. Creating Knowledge out of Interlinked Data
Access Control
• Model-based
• Action-based
• (Statement-based)
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 48 http://lod2.eu
63. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 49 http://lod2.eu
64. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 49 http://lod2.eu
65. Creating Knowledge out of Interlinked Data
RDFauthor
• Automatically generates forms from RDFa
annoated content
• JavaScript library
• Used within OntoWiki but independent RDFa
• „Save to OntoWiki“ functionality
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 50 http://lod2.eu
66. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 51 http://lod2.eu
67. Creating Knowledge out of Interlinked Data
Architecture
RDFauthor Extensions
OntoWiki Application Framework
Erfurt API
Zend Framework
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 51 http://lod2.eu
68. Creating Knowledge out of Interlinked Data
Components
• Provide controller
• Access via URL
• Custom views
(optional)
• Map, OpenId,
Community
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 52 http://lod2.eu
69. Creating Knowledge out of Interlinked Data
Modules
• „Little Boxes“
• Provide additional GUI-
elements
• Navigation, Login
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 53 http://lod2.eu
70. Creating Knowledge out of Interlinked Data
Plugins
• Register for events
• Execution of arbitrary
code
• Manipulation of input
data
• Versioning, image links
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 54 http://lod2.eu
71. Creating Knowledge out of Interlinked Data
Wrapper
• Generate RDF data for arbitrary resources
• Examples:
• Linked Data
• Exif
• Geodata
• Twitter
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 55 http://lod2.eu
73. Creating Knowledge out of Interlinked Data
Use Cases
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 57 http://lod2.eu
74. Creating Knowledge out of Interlinked Data
SoftWiki Platform
• Collaborative requirements engineering
• OntoWiki base system
• Custom views
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 58 http://lod2.eu
75. Creating Knowledge out of Interlinked Data
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 59 http://lod2.eu
76. Creating Knowledge out of Interlinked Data
Caucasian Spiders
• Faunistic database on spiders of the
Caucasus
• Taxonomy
• Localities
• 240k triples
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 60 http://lod2.eu
77. Creating Knowledge out of Interlinked Data
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 61 http://lod2.eu
78. Creating Knowledge out of Interlinked Data
Vakantieland.nl
• Dutch tourism portal
• Independent application based on Erfurt
• OntoWiki for data management
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 62 http://lod2.eu
79. Creating Knowledge out of Interlinked Data
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 63 http://lod2.eu
80. Creating Knowledge out of Interlinked Data
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
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 64 http://lod2.eu
81. Creating Knowledge out of Interlinked Data
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 65 http://lod2.eu
82. Creating Knowledge out of Interlinked Data
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 66 http://lod2.eu
83. Creating Knowledge out of Interlinked Data
OntoWiki on Google Code
• OntoWiki is open source
• Google Code:
• http://code.google.com/p/ontowiki/
ISSLOD 2011 . 2011-09-14 . Leipzig . Page 67 http://lod2.eu
84. Creating Knowledge out of Interlinked Data
Thank you for your attention!
LOD2 Presentation . 02.09.2010 . Page http://lod2.eu
85. Creating Knowledge out of Interlinked Data
Thank you for your attention!
LOD2 Presentation . 02.09.2010 . Page Questions?
http://lod2.eu