Class: RoadForest::PathMatcher::ReverseEdge

Inherits:
Edge show all
Defined in:
lib/roadforest/path-matcher.rb

Instance Attribute Summary

Attributes inherited from Edge

#accepting_count, #max_multi, #max_repeat, #min_multi, #min_repeat, #predicate, #rejecting_count

Attributes inherited from MatchStep

#after, #before, #children, #exact_value, #graph, #graph_term, #order, #parent, #pattern, #pattern_step, #repeats, #satified, #stem, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Edge

#accepting?, #available_count, #build_children, edge_query_pattern, #excluded?, find_child_edges, #from, #notify_resolved, #rejecting?, #reset, #resolved?, #satisfied?, #step_count, #to_s

Methods inherited from MatchStep

#immediate_match, #initialize, #matched_statements, #open, #pretty_print_instance_variables, #reset

Constructor Details

This class inherits a constructor from RoadForest::PathMatcher::MatchStep

Class Method Details

.path_directionObject



248
249
250
# File 'lib/roadforest/path-matcher.rb', line 248

def self.path_direction
  Graph::Path.reverse
end

Instance Method Details

#graph_node(statement) ⇒ Object



256
257
258
# File 'lib/roadforest/path-matcher.rb', line 256

def graph_node(statement)
  statement.subject
end

#pattern_hashObject



252
253
254
# File 'lib/roadforest/path-matcher.rb', line 252

def pattern_hash
  { :subject => exact_value, :predicate => predicate, :object => graph_term }
end