Class: RoadForest::Graph::SplitManager

Inherits:
WriteManager show all
Defined in:
lib/roadforest/graph/access-manager.rb

Direct Known Subclasses

CopyManager, SourceRigor::UpdateManager

Constant Summary

Constants included from Normalization

Normalization::Vocabs

Instance Attribute Summary collapse

Attributes inherited from ReadOnlyManager

#resource, #source_graph

Instance Method Summary collapse

Methods inherited from WriteManager

#delete, #insert, #insert_statement

Methods inherited from ReadOnlyManager

#build_query, #each, #each_statement, #execute_search, #query_execute, #query_pattern

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

#target_graphObject Also known as: destination_graph

Returns the value of attribute target_graph.



80
81
82
# File 'lib/roadforest/graph/access-manager.rb', line 80

def target_graph
  @target_graph
end

Instance Method Details

#dupObject



89
90
91
92
93
# File 'lib/roadforest/graph/access-manager.rb', line 89

def dup
  other = super
  other.target_graph = self.target_graph
  return other
end

#each_targetObject



99
100
101
102
103
104
# File 'lib/roadforest/graph/access-manager.rb', line 99

def each_target
  destination_graph.each_context do |context|
    graph = ::RDF::Graph.new(context, :data => target_graph)
    yield(context, graph)
  end
end

#relevant_prefixesObject



95
96
97
# File 'lib/roadforest/graph/access-manager.rb', line 95

def relevant_prefixes
  super.merge(relevant_prefixes_for_graph(destination_graph))
end

#resetObject



84
85
86
87
# File 'lib/roadforest/graph/access-manager.rb', line 84

def reset
  @target_graph ||= ::RDF::Repository.new
  @target_graph.clear
end