Module: BEL::Resource::ConceptScheme

Included in:
Annotation, Namespace
Defined in:
lib/bel/resource/concept_scheme.rb

Overview

ConceptScheme captures the properties available on an RDF Annotation or Namespace ConceptScheme.

Constant Summary collapse

SKOS =
RDF::Vocab::SKOS
BELV =
RDF::Vocabulary.new('http://www.openbel.org/vocabulary/')

Instance Method Summary collapse

Instance Method Details

#domainObject



30
31
32
33
34
35
36
37
# File 'lib/bel/resource/concept_scheme.rb', line 30

def domain
  solution =
    @rdf_repository
    .query([:subject => @uri, :predicate => BELV.domain])
    .map do |solution|
      solution.object.to_s
    end
end

#pref_labelObject



21
22
23
24
25
26
27
28
# File 'lib/bel/resource/concept_scheme.rb', line 21

def pref_label
  solution =
    @rdf_repository
    .query([:subject => @uri, :predicate => SKOS.prefLabel])
    .map do |solution|
      solution.object.to_s
    end
end

#prefixObject



39
40
41
42
43
44
45
46
# File 'lib/bel/resource/concept_scheme.rb', line 39

def prefix
  solution =
    @rdf_repository
    .query([:subject => @uri, :predicate => BELV.prefix])
    .map do |solution|
      solution.object.to_s
    end
end

#typeObject



12
13
14
15
16
17
18
19
# File 'lib/bel/resource/concept_scheme.rb', line 12

def type
  solution =
    @rdf_repository
    .query([:subject => @uri, :predicate => RDF.type])
    .map do |solution|
      solution.object.to_s
    end
end