Generate the internal widget end markup
@param {aria.templates.MarkupWriter} out the writer Object to use to output markup
@protected
761236
function (out) {
            this._frame.writeMarkupEnd(out);
            var label = this._cfg.label;
            if (label) {
                var ariaHidden = this._cfg.waiAria ? ' aria-hidden="true"' : '';
                out.write('<span class="xFieldset_' + this._cfg.sclass + '_normal_label"' + ariaHidden + '>' + ariaUtilsString.escapeHTML(label) + '</span>');
            }
        }
681397
function (out) {
            out.newBlock("main", 0);
            out.newBlock("classDefinition", 0);
            out.newBlock("prototype", 2);
            out.newBlock("globalVars", 5);
            out.newBlock("initTemplate", 3);
            out.newBlock("classInit", 3);
        }
774595
function (out) {
            var errorMessage;
            if (this._WidgetCfg.formatError) {// framework errors
                errorMessage = this._WidgetCfg.formatErrorMessages;
            } else if (this._WidgetCfg.error) {// template errors
                errorMessage = this._WidgetCfg.errorMessages;
            }

            var div = new ariaWidgetsContainerDiv({
                sclass : "errortip",
                width : 289,
                margins : "0 0 0 0"
            }, this._context);

            var msg = this._checkErrorMessage(errorMessage);
            if (this._WidgetCfg.waiAria) {
                div.addExtraAttributes('aria-hidden="true"');
                this._widget.waiReadText(msg, {
                    alert: true
                });
            }

            out.registerBehavior(div);
            div.writeMarkupBegin(out);
            out.write(msg);
            div.writeMarkupEnd(out);


            this._div = div;
        }
96183
function (out) {

                var cfg = this._cfg, cssPrefix = this._cssPrefix;

                var sizeInfo = {
                    style : '',
                    className : 'xFrameContent ' + cssPrefix + 'c ' + cfg.cssClass
                };

                this._appendInnerSizeInfo(sizeInfo);

                out.write(['<span class="xFixedHeightFrame_w ', cssPrefix, 'w">'].join(''));
                var hasBorder = this._hasBorder(this._cfg.stateObject.skipLeftBorder, this._cfg.iconsLeft);
                out.write(['<span  ', hasBorder ? '' : 'style="display:none;"', ' class="xFixedHeightFrame_bme ',
                        cssPrefix, 'b ', cssPrefix, 'bkgA"></span>'].join(''));
                this._writeExtraMarkupBegin(out);
                out.write(['<span class="xFixedHeightFrame_bme ', cssPrefix, 'm ', cssPrefix, 'bkgB" >',
                        '<span style="', sizeInfo.style, '" class="', sizeInfo.className, '">'].join(''));
            }
1093237
function writeSummary(output) {
    var options = output.getOptions();
    var prefix = options.get('prefix');

    var filePath = SUMMARY_FILE;
    var engine = WebsiteGenerator.createTemplateEngine(output, filePath);
    var context = JSONUtils.encodeOutput(output);

    // Render the theme
    return Templating.renderFile(engine, prefix + '/summary.html', context)

    // Write it to the disk
    .then(function(tplOut) {
        return writeFile(output, filePath, tplOut.getContent());
    });
}
888461
function generate() {
    var parsed = ensureConfig();
    if (!parsed.name)
        mu.log.error('cannot generate template using name of undefined.\n').write().exit();
    // Generate the template.
    mu.render(parsed.name, parsed.output, parsed.options);
}
1225423
private void encodeMarkup(final FacesContext context, final SlideOut slideOut) throws IOException {
        final ResponseWriter writer = context.getResponseWriter();
        final String clientId = slideOut.getClientId(context);
        final String widgetVar = slideOut.resolveWidgetVar();

        writer.startElement("div", slideOut);
        writer.writeAttribute("id", clientId, "id");
        writer.writeAttribute(HTML.WIDGET_VAR, widgetVar, null);

        if (slideOut.getPanelStyleClass() != null) {
            writer.writeAttribute("class", slideOut.getPanelStyleClass(), "styleClass");
        }
        if (slideOut.getPanelStyle() != null) {
            writer.writeAttribute("style", slideOut.getPanelStyle(), "style");
        }

        // handle
        encodeHandle(context, slideOut);

        // content of the panel
        renderChildren(context, slideOut);

        writer.endElement("div");
    }
168999
function() {
			if ( !this._.inPre && this._.indentation )
				this._.output.push( this._.indentation );
			this._.indent = 0;
		}
803432
@Override
  public void writeOutput(VisualizerInput input, Writer w)
  {
    // root html element 
    Html html = new Html();
    Head head = new Head();
    Body body = new Body();
    
    html.removeXmlns();
    html.appendChild(head);
    html.appendChild(body);
    
    try
    {
      LinkedList<String> fonts = new LinkedList<String>();
      if(input.getFont() != null)
      {
        Link linkFont = new Link();
        linkFont.setHref(input.getFont().getUrl());
        head.appendChild(linkFont);
        fonts.add(input.getFont().getName());
      }
      fonts.add("serif");

      Link linkJQueryUI = new Link();
      linkJQueryUI.setHref(input.getResourcePath("coref/jquery-ui-1.11.4.custom/jquery-ui.min.css"));
      linkJQueryUI.setRel("stylesheet");
      linkJQueryUI.setType("text/css");
      head.appendChild(linkJQueryUI);
      
      Link linkJQueryUIStructure = new Link();
      linkJQueryUIStructure.setHref(input.getResourcePath("coref/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css"));
      linkJQueryUIStructure.setRel("stylesheet");
      linkJQueryUIStructure.setType("text/css");
      head.appendChild(linkJQueryUIStructure);
      
      Script scriptJquery = new Script("text/javascript");
      scriptJquery.setSrc(input.getResourcePath("coref/jquery.js"));
      head.appendChild(scriptJquery);
      
      Script scriptUI = new Script("text/javascript");
      scriptUI.setSrc(input.getResourcePath("coref/jquery-ui-1.11.4.custom/jquery-ui.min.js"));
      head.appendChild(scriptUI);
      
      Link linkCoref = new Link();
      linkCoref.setHref(input.getResourcePath("coref/coref.css"));
      linkCoref.setRel("stylesheet");
      linkCoref.setType("text/css");
      head.appendChild(linkCoref);
      
      Script scriptCoref = new Script("text/javascript");
      scriptCoref.setSrc(input.getResourcePath("coref/CorefVisualizer.js"));
      head.appendChild(scriptCoref);
     
      body.setStyle("font-family: '" + StringUtils.join(fonts, "', '") + "';");
      
      //get Info
      globalIndex = 0;
      tokensOfNode = new HashMap<String, List<String>>();
      referentList = new LinkedList<TReferent>();
      komponent = new LinkedList<TComponent>();
      referentOfToken = new HashMap<String, HashMap<Long, Integer>>();
      componentOfToken = new HashMap<String, List<Long>>();
      componenttype = new LinkedList<TComponenttype>();
      SDocument saltDoc = input.getDocument();
     
      SDocumentGraph saltGraph = saltDoc.getDocumentGraph();
      if (saltGraph == null)
      {
        body.setText("An Error occured: Could not get Graph of Result (Graph == null).");
        return;
      }
      List<SRelation<SNode,SNode>> edgeList = saltGraph.getRelations();
      if (edgeList == null)
      {
        return;
      }

      for (SRelation rawRel : edgeList)
      {
        if (includeEdge(rawRel, input.getNamespace()))
        {
          SPointingRelation rel = (SPointingRelation) rawRel;
          
          String relType = componentNameForRelation(rel);
          
          visitedNodes = new LinkedList<String>();
          //got type for this?
          boolean gotIt = false;
          int componentnr;
          for (componentnr = 0; componentnr < componenttype.size(); componentnr++)
          {
            if (componenttype.get(componentnr) != null && componenttype.get(componentnr).type != null 
              && componenttype.get(componentnr).nodeList != null
              && componenttype.get(componentnr).type.equals(relType) 
              && componenttype.get(componentnr).nodeList.contains(rel.getSource().getId()))
            {
              gotIt = true;
              break;
            }
          }
          TComponent currentComponent;
          TComponenttype currentComponenttype;
          if (gotIt)
          {
            currentComponent = komponent.get(componentnr);
            currentComponenttype = componenttype.get(componentnr);
          }
          else
          {
            currentComponenttype = new TComponenttype();
            currentComponenttype.type = relType;
            componenttype.add(currentComponenttype);
            componentnr = komponent.size();
            currentComponent = new TComponent();
            currentComponent.type = relType;
            currentComponent.tokenList = new LinkedList<String>();
            komponent.add(currentComponent);
            currentComponenttype.nodeList.add(rel.getSource().getId());
          }
          TReferent ref = new TReferent();
          ref.annotations = new HashSet<SerializableAnnotation>();
          for(SAnnotation anno : rel.getAnnotations())
          {
            ref.annotations.add(new SerializableAnnotation(anno));
          }
          ref.component = componentnr;
          referentList.add(ref);

          List<String> currentTokens = getAllTokens(rel.getSource(), componentNameForRelation(rel), 
            currentComponenttype, componentnr, input.getNamespace());

          setReferent(rel.getTarget(), globalIndex, 0);//neu
          setReferent(rel.getSource(), globalIndex, 1);//neu

          for (String s : currentTokens)
          {
            if (!currentComponent.tokenList.contains(s))
            {
              currentComponent.tokenList.add(s);
            }
          }

          globalIndex++;
        }
      }

      colorlist = new HashMap<Integer, Integer>();

      // A list containing all the generated HTML elements, one list entry
      // for each text.
      List<List<Node>> nodesPerText = new LinkedList<List<Node>>();
      
      // write output for each text separatly
      List<STextualDS> texts = saltGraph.getTextualDSs();
      if(texts != null && !texts.isEmpty())
      {
        
        for(STextualDS t : texts)
        {
          DataSourceSequence<Integer> sequence= new DataSourceSequence<>(t, 0,
            (t.getText()!= null) ? t.getText().length():0);
          List<SToken> token = saltGraph.getSortedTokenByText(saltGraph.getTokensBySequence(sequence));

          if(token != null)
          {
            boolean validText = true;
            if(Boolean.parseBoolean(input.getMappings().getProperty("hide_empty", "false")))
            {
              validText = false;
              // check if the text contains any matching annotations
              for(SToken tok : token)
              {
                /* 
                 * The token is only added to this map if an valid edge
                 * (according to the resolver trigger) conntected to 
                 * this token was found.
                 */
                if(referentOfToken.get(tok.getId()) != null 
                  && !referentOfToken.get(tok.getId()).isEmpty())
                {
                  validText = true;
                  break;
                }
              }
            }
            
            if(validText)
            {
              List<Node> nodes = outputSingleText(token, input);
              nodesPerText.add(nodes);
            }
          }
        } // end for each STexutalDS
        
        /* 
         * Append the generated output to the body, wrap in table if necessary. 
         */
        
        // present all texts as columns side by side if using multiple texts
        Table tableTexts = new Table();
        Tr trTextRow = new Tr();
        trTextRow.setCSSClass("textRow");

        // only append wrapper table if we have multiple texts
        if(nodesPerText.size() > 1)
        {
          body.appendChild(tableTexts);
          tableTexts.appendChild(trTextRow);
        }
        for(List<Node> nodes : nodesPerText)
        {
           // multi-text mode?
          if(nodesPerText.size() > 1)
          {
            Td tdSingleText = new Td();
            trTextRow.appendChild(tdSingleText);
            tdSingleText.setCSSClass("text");
            tdSingleText.appendChild(nodes);
          }
          else
          {
            body.appendChild(nodes);
          }
        }
        
      }
      else
      {
        Text errorTxt = new Text("Could not find any texts for the " 
          + input.getNamespace() + " node namespace (layer).");
        body.appendChild(errorTxt);
      }
      
      
      
      // write HTML4 transitional doctype
      w.append(new Doctype(DocumentType.HTMLTransitional).write());
      // append the html tree
      w.append(html.write());
      
    }
    catch (IOException ex)
    {
      log.error(null, ex);
    }
  }
702001
function (out) {
            var cfg = this._cfg, cssPrefix = this._cssPrefix; // sclass = cfg.sclass
            out.write(['</span></td>', '<td class="', cssPrefix, 'rs ', cssPrefix, 'bkgC"></td>', '</tr>', '<tr>',
                    '<td class="', cssPrefix, 'blc ', cssPrefix, 'bkgA"></td>', '<td class="', cssPrefix, 'bs ',
                    cssPrefix, 'bkgB">', this.__addFrameIcon(cfg, cssPrefix, 'bottom'), '</td>', '<td class="',
                    cssPrefix, 'brc ', cssPrefix, 'bkgA"></td>', '</tr>', '</tbody></table>'].join(''));

        }
1157638
function (out) {

            if (!this._cfgOk) {
                return aria.widgets.TemplateBasedWidget.superclass.writeMarkup.call(this, out);
            }

            // Prepare delegation id before to have it linked with this widget
            this._tplWidget._delegateId = aria.utils.Delegate.add({
                fn : this.delegate,
                scope : this
            });
            this._tplWidget.writeMarkup(out);

            this._domReady = true;
        }
173663
function (out) {
            var cfg = this._cfg;

            var dm = this.controller.getDataModel();

            var calendarConf = {
                block : true,
                startDate : dm.jsDate,
                tabIndex : -1,
                label : cfg.calendarLabel,
                defaultTemplate : cfg.calendarTemplate,
                waiAria: cfg.waiAria,
                waiAriaDateFormat: cfg.waiAriaDateFormat,
                waiAriaLabel: cfg.waiAriaCalendarLabel,
                minValue : cfg.minValue,
                maxValue : cfg.maxValue,
                onclick : {
                    fn : this._clickOnDate,
                    scope : this
                },
                onkeydown : {
                    fn: this._calendar_onkeydown,
                    scope : this
                },
                onmousedown : {
                    fn: this._calendar_onmousedown,
                    scope: this
                },
                onfocus : {
                    fn: this._calendar_onfocus,
                    scope: this
                },
                onblur : {
                    fn: this._calendar_onblur,
                    scope: this
                },
                bind : {
                    "value" : {
                        to : "calendarValue",
                        inside : dm
                    }
                }
            };

            // maps property from datepicker configuration
            var propMapped = ['displayUnit', 'numberOfUnits', 'firstDayOfWeek', 'monthLabelFormat',
                    'dayOfWeekLabelFormat', 'dateLabelFormat', 'completeDateLabelFormat', 'showWeekNumbers',
                    'showShortcuts', 'restrainedNavigation', 'sclass'];
            for (var i = 0, property; property = propMapped[i]; i++) {
                this._applyCalendarCfg(property, calendarConf);
            }

            var calendar = new ariaWidgetsCalendarCalendar(calendarConf, this._context, this._lineNumber);
            calendar.$on({
                'widgetContentReady' : this._refreshPopup,
                scope : this
            });
            this.controller.setCalendar(calendar);
            out.registerBehavior(calendar);
            calendar.writeMarkup(out);
        }
591254
public void writeEnd(final OutputStream result) throws IOException{
        if(this.fontStyle != UNDEFINED) {
            if((fontStyle & STYLE_BOLD) == STYLE_BOLD) {
                result.write(FONT_BOLD);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_ITALIC) == STYLE_ITALIC) {
                result.write(FONT_ITALIC);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_UNDERLINE) == STYLE_UNDERLINE) {
                result.write(FONT_UNDERLINE);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_STRIKETHROUGH) == STYLE_STRIKETHROUGH) {
                result.write(FONT_STRIKETHROUGH);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_HIDDEN) == STYLE_HIDDEN) {
                result.write(FONT_HIDDEN);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_DOUBLE_STRIKETHROUGH) == STYLE_DOUBLE_STRIKETHROUGH) {
                result.write(FONT_DOUBLE_STRIKETHROUGH);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_SHADOW) == STYLE_SHADOW) {
                result.write(FONT_SHADOW);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_OUTLINE) == STYLE_OUTLINE) {
                result.write(FONT_OUTLINE);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_EMBOSSED) == STYLE_EMBOSSED) {
                result.write(FONT_EMBOSSED);
                result.write(intToByteArray(0));
            }
            if((fontStyle & STYLE_ENGRAVED) == STYLE_ENGRAVED) {
                result.write(FONT_ENGRAVED);
                result.write(intToByteArray(0));
            }
        }
    }
49953
function() {
			this._.output = [];
			this._.indent = 0;
			this._.indentation = '';
			this._.afterCloser = 0;
			this._.inPre = 0;
		}
175996
function (out) {
            out.write("<div class=\"" + this.CSS_CLASS + "\">");

            if (this._cfg.contentMacro) {
                out.callMacro(this._cfg.contentMacro);
            }

            out.write("</div>");
        }
1277049
function _renderMarkdown( htmlDoc ) {
    const replacements = {};

    // First turn all outputs into text so *<span class="or-output></span>* can be detected
    htmlDoc.find( '/root/form//span[contains(@class, "or-output")]' ).forEach( ( el, index ) => {
        const key = `---output-${index}`;
        const textNode = el.childNodes()[ 0 ].clone();
        replacements[ key ] = el.toString();
        textNode.text( key );
        el.replace( textNode );
        // Note that we end up in a situation where we likely have sibling text nodes...
    } );

    // Now render markdown
    htmlDoc.find( '/root/form//span[contains(@class, "question-label") or contains(@class, "or-hint")]' ).forEach( ( el, index ) => {
        let key;
        /**
         * Using text() is done because:
         * a) We are certain that these <span>s do not contain other elements, other than formatting/markdown <span>s.
         * b) This avoids the need to merge any sibling text nodes that could have been created in the previous step.
         *
         * Note that text() will convert &gt; to >
         */
        const original = el.text().replace( '<', '&lt;' ).replace( '>', '&gt;' );
        const rendered = markdown.toHtml( original );
        if ( original !== rendered ) {
            key = `$$$${index}`;
            replacements[ key ] = rendered;
            el.text( key );
        }
    } );

    // TODO: does this result in self-closing tags?
    let htmlStr = _docToString( htmlDoc );

    // Now replace the placeholders with the rendered HTML
    // in reverse order so outputs are done last
    Object.keys( replacements ).reverse().forEach( key => {
        const replacement = replacements[ key ];
        if ( replacement ) {
            htmlStr = htmlStr.replace( key, replacement );
        }
    } );

    return htmlStr;
}
457006
function (out) {
            var cfg = this._cfg, showLabel = (!cfg.hideLabel && !!cfg.label);

            if (this._isIE7OrLess) {
                out.write('<span style="display: inline-block;">');
            }
            if (showLabel) {
                // process label
                if (cfg.labelPos === "left") {
                    this._inputLabelMarkup(out, 'inline-block', 'right');
                    this._inputMarkup(out);
                } else if (cfg.labelPos === "top") {
                    this._inputLabelMarkup(out, 'block', false);
                    this._inputMarkup(out);
                } else if (cfg.labelPos === "bottom") {
                    this._inputMarkup(out);
                    this._inputLabelMarkup(out, 'block', false);
                } else { // right
                    if (this._fullWidth) {
                        this._inputLabelMarkup(out, 'inline-block', 'left');
                        this._inputMarkup(out);
                    } else {
                        this._inputMarkup(out);
                        this._inputLabelMarkup(out, 'inline-block', 'left');
                    }
                }

            } else {
                // no label
                this._inputMarkup(out);
            }
            if (this._isIE7OrLess) {
                out.write('</span>');
            }
        }