Class: OpenBEL::Routes::Evidence

Inherits:
Base
  • Object
show all
Includes:
Evidence::FacetFilter, Helpers, OpenBEL::Resource::Evidence
Defined in:
app/openbel/api/routes/evidence.rb

Constant Summary

Constants included from Evidence::FacetFilter

Evidence::FacetFilter::EMPTY, Evidence::FacetFilter::EVIDENCE_PARTS

Constants inherited from Base

Base::DEFAULT_CONTENT_TYPE, 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 Evidence::FacetFilter

#make_filter, #map_citation_facets, #map_evidence_facets, #map_experiment_context_facets, #map_metadata_facets

Methods included from Schemas

#validate

Constructor Details

#initialize(app) ⇒ Evidence

Returns a new instance of Evidence.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'app/openbel/api/routes/evidence.rb', line 16

def initialize(app)
  super

  @api = OpenBEL::Evidence::Evidence.new(
    :host     => OpenBEL::Settings[:evidence_store][:mongo][:host],
    :port     => OpenBEL::Settings[:evidence_store][:mongo][:port],
    :database => OpenBEL::Settings[:evidence_store][:mongo][:database]
  )

  # 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)

  @annotation_transform = AnnotationTransform.new(annotations)
  @annotation_grouping_transform = AnnotationGroupingTransform.new
end