cubicweb – the semantic web is a construction game! student: uglješa milić email:...

Click here to load reader

Upload: samuel-scott

Post on 16-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

CURE: An Efficient Clustering Algorithm for Large Databases

CubicWeb The Semantic Web is a construction game!Student: Ugljea MiliEmail: [email protected] of BelgradeSchool of Electrical EngineeringDepartment of Computer Engineering

Belgrade,December 2011AgendaAbout CubicWebBasic termsExampleConclusionQ&A1/162About CubicWebOpen source, semantic web application framework

Written in Python

Based on two major things:- reusable components (cubes)- well known object-oriented design principles2/16

3About CubicWebIts main features are:an engine driven by the explicit data modela query language named RQL similar to W3Cs SPARQL a selection/view mechanism for representationa library of reusable components (data model and views)the power and flexibility of the Python language the reliability of various databases for storage backends

3/16

4Basic termsCubesA cube is a software component made of three parts:- its data model (schema)- its logic (entities)- its user interface (views)

Data RepositoryThe data repository encapsulates and groups an access to one or more data sourcesAll interactions with the repository are done using the RQL

4/16

5Basic termsSchema (Data model)Described as an entity-relationship schema

ViewsObjects with a dedicated interface to render somethingPartitioned into different kind of objects such as templates, boxes, components5/16

SubjectObjectEntity typeEntity typeRelation definitionRelation type6ExampleInstallation comes with some already defined cubes (file, folder, login, blog)Example based on blog cubeTwo goals:- discovering the default user interface - basic extending and customizing the look and feel

6/16

7Example7/16

The default index page8Example8/16

Adding a blog

9Example9/16

Site schema

10ExampleFurther customization creating your own cube

Cube metadata- in file __pkginfo__.py modify __depends__ dictionary

10/16

__depends__ = { 'cubicweb': '>= 3.10.7', 'cubicweb-blog': None}11ExampleExtending data model- in file schema.py of the cube

11/16

from yams.buildobjs import EntityType, RelationDefinition, String, RichString class Community(EntityType): name = String(maxsize=50, required=True) description = RichString() class community_blog(RelationDefinition): subject = 'Community' object = 'Blog' cardinality = '*?' composite = 'subject'12Example12/16

New site schema

13ExampleFurther extending

13/16

from yams.constraints import StaticVocabularyConstraint class visibility(RelationDefinition): subject = (Blog, MicroBlog) object = 'String' constraints = [StaticVocabularyConstraint (('public', 'authenticated', 'restricted', 'parent'))] default = 'parent' cardinality = '11

class may_be_read_by(RelationDefinition): __permissions__ = { 'read': ('managers', 'users'), 'add': ('managers'), 'delete': ('managers') } subject = (Blog, MicroBlog) object = Community'14ConclusionFramework entirely driven by a data model

Based on reusable components and object-oriented programming principles

Supports OWL and RDF

View/selection principle14/16

15ReferencesCubicWeb The Semantic Web is a construction game, [online] Available at: [Accessed 22 December 2011]

15/16

16Q&A16/16

17