Class: ActiveFacts::Metamodel::JoinStep

Inherits:
Object
  • Object
show all
Defined in:
lib/activefacts/vocabulary/metamodel.rb,
lib/activefacts/vocabulary/extensions.rb

Instance Method Summary collapse

Instance Method Details

#all_join_roleObject



523
524
525
# File 'lib/activefacts/vocabulary/extensions.rb', line 523

def all_join_role
  [input_join_role, output_join_role].uniq + all_incidental_join_role.to_a
end

#describeObject



504
505
506
507
508
509
510
511
512
# File 'lib/activefacts/vocabulary/extensions.rb', line 504

def describe
  "JoinStep " +
    "#{is_outer && 'maybe '}" +
    (is_unary_step ? " (unary) " : "from #{input_join_role.describe} ") +
    "#{is_anti && 'not '}" +
    "to #{output_join_role.describe} " +
    "over " + (is_objectification_step ? 'objectification ' : '') +
    "'#{fact_type.default_reading}'"
end

#external_fact_typeObject



527
528
529
# File 'lib/activefacts/vocabulary/extensions.rb', line 527

def external_fact_type
  fact_type.is_a?(ImplicitFactType) ? fact_type.role.fact_type : fact_type
end

#is_objectification_stepObject



519
520
521
# File 'lib/activefacts/vocabulary/extensions.rb', line 519

def is_objectification_step
  fact_type.is_a?(ImplicitFactType)
end

#is_unary_stepObject



514
515
516
517
# File 'lib/activefacts/vocabulary/extensions.rb', line 514

def is_unary_step
  # Preserve this in case we have to use a real join_node for the phantom
  input_join_role == output_join_role
end