Class: RoadForest::RDF::SourceRigor

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/rdf/source-rigor.rb,
lib/roadforest/rdf/source-rigor/credence.rb,
lib/roadforest/rdf/source-rigor/credence/any.rb,
lib/roadforest/rdf/source-rigor/investigator.rb,
lib/roadforest/rdf/source-rigor/credence-annealer.rb,
lib/roadforest/rdf/source-rigor/http-investigator.rb,
lib/roadforest/rdf/source-rigor/null-investigator.rb,
lib/roadforest/rdf/source-rigor/credence/role-if-available.rb,
lib/roadforest/rdf/source-rigor/credence/none-if-role-absent.rb

Defined Under Namespace

Modules: Credence Classes: CredenceAnnealer, HTTPInvestigator, Investigator, NoCredibleResults, NotCredible, NullInvestigator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSourceRigor

Returns a new instance of SourceRigor.



24
25
26
27
28
# File 'lib/roadforest/rdf/source-rigor.rb', line 24

def initialize
  @investigators = []
  @investigation_limit = 3
  @credence_policies = []
end

Instance Attribute Details

#credence_policiesObject

Returns the value of attribute credence_policies.



30
31
32
# File 'lib/roadforest/rdf/source-rigor.rb', line 30

def credence_policies
  @credence_policies
end

#graph_transferObject

Returns the value of attribute graph_transfer.



30
31
32
# File 'lib/roadforest/rdf/source-rigor.rb', line 30

def graph_transfer
  @graph_transfer
end

#investigation_limitObject

Returns the value of attribute investigation_limit.



30
31
32
# File 'lib/roadforest/rdf/source-rigor.rb', line 30

def investigation_limit
  @investigation_limit
end

#investigatorsObject

Returns the value of attribute investigators.



30
31
32
# File 'lib/roadforest/rdf/source-rigor.rb', line 30

def investigators
  @investigators
end

Class Method Details

.httpObject



16
17
18
19
20
21
# File 'lib/roadforest/rdf/source-rigor.rb', line 16

def http
  rigor = self.new
  rigor.policy_list(:may_subject, :any) #XXX
  rigor.investigator_list(:http, :null)
  rigor
end

.simpleObject



9
10
11
12
13
14
# File 'lib/roadforest/rdf/source-rigor.rb', line 9

def simple
  rigor = self.new
  rigor.policy_list(:must_local, :may_local)
  rigor.investigator_list(:null)
  rigor
end

Instance Method Details

#investigator_list(*names) ⇒ Object



38
39
40
41
42
# File 'lib/roadforest/rdf/source-rigor.rb', line 38

def investigator_list(*names)
  self.investigators = names.map do |name|
    Investigator[name].new
  end
end

#policy_list(*names) ⇒ Object



32
33
34
35
36
# File 'lib/roadforest/rdf/source-rigor.rb', line 32

def policy_list(*names)
  self.credence_policies = names.map do |name|
    Credence.policy(name)
  end
end