Class: RoadForest::Graph::GraphCopier

Inherits:
GraphFocus
  • Object
show all
Defined in:
lib/roadforest/graph/graph-copier.rb

Constant Summary

Constants included from Normalization

Normalization::Vocabs

Instance Attribute Summary

Attributes inherited from GraphFocus

#access_manager, #subject

Instance Method Summary collapse

Methods inherited from GraphFocus

#<<, #add, #add_list, #add_node, #all, #as_list, #create_node, #delete, #dup, #empty_list, #find_or_add, #first, #forward_properties, #get, #initialize, #inspect, #normalize_triple, #relevant_prefixes, #reset, #rev, #rev_all, #rev_first, #reverse_properties, #root_url, #root_url=, #set, #set_node, #to_context, #unwrap_value, #wrap_node

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

Constructor Details

This class inherits a constructor from RoadForest::Graph::GraphFocus

Instance Method Details

#query_value(query) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/roadforest/graph/graph-copier.rb', line 7

def query_value(query)
  #This isn't the most efficient way to do this (the query essentially
  #happens twice) but the intended use of GC is to copy small numbers of
  #patterns between small graphs, so the n is small
  query.patterns.each do |pattern|
    pattern.execute(@access_manager) do |statement|
      @access_manager.insert(statement)
    end
  end
  super
end