Class: BELParser::Resource::Concept

Inherits:
Object
  • Object
show all
Includes:
Value
Defined in:
lib/bel_parser/resource/concept.rb

Overview

Concept

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Value

#<=>, #==, #hash, #to_s

Constructor Details

#initialize(dataset, uri, pref_label, identifier, title, alt_labels, types) ⇒ Concept

Returns a new instance of Concept.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/bel_parser/resource/concept.rb', line 12

def initialize(dataset, uri, pref_label, identifier,
               title,   alt_labels, types)

  @dataset    = dataset
  @uri        = uri
  @name       = pref_label.to_s
  @identifier = identifier.to_s
  @title      = title.to_s
  @synonyms   = alt_labels.to_s.split('|')
  @encodings  = convert_encoding_types(types.to_s)
end

Instance Attribute Details

#datasetObject (readonly)

Returns the value of attribute dataset.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def dataset
  @dataset
end

#encodingsObject (readonly)

Returns the value of attribute encodings.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def encodings
  @encodings
end

#identifierObject (readonly)

Returns the value of attribute identifier.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def identifier
  @identifier
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def name
  @name
end

#synonymsObject (readonly)

Returns the value of attribute synonyms.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def synonyms
  @synonyms
end

#titleObject (readonly)

Returns the value of attribute title.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def title
  @title
end

#uriObject (readonly)

Returns the value of attribute uri.



9
10
11
# File 'lib/bel_parser/resource/concept.rb', line 9

def uri
  @uri
end