Class: ConceptQL::GraphNodifier

Inherits:
Object
  • Object
show all
Defined in:
lib/conceptql/graph_nodifier.rb

Defined Under Namespace

Classes: BinaryOperatorOperator, DefineOperator, DotOperator, LetOperator, RecallOperator, VsacOperator

Constant Summary collapse

BINARY_OPERATOR_TYPES =
%w(before after meets met_by started_by starts contains during overlaps overlapped_by finished_by finishes coincides except person_filter less_than less_than_or_equal equal not_equal greater_than greater_than_or_equal filter).map { |temp| [temp, "not_#{temp}"] }.flatten.map(&:to_sym)

Instance Method Summary collapse

Instance Method Details

#create(type, values, tree) ⇒ Object



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/conceptql/graph_nodifier.rb', line 184

def create(type, values, tree)
  operator = if BINARY_OPERATOR_TYPES.include?(type)
    BinaryOperatorOperator.new(type, values)
  elsif type == :let
    LetOperator.new(type, values)
  elsif type == :define
    DefineOperator.new(type, values)
  elsif type == :recall
    RecallOperator.new(type, values)
  elsif type == :vsac
    types = values.pop
    VsacOperator.new(type, values, types)
  else
    DotOperator.new(type, values)
  end
  operator.tree = self
  operator
end

#temp_tablesObject



176
177
178
# File 'lib/conceptql/graph_nodifier.rb', line 176

def temp_tables
  @temp_tables ||= {}
end

#typesObject



180
181
182
# File 'lib/conceptql/graph_nodifier.rb', line 180

def types
  @types ||= {}
end