Class: BELParser::Resource::JenaTDBReader::Concept

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

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.



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 187

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   =
    if alt_labels.respond_to?(:each)
      alt_labels.map(&:to_s)
    else
      alt_labels.to_s.split('|')
    end
  @encodings  =
    if types.respond_to?(:each)
      convert_encoding_types(types.map(&:to_s))
    else
      convert_encoding_types(types.to_s.split('|'))
    end
end

Instance Attribute Details

#datasetObject (readonly)

Returns the value of attribute dataset.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def dataset
  @dataset
end

#encodingsObject (readonly)

Returns the value of attribute encodings.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def encodings
  @encodings
end

#identifierObject (readonly)

Returns the value of attribute identifier.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def identifier
  @identifier
end

#nameObject (readonly)

Returns the value of attribute name.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def name
  @name
end

#synonymsObject (readonly)

Returns the value of attribute synonyms.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def synonyms
  @synonyms
end

#titleObject (readonly)

Returns the value of attribute title.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def title
  @title
end

#uriObject (readonly)

Returns the value of attribute uri.



184
185
186
# File 'lib/bel_parser/resource/jena_tdb_reader.rb', line 184

def uri
  @uri
end