Class: DOWL::Ontology
Instance Attribute Summary
Attributes inherited from DocObject
Instance Method Summary collapse
- #authors ⇒ Object
- #comment ⇒ Object
- #created ⇒ Object
-
#initialize(resource, schema) ⇒ Ontology
constructor
A new instance of Ontology.
- #modified ⇒ Object
- #title ⇒ Object
- #uri ⇒ Object
Methods inherited from DocObject
Constructor Details
#initialize(resource, schema) ⇒ Ontology
Returns a new instance of Ontology.
30 31 32 |
# File 'lib/dowl/ontology.rb', line 30 def initialize(resource, schema) super(resource, schema) end |
Instance Method Details
#authors ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/dowl/ontology.rb', line 54 def () = [] @schema.model.query( RDF::Query::Pattern.new( @resource, DOWL::Namespaces::FOAF.maker ) ) do |statement| << Person.new( statement.object, @schema ) end return .sort end |
#comment ⇒ Object
42 43 44 |
# File 'lib/dowl/ontology.rb', line 42 def comment() return get_literal(DOWL::Namespaces::RDFS.comment) end |
#created ⇒ Object
46 47 48 |
# File 'lib/dowl/ontology.rb', line 46 def created() return get_literal(DOWL::Namespaces::DCTERMS.created) end |
#modified ⇒ Object
50 51 52 |
# File 'lib/dowl/ontology.rb', line 50 def modified() return get_literal(DOWL::Namespaces::DCTERMS.modified) end |
#title ⇒ Object
38 39 40 |
# File 'lib/dowl/ontology.rb', line 38 def title() return get_literal(DOWL::Namespaces::DCTERMS.title) end |
#uri ⇒ Object
34 35 36 |
# File 'lib/dowl/ontology.rb', line 34 def uri() return @resource.to_s end |