display method

void display({
  1. String title = 'Entities',
  2. String prefix = '',
  3. bool withOid = true,
  4. bool withChildren = true,
  5. bool withInternalChildren = true,
})

Displays (prints) a title, then entities.

Implementation

void display(
    {String title = 'Entities',
    String prefix = '',
    bool withOid = true,
    bool withChildren = true,
    bool withInternalChildren = true}) {
  if (_concept == null) {
    throw new ConceptException('Entities.display: concept is not defined.');
  }

  var s = prefix;

  bool thereIsNoEntry = !(_concept!.entry);
  bool thereIsEntry = _concept!.entry;
  bool thereIsParent = _concept!.parents.isNotEmpty;

  if (thereIsNoEntry || (thereIsEntry && thereIsParent)) {
    s = '$prefix  ';
  }
  if (title != '') {
    //print('');
    print('$s======================================');
    print('$s$title                                ');
    print('$s======================================');
    //print('');
  }
  for (E e in _entityList) {
    e.display(
        prefix: s,
        withOid: withOid,
        withChildren: withChildren,
        withInternalChildren: withInternalChildren);
  }
}