Class: Concept::SKOS::Scheme
- Inherits:
-
Object
- Object
- Concept::SKOS::Scheme
- Includes:
- Singleton
- Defined in:
- app/models/concept/skos/scheme.rb
Overview
virtual root node NB:
-
does not inherit from Concept::Base to avoid being included in all queries based on that class, including indirect ones (e.g. relations)
-
persistence (i.e. a database record) is not required since this is a singleton and merely a static, virtual node
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.rdf_class ⇒ Object
28 29 30 |
# File 'app/models/concept/skos/scheme.rb', line 28 def self.rdf_class :ConceptScheme end |
.rdf_namespace ⇒ Object
32 33 34 |
# File 'app/models/concept/skos/scheme.rb', line 32 def self.rdf_namespace :skos end |
Instance Method Details
#build_rdf_subject(document, controller, &block) ⇒ Object
40 41 42 43 44 |
# File 'app/models/concept/skos/scheme.rb', line 40 def build_rdf_subject(document, controller, &block) ns = IqRdf::Namespace.find_namespace_class(self.class.rdf_namespace.to_sym) raise "Namespace '#{rdf_namespace}' is not defined in IqRdf document." unless ns IqRdf.build_uri(origin, ns.build_uri(self.class.rdf_class), &block) end |
#origin ⇒ Object
36 37 38 |
# File 'app/models/concept/skos/scheme.rb', line 36 def origin :scheme end |