outline/manager.js
function viewAsBoringDefault (obj) {
      // UI.log.debug('entered viewAsBoringDefault...');
    var rep // representation in html

    if (obj.termType === 'Literal') {
      var styles = {
        'integer': 'text-align: right;',
        'decimal': 'text-align: \'.\';',
        'double': 'text-align: \'.\';'
      }
      rep = dom.createElement('span')
      rep.textContent = obj.value
        // Newlines have effect and overlong lines wrapped automatically
      var style = ''
      if (obj.datatype && obj.datatype.uri) {
        var xsd = UI.ns.xsd('').uri
        if (obj.datatype.uri.slice(0, xsd.length) === xsd) { style = styles[obj.datatype.uri.slice(xsd.length)] }
      }
      rep.setAttribute('style', style || 'white-space: pre-wrap;')
    } else if (obj.termType === 'NamedNode' || obj.termType === 'BlankNode') {
      rep = dom.createElement('span')
      rep.setAttribute('about', obj.toNT())
      thisOutline.appendAccessIcons(kb, rep, obj)

      if (obj.termType === 'NamedNode') {
        if (obj.uri.slice(0, 4) === 'tel:') {
          var num = obj.uri.slice(4)
          var anchor = dom.createElement('a')
          rep.appendChild(dom.createTextNode(num))
          anchor.setAttribute('href', obj.uri)
          anchor.appendChild(UI.utils.AJARImage(outlineIcons.src.icon_telephone,
              'phone', 'phone ' + num, dom))
          rep.appendChild(anchor)
          anchor.firstChild.setAttribute('class', 'phoneIcon')
        } else { // not tel:
          rep.appendChild(dom.createTextNode(UI.utils.label(obj)))
          UI.widgets.makeDraggable(rep, obj) // 2017
        }
      } else { // bnode
        rep.appendChild(dom.createTextNode(UI.utils.label(obj)))
      }
    } else if (obj.termType === 'Collection') {
        // obj.elements is an array of the elements in the collection
      rep = dom.createElement('table')
      rep.setAttribute('style', 'width: 100%;')
      rep.setAttribute('about', obj.toNT())
        /* Not sure which looks best -- with or without. I think without

                var tr = rep.appendChild(document.createElement('tr'));
                tr.appendChild(document.createTextNode(
                        obj.elements.length ? '(' + obj.elements.length+')' : '(none)'));
        */
      for (var i = 0; i < obj.elements.length; i++) {
        var elt = obj.elements[i]
        var row = rep.appendChild(dom.createElement('tr'))
        var numcell = row.appendChild(dom.createElement('td'))
        numcell.setAttribute('style', 'margin: 0.2em; border: none; padding: 0; vertical-align: top;')
        numcell.setAttribute('notSelectable', 'false')
        numcell.setAttribute('about', obj.toNT())
        numcell.innerHTML = (i + 1) + ')'
        row.appendChild(thisOutline.outlineObjectTD(elt))
      }
    } else if (obj.termType === 'Graph') {
      rep = panes.dataContentPane.statementsAsTables(obj.statements, dom)
      rep.setAttribute('class', 'nestedFormula')
    } else {
      UI.log.error('Object ' + obj + ' has unknown term type: ' + obj.termType)
      rep = dom.createTextNode('[unknownTermType:' + obj.termType + ']')
    } // boring defaults.
    UI.log.debug('contents: ' + rep.innerHTML)
    return rep
  }
function viewAsBoringDefault (obj) {
      // UI.log.debug('entered viewAsBoringDefault...');
    var rep // representation in html

    if (obj.termType === 'Literal') {
      var styles = {
        'integer': 'text-align: right;',
        'decimal': 'text-align: \'.\';',
        'double': 'text-align: \'.\';'
      }
      rep = dom.createElement('span')
      rep.textContent = obj.value
        // Newlines have effect and overlong lines wrapped automatically
      var style = ''
      if (obj.datatype && obj.datatype.uri) {
        var xsd = UI.ns.xsd('').uri
        if (obj.datatype.uri.slice(0, xsd.length) === xsd) { style = styles[obj.datatype.uri.slice(xsd.length)] }
      }
      rep.setAttribute('style', style || 'white-space: pre-wrap;')
    } else if (obj.termType === 'NamedNode' || obj.termType === 'BlankNode') {
      rep = dom.createElement('span')
      rep.setAttribute('about', obj.toNT())
      thisOutline.appendAccessIcons(kb, rep, obj)

      if (obj.termType === 'NamedNode') {
        if (obj.uri.slice(0, 4) === 'tel:') {
          var num = obj.uri.slice(4)
          var anchor = dom.createElement('a')
          rep.appendChild(dom.createTextNode(num))
          anchor.setAttribute('href', obj.uri)
          anchor.appendChild(UI.utils.AJARImage(outlineIcons.src.icon_telephone,
              'phone', 'phone ' + num, dom))
          rep.appendChild(anchor)
          anchor.firstChild.setAttribute('class', 'phoneIcon')
        } else { // not tel:
          rep.appendChild(dom.createTextNode(UI.utils.label(obj)))
          UI.widgets.makeDraggable(rep, obj) // 2017
        }
      } else { // bnode
        rep.appendChild(dom.createTextNode(UI.utils.label(obj)))
      }
    } else if (obj.termType === 'Collection') {
        // obj.elements is an array of the elements in the collection
      rep = dom.createElement('table')
      rep.setAttribute('style', 'width: 100%;')
      rep.setAttribute('about', obj.toNT())
        /* Not sure which looks best -- with or without. I think without

                var tr = rep.appendChild(document.createElement('tr'));
                tr.appendChild(document.createTextNode(
                        obj.elements.length ? '(' + obj.elements.length+')' : '(none)'));
        */
      for (var i = 0; i < obj.elements.length; i++) {
        var elt = obj.elements[i]
        var row = rep.appendChild(dom.createElement('tr'))
        var numcell = row.appendChild(dom.createElement('td'))
        numcell.setAttribute('style', 'margin: 0.2em; border: none; padding: 0; vertical-align: top;')
        numcell.setAttribute('notSelectable', 'false')
        numcell.setAttribute('about', obj.toNT())
        numcell.innerHTML = (i + 1) + ')'
        row.appendChild(thisOutline.outlineObjectTD(elt))
      }
    } else if (obj.termType === 'Graph') {
      rep = panes.dataContentPane.statementsAsTables(obj.statements, dom)
      rep.setAttribute('class', 'nestedFormula')
    } else {
      UI.log.error('Object ' + obj + ' has unknown term type: ' + obj.termType)
      rep = dom.createTextNode('[unknownTermType:' + obj.termType + ']')
    } // boring defaults.
    UI.log.debug('contents: ' + rep.innerHTML)
    return rep
  }
var thisOutline = this   dup some builtin simple views *