Module: BEL::Resource::Concept
- Included in:
- AnnotationValue, NamespaceValue
- Defined in:
- lib/bel/resource/concept.rb
Overview
Concept captures the properties available on an RDF Annotation or Namespace Concept.
Constant Summary collapse
- DC =
RDF::Vocab::DC
- SKOS =
RDF::Vocab::SKOS
- BELV =
RDF::Vocabulary.new('http://www.openbel.org/vocabulary/')
Instance Method Summary collapse
- #alt_label ⇒ Object
- #from_species ⇒ Object
- #identifier ⇒ Object
- #pref_label ⇒ Object
- #title ⇒ Object
- #type ⇒ Object
Instance Method Details
#alt_label ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/bel/resource/concept.rb', line 45 def alt_label @rdf_repository .query([:subject => @uri, :predicate => SKOS.altLabel]) .map do |solution| solution.object.to_s end end |
#from_species ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/bel/resource/concept.rb', line 53 def from_species @rdf_repository .query([:subject => @uri, :predicate => BELV.fromSpecies]) .map do |solution| solution.object.to_s end end |
#identifier ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/bel/resource/concept.rb', line 29 def identifier @rdf_repository .query([:subject => @uri, :predicate => DC.identifier]) .map do |solution| solution.object.to_s end end |
#pref_label ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/bel/resource/concept.rb', line 21 def pref_label @rdf_repository .query([:subject => @uri, :predicate => SKOS.prefLabel]) .map do |solution| solution.object.to_s end end |
#title ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/bel/resource/concept.rb', line 37 def title @rdf_repository .query([:subject => @uri, :predicate => DC.title]) .map do |solution| solution.object.to_s end end |
#type ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/bel/resource/concept.rb', line 13 def type @rdf_repository .query([:subject => @uri, :predicate => RDF.type]) .map do |solution| solution.object.to_s end end |