Class: ActiveFacts::Generate::OrderedDumper

Inherits:
Object
  • Object
show all
Defined in:
lib/activefacts/generate/ordered.rb

Overview

:nodoc:

Direct Known Subclasses

CQL, OO

Instance Method Summary collapse

Constructor Details

#initialize(vocabulary, *options) ⇒ OrderedDumper

Base class for generators of object-oriented class libraries for an ActiveFacts vocabulary.



13
14
15
16
17
# File 'lib/activefacts/generate/ordered.rb', line 13

def initialize(vocabulary, *options)
  @vocabulary = vocabulary
  @vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::API::Constellation === @vocabulary
  options.each{|option| set_option(option) }
end

Instance Method Details

#append_ring_to_reading(reading, ring) ⇒ Object



550
551
552
# File 'lib/activefacts/generate/ordered.rb', line 550

def append_ring_to_reading(reading, ring)
  debug "Should override append_ring_to_reading"
end

#build_entity_dependenciesObject

This returns an array of two hash tables each keyed by an EntityType. The values of each hash entry are the precursors and followers (respectively) of that entity.



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/activefacts/generate/ordered.rb', line 237

def build_entity_dependencies
  @vocabulary.all_concept.inject([{},{}]) { |a, o|
      if o.is_a?(ActiveFacts::Metamodel::EntityType)
        precursor = a[0]
        follower = a[1]
        blocked = false
        pi = o.preferred_identifier
        if pi
          pi.role_sequence.all_role_ref.each{|rr|
              role = rr.role
              player = role.concept
              # REVISIT: If we decide to emit value types on demand, need to remove this:
              next unless player.is_a?(ActiveFacts::Metamodel::EntityType)
              # player is a precursor of o
              (precursor[o] ||= []) << player if (player != o)
              (follower[player] ||= []) << o if (player != o)
            }
        end
        if o.fact_type
          o.fact_type.all_role.each do |role|
            next unless role.concept.is_a?(ActiveFacts::Metamodel::EntityType)
            (precursor[o] ||= []) << role.concept
            (follower[role.concept] ||= []) << o
          end
        end

        # Supertypes are precursors too:
        subtyping = o.all_type_inheritance_as_supertype
        next a if subtyping.size == 0
        subtyping.each{|ti|
            # debug ti.class.roles.verbalise; debug "all_type_inheritance_as_supertype"; exit
            s = ti.subtype
            (precursor[s] ||= []) << o
            (follower[o] ||= []) << s
          }
#            REVISIT: Need to use this to order ValueTypes after their supertypes
#            else
#              o.all_value_type_as_supertype.each { |s|
#                (precursor[s] ||= []) << o
#                (follower[o] ||= []) << s
#              }
      end
      a
    }
end

#build_indicesObject



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/activefacts/generate/ordered.rb', line 45

def build_indices
  @presence_constraints_by_fact = Hash.new{ |h, k| h[k] = [] }
  @ring_constraints_by_fact = Hash.new{ |h, k| h[k] = [] }

  @vocabulary.all_constraint.each { |c|
      case c
      when ActiveFacts::Metamodel::PresenceConstraint
        fact_types = c.role_sequence.all_role_ref.map{|rr| rr.role.fact_type}.uniq  # All fact types spanned by this constraint
        if fact_types.size == 1     # There's only one, save it:
          # debug "Single-fact constraint on #{fact_types[0].fact_type_id}: #{c.name}"
          (@presence_constraints_by_fact[fact_types[0]] ||= []) << c
        end
      when ActiveFacts::Metamodel::RingConstraint
        (@ring_constraints_by_fact[c.role.fact_type] ||= []) << c
      else
        # debug "Found unhandled constraint #{c.class} #{c.name}"
      end
    }
  @constraints_used = {}
end

#constraint_bannerObject



566
567
568
# File 'lib/activefacts/generate/ordered.rb', line 566

def constraint_banner
  debug "Should override constraint_banner"
end

#constraint_dump(c) ⇒ Object



574
575
576
# File 'lib/activefacts/generate/ordered.rb', line 574

def constraint_dump(c)
  debug "Should override constraint_dump"
end

#constraint_endObject



570
571
572
# File 'lib/activefacts/generate/ordered.rb', line 570

def constraint_end
  debug "Should override constraint_end"
end

#constraint_sort_key(c) ⇒ Object



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
# File 'lib/activefacts/generate/ordered.rb', line 430

def constraint_sort_key(c)
  case c
  when ActiveFacts::Metamodel::RingConstraint
    [ 1,
      c.ring_type,
      c.role.concept.name,
      c.other_role.concept.name,
      c.name||""
    ]
  when ActiveFacts::Metamodel::SetExclusionConstraint
    [ 2+(c.is_mandatory ? 0 : 1),
      c.all_set_comparison_roles.map{|scrs|
        scrs.role_sequence.all_role_ref.map{|rr|
          role_ref_key(rr)
        }
      },
      c.name||""
    ]
  when ActiveFacts::Metamodel::SetEqualityConstraint
    [ 4,
      c.all_set_comparison_roles.map{|scrs|
        scrs.role_sequence.all_role_ref.map{|rr|
          role_ref_key(rr)
        }
      },
      c.name||""
    ]
  when ActiveFacts::Metamodel::SubsetConstraint
    [ 5,
      [c.superset_role_sequence, c.subset_role_sequence].map{|rs|
        rs.all_role_ref.map{|rr|
          role_ref_key(rr)
        }
      },
      c.name||""
    ]
  when ActiveFacts::Metamodel::PresenceConstraint
    [ 6,
      c.role_sequence.all_role_ref.map{|rr|
        role_ref_key(rr)
      },
      c.name||""
    ]
  end
end

#constraints_dump(except = {}) ⇒ Object



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/activefacts/generate/ordered.rb', line 476

def constraints_dump(except = {})
  heading = false
  @vocabulary.all_constraint.reject{|c| except[c]}.sort_by{ |c| constraint_sort_key(c) }.each do|c|
    # Skip some PresenceConstraints:
    if c.is_a?(ActiveFacts::Metamodel::PresenceConstraint)
      # Skip uniqueness constraints that cover all roles of a fact type, they're implicit
      fact_types = c.role_sequence.all_role_ref.map{|rr| rr.role.fact_type}.uniq
      if fact_types.size == 1 &&
        !c.role_sequence.all_role_ref.detect{|rr| rr.join_role } &&
        c.max_frequency == 1 &&         # Uniqueness
        fact_types[0].all_role.size == c.role_sequence.all_role_ref.size
        # debugger if !$constraint_id || c.constraint_id.object_id == $foo
        # $constraint_id ||= 1
        next
      end

      # Skip internal PresenceConstraints over TypeInheritances:
      next if c.role_sequence.all_role_ref.size == 1 &&
        fact_types[0].is_a?(ActiveFacts::Metamodel::TypeInheritance)
    end

    constraint_banner unless heading
    heading = true

    # Skip presence constraints on value types:
    # next if ActiveFacts::PresenceConstraint === c &&
    #     ActiveFacts::ValueType === c.concept
    constraint_dump(c)
  end
  constraint_end if heading
end

#describe_fact_type(fact_type, highlight = nil) ⇒ Object



218
219
220
221
# File 'lib/activefacts/generate/ordered.rb', line 218

def describe_fact_type(fact_type, highlight = nil)
  (fact_type.entity_type ? fact_type.entity_type.name : "")+
  describe_roles(fact_type.all_role, highlight)
end

#describe_role_sequence(role_sequence) ⇒ Object



229
230
231
232
233
# File 'lib/activefacts/generate/ordered.rb', line 229

def describe_role_sequence(role_sequence)
  "("+
  role_sequence.all_role_ref.map{|role_ref| role_ref.role.concept.name }*", "+
  ")"
end

#describe_roles(roles, highlight = nil) ⇒ Object



223
224
225
226
227
# File 'lib/activefacts/generate/ordered.rb', line 223

def describe_roles(roles, highlight = nil)
  "("+
  roles.map{|role| role.concept.name + (role == highlight ? "*" : "")}*", "+
  ")"
end

#entity_type_bannerObject



534
535
536
# File 'lib/activefacts/generate/ordered.rb', line 534

def entity_type_banner
  debug "Should override entity_type_banner"
end

#entity_type_dump(o) ⇒ Object



187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/activefacts/generate/ordered.rb', line 187

def entity_type_dump(o)
  @concept_types_dumped[o] = true
  pi = o.preferred_identifier

  supers = o.supertypes
  if (supers.size > 0)
    # Ignore identification by a supertype:
    pi = nil if pi && pi.role_sequence.all_role_ref.detect{|rr| rr.role.fact_type.is_a?(ActiveFacts::Metamodel::TypeInheritance) }
    subtype_dump(o, supers, pi)
  else
    non_subtype_dump(o, pi)
  end
  @constraints_used[pi] = true
end

#entity_type_group_endObject



538
539
540
# File 'lib/activefacts/generate/ordered.rb', line 538

def entity_type_group_end
  debug "Should override entity_type_group_end"
end

#entity_types_dumpObject

Try to dump entity types in order of name, but we need to dump ETs before they’re referenced in preferred ids if possible (it’s not always, there may be loops!)



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/activefacts/generate/ordered.rb', line 114

def entity_types_dump
  # Build hash tables of precursors and followers to use:
  @precursors, @followers = *build_entity_dependencies

  done_banner = false
  sorted = @vocabulary.all_concept.select{|o|
    o.is_a?(ActiveFacts::Metamodel::EntityType) # and !o.fact_type
  }.sort_by{|o| o.name.gsub(/ /,'')}
  panic = nil
  while true do
    count_this_pass = 0
    skipped_this_pass = 0
    sorted.each{|o|
        next if @concept_types_dumped[o]    # Already done

        # Can we do this yet?
        if (o != panic and                  # We don't *have* to do it (panic mode)
            (p = @precursors[o]) and         # There might be...
            p.size > 0)                     # precursors - still blocked
          skipped_this_pass += 1
          next
        end

        entity_type_banner unless done_banner
        done_banner = true

        # We're going to emit o - remove it from precursors of others:
        (@followers[o]||[]).each{|f|
            @precursors[f] -= [o]
          }
        count_this_pass += 1
        panic = nil

        if (o.fact_type)
          fact_type_dump_with_dependents(o.fact_type)
          released_fact_types_dump(o)
        else
          entity_type_dump(o)
          released_fact_types_dump(o)
        end

        entity_type_group_end
      }

      # Check that we made progress if there's any to make:
      if count_this_pass == 0 && skipped_this_pass > 0
        if panic        # We were already panicing... what to do now?
          # This won't happen again unless the above code is changed to decide it can't dump "panic".
          raise "Unresolvable cycle of forward references: " +
            (bad = sorted.select{|o| EntityType === o && !@concept_types_dumped[o]}).map{|o| o.name }.inspect +
            ":\n\t" + bad.map{|o|
              o.name +
              ": " +
              @precursors[o].map{|p| p.name}.uniq.inspect
            } * "\n\t" + "\n"
        else
          # Find the object that has the most followers and no fwd-ref'd supertypes:
          # This selection might be better if we allow PI roles to be fwd-ref'd...
          panic = sorted.
            select{|o| !@concept_types_dumped[o] }.
            sort_by{|o|
                f = @followers[o] || []; 
                o.supertypes.detect{|s| !@concept_types_dumped[s] } ? 0 : -f.size
              }[0]
          # debug "Panic mode, selected #{panic.name} next"
        end
      end

      break if skipped_this_pass == 0       # All done.

  end
end

#fact_instances_dumpObject



396
397
398
399
400
401
402
403
404
# File 'lib/activefacts/generate/ordered.rb', line 396

def fact_instances_dump
  @vocabulary.fact_types.each{|f|
      # Dump the instances:
      f.facts.each{|i|
        raise "REVISIT: Not dumping fact instances"
        debug "\t\t"+i.to_s
      }
  }
end

#fact_type_bannerObject



554
555
556
# File 'lib/activefacts/generate/ordered.rb', line 554

def fact_type_banner
  debug "Should override fact_type_banner"
end

#fact_type_dump(fact_type, name) ⇒ Object



562
563
564
# File 'lib/activefacts/generate/ordered.rb', line 562

def fact_type_dump(fact_type, name)
  debug "Should override fact_type_dump"
end

#fact_type_dump_with_dependents(fact_type) ⇒ Object

Dump one fact type. Include as many as possible internal constraints in the fact type readings.



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/activefacts/generate/ordered.rb', line 316

def fact_type_dump_with_dependents(fact_type)
  @fact_types_dumped[fact_type] = true
  # debug "Trying to dump FT again" if @fact_types_dumped[fact_type]
  return if skip_fact_type(fact_type)

  if (et = fact_type.entity_type) &&
      (pi = et.preferred_identifier) &&
      pi.role_sequence.all_role_ref.detect{|rr| rr.role.fact_type != fact_type }
    # debug "Dumping objectified FT #{et.name} as an entity, non-fact PI"
    entity_type_dump(et)
    released_fact_types_dump(et)
    return
  end

  fact_constraints = @presence_constraints_by_fact[fact_type]

  # debug "for fact type #{fact_type.to_s}, considering\n\t#{fact_constraints.map(&:to_s)*",\n\t"}"
  # debug "#{fact_type.name} has readings:\n\t#{fact_type.readings.map(&:name)*"\n\t"}"
  # debug "Dumping #{fact_type.fact_type_id} as a fact type"

  # Fact types that aren't nested have no names
  name = fact_type.entity_type && fact_type.entity_type.name

  fact_type_dump(fact_type, name)

  # REVISIT: Go through the residual constraints and re-process appropriate readings to show them

  @fact_types_dumped[fact_type] = true
  @concept_types_dumped[fact_type.entity_type] = true if fact_type.entity_type
end

#fact_type_endObject



558
559
560
# File 'lib/activefacts/generate/ordered.rb', line 558

def fact_type_end
  debug "Should override fact_type_end"
end

#fact_type_key(fact_type) ⇒ Object

Arrange for objectified fact types to appear in order of name, after other fact types. Facts are ordered alphabetically by the names of their role players, then by preferred_reading (subtyping fact types have no preferred_reading).



409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/activefacts/generate/ordered.rb', line 409

def fact_type_key(fact_type)
  role_names =
    if (pr = fact_type.preferred_reading)
      pr.role_sequence.
        all_role_ref.
        sort_by{|role_ref| role_ref.ordinal}.
        map{|role_ref| [ role_ref.leading_adjective, role_ref.role.concept.name, role_ref.trailing_adjective ].compact*"-" } +
        [pr.text]
    else
      fact_type.all_role.map{|role| role.concept.name }
    end

  (fact_type.entity_type ? [fact_type.entity_type.name] : [""]) + role_names
end

#fact_types_dumpObject

Dump fact types.



348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/activefacts/generate/ordered.rb', line 348

def fact_types_dump
  # REVISIT: Uniqueness on the LHS of a binary can be coded using "distinct"

  # The only fact types that can be remaining are those involving only value types,
  # since we dumped every fact type as soon as all relevant entities were dumped.
  # Iterate over all fact types of all value types, looking for these strays.

  done_banner = false
  fact_collection = @vocabulary.constellation.FactType
  fact_collection.keys.select{|fact_id|
          fact_type = fact_collection[fact_id] and
          !fact_type.is_a?(ActiveFacts::Metamodel::TypeInheritance) and
          !fact_type.is_a?(ActiveFacts::Metamodel::ImplicitFactType) and
          !@fact_types_dumped[fact_type] and
          !skip_fact_type(fact_type) and
          !fact_type.all_role.detect{|r| r.concept.is_a?(ActiveFacts::Metamodel::EntityType) }
      }.sort_by{|fact_id|
          fact_type = fact_collection[fact_id]
          fact_type_key(fact_type)
      }.each{|fact_id|
          fact_type = fact_collection[fact_id]

          fact_type_banner unless done_banner
          done_banner = true
          fact_type_dump_with_dependents(fact_type)
    }

  # REVISIT: Find out why some fact types are missed during entity dumping:
  @vocabulary.constellation.FactType.values.select{|fact_type|
      !fact_type.is_a?(ActiveFacts::Metamodel::TypeInheritance) &&
        !fact_type.is_a?(ActiveFacts::Metamodel::ImplicitFactType)
    }.sort_by{|fact_type|
      fact_type_key(fact_type)
    }.each{|fact_type|
      next if @fact_types_dumped[fact_type]
      # debug "Not dumped #{fact_type.verbalise}(#{fact_type.all_role.map{|r| r.concept.name}*", "})"
      fact_type_banner unless done_banner
      done_banner = true
      fact_type_dump_with_dependents(fact_type)
    }

  fact_type_end if done_banner
  # unused = constraints - @constraints_used.keys
  # debug "residual constraints are\n\t#{unused.map(&:to_s)*",\n\t"}"

  @constraints_used
end

#generate(out = $>) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/activefacts/generate/ordered.rb', line 30

def generate(out = $>)
  @out = out
  vocabulary_start(@vocabulary)

  build_indices
  @concept_types_dumped = {}
  @fact_types_dumped = {}
  units_dump()
  value_types_dump()
  entity_types_dump()
  fact_types_dump()
  constraints_dump(@constraints_used)
  vocabulary_end
end

#identified_by(o, pi) ⇒ Object



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/activefacts/generate/ordered.rb', line 202

def identified_by(o, pi)
  # Different adjectives might be used for different readings.
  # Here, we must find the role_ref containing the adjectives that we need for each identifier,
  # which will be attached to the uniqueness constraint on this object in the binary FT that
  # attaches that identifying role.
  identifying_role_refs = pi.role_sequence.all_role_ref.sort_by{|role_ref| role_ref.ordinal}

  # We need to get the adjectives for the roles from the identifying fact's preferred readings:
  identifying_facts = ([o.fact_type]+identifying_role_refs.map{|rr| rr.role.fact_type }).compact.uniq

  identification = identified_by_roles_and_facts(o, identifying_role_refs, identifying_facts)
  #identifying_facts.each{|f| @fact_types_dumped[f] = true }

  identification
end

#non_subtype_dump(o, pi) ⇒ Object



542
543
544
# File 'lib/activefacts/generate/ordered.rb', line 542

def non_subtype_dump(o, pi)
  debug "Should override non_subtype_dump"
end


26
27
28
# File 'lib/activefacts/generate/ordered.rb', line 26

def print(*a)
  @out.print *a
end

#puts(*a) ⇒ Object



22
23
24
# File 'lib/activefacts/generate/ordered.rb', line 22

def puts(*a)
  @out.puts *a
end

#released_fact_types_dump(o) ⇒ Object

Dump all fact types for which all precursors (of which “o” is one) have been emitted:



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/activefacts/generate/ordered.rb', line 284

def released_fact_types_dump(o)
  roles = o.all_role
  begin
    progress = false
    roles.map(&:fact_type).uniq.select{|fact_type|
        # The fact type hasn't already been dumped but all its role players have
        !@fact_types_dumped[fact_type] &&
          !fact_type.is_a?(ActiveFacts::Metamodel::ImplicitFactType) &&
          !fact_type.all_role.detect{|r| !@concept_types_dumped[r.concept] } &&
          !fact_type.entity_type
#                !(fact_type.entity_type && (p = @precursors[fact_type.entity_type]) && p.size > 0)
      }.sort_by{|fact_type|
        fact_type_key(fact_type)
      }.each{|fact_type|
        fact_type_dump_with_dependents(fact_type)
        # Objectified Fact Types may release additional fact types
        roles += fact_type.entity_type.all_role.sort_by{|role| role.ordinal} if fact_type.entity_type
        progress = true
      }
  end while progress
end

#role_ref_key(role_ref) ⇒ Object



424
425
426
427
428
# File 'lib/activefacts/generate/ordered.rb', line 424

def role_ref_key(role_ref)
  [ role_ref.leading_adjective, role_ref.role.concept.name, role_ref.trailing_adjective ].compact*"-" +
  " in " +
  role_ref.role.fact_type.preferred_reading.expand
end

#set_option(option) ⇒ Object



19
20
# File 'lib/activefacts/generate/ordered.rb', line 19

def set_option(option)
end

#skip_fact_type(f) ⇒ Object



306
307
308
309
310
311
312
# File 'lib/activefacts/generate/ordered.rb', line 306

def skip_fact_type(f)
  # REVISIT: There might be constraints we have to merge into the nested entity or subtype. 
  # These will come up as un-handled constraints:
  pcs = @presence_constraints_by_fact[f]
  f.is_a?(ActiveFacts::Metamodel::TypeInheritance) ||
    (pcs && pcs.size > 0 && !pcs.detect{|c| !@constraints_used[c] })
end

#subtype_dump(o, supertypes, pi = nil) ⇒ Object



546
547
548
# File 'lib/activefacts/generate/ordered.rb', line 546

def subtype_dump(o, supertypes, pi = nil)
  debug "Should override subtype_dump"
end

#unit_dump(unit) ⇒ Object



519
520
# File 'lib/activefacts/generate/ordered.rb', line 519

def unit_dump unit
end

#units_bannerObject



516
517
# File 'lib/activefacts/generate/ordered.rb', line 516

def units_banner
end

#units_dumpObject



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/activefacts/generate/ordered.rb', line 66

def units_dump
  done_banner = false
  units = @vocabulary.all_unit.to_a.sort_by{|u| u.name.gsub(/ /,'')}
  while units.size > 0
    if !done_banner
      done_banner = true
      units_banner
    end
    i = 0
    while i < units.size
      unit = units[i]
      i += 1
      # Skip this one if the precursors haven't yet been dumped:
      next if unit.all_derivation_as_derived_unit.detect{|d| units.include?(d.base_unit) }

      unit_dump(unit)
      units.delete(unit)
      i -= 1
    end
  end
end

#value_type_bannerObject



522
523
524
# File 'lib/activefacts/generate/ordered.rb', line 522

def value_type_banner
  debug "Should override value_type_banner"
end

#value_type_chain_dump(o) ⇒ Object

Ensure that supertype gets dumped first



104
105
106
107
108
109
# File 'lib/activefacts/generate/ordered.rb', line 104

def value_type_chain_dump(o)
  return if @value_type_dumped[o]
  value_type_chain_dump(o.supertype) if (o.supertype && !@value_type_dumped[o.supertype])
  value_type_dump(o) if o.name != "_ImplicitBooleanValueType"
  @value_type_dumped[o] = true
end

#value_type_dump(o) ⇒ Object



530
531
532
# File 'lib/activefacts/generate/ordered.rb', line 530

def value_type_dump(o)
  debug "Should override value_type_dump"
end

#value_type_endObject



526
527
528
# File 'lib/activefacts/generate/ordered.rb', line 526

def value_type_end
  debug "Should override value_type_end"
end

#value_types_dumpObject



88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/activefacts/generate/ordered.rb', line 88

def value_types_dump
  done_banner = false
  @value_type_dumped = {}
  @vocabulary.all_concept.sort_by{|o| o.name.gsub(/ /,'')}.each{|o|
      next unless o.is_a?(ActiveFacts::Metamodel::ValueType)

      value_type_banner unless done_banner
      done_banner = true

      value_type_chain_dump(o)
      @concept_types_dumped[o] = true
    }
  value_type_end if done_banner
end

#vocabulary_endObject



512
513
514
# File 'lib/activefacts/generate/ordered.rb', line 512

def vocabulary_end
  debug "Should override vocabulary_end"
end

#vocabulary_start(vocabulary) ⇒ Object



508
509
510
# File 'lib/activefacts/generate/ordered.rb', line 508

def vocabulary_start(vocabulary)
  debug "Should override vocabulary_start"
end