Class: RoadForest::Graph::ReadOnlyManager

Inherits:
Object
  • Object
show all
Includes:
RDF::Countable, RDF::Enumerable, RDF::Queryable, Normalization
Defined in:
lib/roadforest/graph/access-manager.rb

Direct Known Subclasses

WriteManager, SourceRigor::RetrieveManager

Constant Summary

Constants included from Normalization

Normalization::Vocabs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from 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, #root_url, #uri, #vocabularies_in_graph

Instance Attribute Details

#resourceObject

Returns the value of attribute resource.



11
12
13
# File 'lib/roadforest/graph/access-manager.rb', line 11

def resource
  @resource
end

#source_graphObject Also known as: origin_graph, destination_graph

Returns the value of attribute source_graph.



11
12
13
# File 'lib/roadforest/graph/access-manager.rb', line 11

def source_graph
  @source_graph
end

Instance Method Details

#build_queryObject



43
44
45
46
47
# File 'lib/roadforest/graph/access-manager.rb', line 43

def build_query
  ::RDF::Query.new([], {}) do |query|
    yield query
  end
end

#dupObject



20
21
22
23
24
25
26
# File 'lib/roadforest/graph/access-manager.rb', line 20

def dup
  other = self.class.allocate
  other.resource = self.resource
  other.source_graph = self.source_graph

  return other
end

#each(&block) ⇒ Object



39
40
41
# File 'lib/roadforest/graph/access-manager.rb', line 39

def each(&block)
  origin_graph.each(&block)
end

#each_statement(&block) ⇒ Object



35
36
37
# File 'lib/roadforest/graph/access-manager.rb', line 35

def each_statement(&block)
  origin_graph.each_statement(&block)
end

#execute_search(search, &block) ⇒ Object



57
58
59
# File 'lib/roadforest/graph/access-manager.rb', line 57

def execute_search(search, &block)
  search.execute(origin_graph, &block)
end

#query_execute(query, &block) ⇒ Object



49
50
51
# File 'lib/roadforest/graph/access-manager.rb', line 49

def query_execute(query, &block)
  execute_search(query, &block)
end

#query_pattern(pattern, &block) ⇒ Object



53
54
55
# File 'lib/roadforest/graph/access-manager.rb', line 53

def query_pattern(pattern, &block)
  execute_search(pattern, &block)
end

#relevant_prefixesObject



31
32
33
# File 'lib/roadforest/graph/access-manager.rb', line 31

def relevant_prefixes
  relevant_prefixes_for_graph(origin_graph)
end

#resetObject



17
18
# File 'lib/roadforest/graph/access-manager.rb', line 17

def reset
end