Class: OpenBEL::Routes::Annotations

Inherits:
Base
  • Object
show all
Includes:
BEL::Language
Defined in:
app/openbel/api/routes/annotations.rb

Constant Summary collapse

SORTED_FUNCTIONS =
FUNCTIONS.values.uniq.sort_by { |fx|
  fx[:short_form]
}

Constants inherited from Base

Base::DEFAULT_CONTENT_TYPE, Base::DEFAULT_CONTENT_TYPE_ID, Base::RESOURCE_SERIALIZERS, Base::SCHEMA_BASE_URL, Base::SPOKEN_CONTENT_TYPES

Constants included from Schemas

Schemas::COMPILED_SCHEMAS, Schemas::SCHEMA_DIR, Schemas::SUFFIX

Constants included from OpenBEL::Resource::Namespaces

OpenBEL::Resource::Namespaces::VOCABULARY_RDF

Constants included from OpenBEL::Resource::Annotations

OpenBEL::Resource::Annotations::VOCABULARY_RDF

Instance Method Summary collapse

Methods included from Schemas

#validate

Constructor Details

#initialize(app) ⇒ Annotations

Returns a new instance of Annotations.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/openbel/api/routes/annotations.rb', line 13

def initialize(app)
  super

  # RdfRepository using Jena.
  @rr = BEL::RdfRepository.plugins[:jena].create_repository(
    :tdb_directory => OpenBEL::Settings[:resource_rdf][:jena][:tdb_directory]
  )

  # Annotations using RdfRepository
  @annotations = BEL::Resource::Annotations.new(@rr)

  # Resource Search using SQLite.
  @search = BEL::Resource::Search.plugins[:sqlite].create_search(
    :database_file => OpenBEL::Settings[:resource_search][:sqlite][:database_file]
  )
end