DbdOnto

Ontologies for Dbd.

First a limited context ontology is constructed, because it is required for all facts. This context ontology also has a "meta" context itself (using the context predicates defined in itself, to bootstrap the system).

The context ontology uses one meta:defines_predicate attribute from a new Meta ontology. This is needed to describe the definition of predicates, since predicates cannot be the subject of Fact (in Dbd, a subject is an abstract UUID, not a URI, so a link is needed between a resource (all facts with the same subject) and the predicate (that is then the object for this fact that defines the predicate)).

Gem Version Build Status

Installation

Add this line to your application's Gemfile:

gem 'dbd_onto'

Usage

E.g. use the predicates defined in DbdOnto::Context to fully populate a Context.

Examples

The ontology is stored as a Dbd::Graph. Displaying it in short format:

$ irb
2.0.0p247 :001 > require 'dbd_onto'
 => true
2.0.0p247 :002 > DbdOnto::Meta.new.each {|f| puts f.short} ; nil
[ cont ] : 36c0b50f : context:visibility       : public
[ cont ] : 36c0b50f : context:encryption       : clear
[ cont ] : 36c0b50f : context:license          : Copyright 2013 Peter Vandenabeele (http://vandenabeele.com), licensed under MIT
[ cont ] : 36c0b50f : dc:source                : https://github.com/petervandenabeele/dbd/blob/d37360070e7f8e61a19c2bca210c881a15
[ cont ] : 36c0b50f : dc:creator               : Peter Vandenabeele (@peter_v)
[ cont ] : 36c0b50f : dcterms:created          : 2013-08-09 21:45:00 UTC
36c0b50f : 619e69d4 : meta:defines_predicate   : meta:defines_predicate
36c0b50f : 619e69d4 : rdfs:label               : Defines predicate
 => nil
2.0.0p247 :003 >  DbdOnto::Context.new.each {|f| puts f.short} ; nil
[ cont ] : 36c0b50f : context:visibility       : public
[ cont ] : 36c0b50f : context:encryption       : clear
[ cont ] : 36c0b50f : context:license          : Copyright 2013 Peter Vandenabeele (http://vandenabeele.com), licensed under MIT
[ cont ] : 36c0b50f : dc:source                : https://github.com/petervandenabeele/dbd/blob/d37360070e7f8e61a19c2bca210c881a15
[ cont ] : 36c0b50f : dc:creator               : Peter Vandenabeele (@peter_v)
[ cont ] : 36c0b50f : dcterms:created          : 2013-08-09 21:45:00 UTC
36c0b50f : 03e72b0c : meta:defines_predicate   : context:visibility
36c0b50f : 03e72b0c : rdfs:label               : Visibility
36c0b50f : 735ae2a2 : meta:defines_predicate   : context:encryption
36c0b50f : 735ae2a2 : rdfs:label               : Encryption
36c0b50f : 5b2c73e5 : meta:defines_predicate   : context:license
36c0b50f : 5b2c73e5 : rdfs:label               : License
36c0b50f : ffc41d9c : meta:defines_predicate   : dc:source
36c0b50f : ffc41d9c : rdfs:label               : Source
36c0b50f : 2b5008b0 : meta:defines_predicate   : dc:creator
36c0b50f : 2b5008b0 : rdfs:label               : Creator
36c0b50f : 4aba46de : meta:defines_predicate   : dcterms:created
36c0b50f : 4aba46de : rdfs:label               : Created
 => nil