Class: RoadForest::Application::ServicesHost

Inherits:
Object
  • Object
show all
Includes:
Graph::Normalization
Defined in:
lib/roadforest/application/services-host.rb

Overview

XXX Worth doing some meta to get reality checking of configs here? Better fail early if there’s no DB configured, right?

Constant Summary

Constants included from Graph::Normalization

Graph::Normalization::Vocabs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Graph::Normalization

#expand_curie, #expand_curie_pair, #interned_uri, #literal, #normalize_context, #normalize_property, #normalize_resource, #normalize_statement, #normalize_term, #normalize_tuple, #normalize_uri, #relevant_prefixes_for_graph, #uri, #vocabularies_in_graph

Constructor Details

#initializeServicesHost

Returns a new instance of ServicesHost.



8
9
# File 'lib/roadforest/application/services-host.rb', line 8

def initialize
end

Instance Attribute Details

#application=(value) ⇒ Object (writeonly)

Sets the attribute application

Parameters:

  • value

    the value to set the attribute application to.



11
12
13
# File 'lib/roadforest/application/services-host.rb', line 11

def application=(value)
  @application = value
end

#authorizationObject Also known as: authz



35
36
37
38
39
40
41
# File 'lib/roadforest/application/services-host.rb', line 35

def authorization
  @authorization ||=
    begin
      require 'roadforest/authorization'
      Authorization::Manager.new
    end
end

#canonical_hostObject



18
19
20
# File 'lib/roadforest/application/services-host.rb', line 18

def canonical_host
  @canonical_host ||= RDF::URI.intern(@root_url)
end

#default_content_engineObject

Returns the value of attribute default_content_engine.



16
17
18
# File 'lib/roadforest/application/services-host.rb', line 16

def default_content_engine
  @default_content_engine
end

#loggerObject



43
44
45
46
47
48
49
# File 'lib/roadforest/application/services-host.rb', line 43

def logger
  @logger ||=
    begin
      require 'logger'
      Logger.new("roadforest.log")
    end
end

#root_urlObject

Returns the value of attribute root_url.



14
15
16
# File 'lib/roadforest/application/services-host.rb', line 14

def root_url
  @root_url
end

#router=(value) ⇒ Object (writeonly)

Sets the attribute router

Parameters:

  • value

    the value to set the attribute router to.



12
13
14
# File 'lib/roadforest/application/services-host.rb', line 12

def router=(value)
  @router = value
end

#type_handling=(value) ⇒ Object (writeonly)

Sets the attribute type_handling

Parameters:

  • value

    the value to set the attribute type_handling to.



12
13
14
# File 'lib/roadforest/application/services-host.rb', line 12

def type_handling=(value)
  @type_handling = value
end

Instance Method Details

#augmenterObject



22
23
24
# File 'lib/roadforest/application/services-host.rb', line 22

def augmenter
  @augmenter ||= Augment::Augmenter.new(self)
end

#dispatcherObject Also known as: router



26
27
28
# File 'lib/roadforest/application/services-host.rb', line 26

def dispatcher
  @dispatcher ||= Dispatcher.new(self)
end

#path_providerObject



31
32
33
# File 'lib/roadforest/application/services-host.rb', line 31

def path_provider
  @path_provider ||= router.path_provider
end