Print the header info, such as title, keywords and meta-desc.
@param out The http output stream.
@param reg Local resource bundle.
11374
public void printXMLParams(PrintWriter out, ResourceBundle reg)
    {
        String PARAMS = "params";
        
        out.println(Utility.startTag(PARAMS));
        
        ServletTask task = (ServletTask)this.getTask();
        Map<String,Object> properties = task.getRequestProperties(task.getServletRequest(), true);	// Including the url/domain
        Map<String,Object> propUser = task.getApplication().getSystemRecordOwner().getProperties();
        Map<String,Object> propServlet = task.getApplication().getProperties();
        
        if (propUser != null)
        {
            for (String strKey : propUser.keySet())
            {
            	String value = DBConstants.BLANK;
            	if (propUser.get(strKey) != null)
            		value = propUser.get(strKey).toString();
            	if ((value.length() > 0)
            		|| ((propUser.get(strKey) == null) && (propServlet.get(strKey) == null)))	// If a user property override a default value, use it
            	{
            		out.print(Utility.startTag(strKey));
            		out.print(value);
            		out.println(Utility.endTag(strKey));
            	}
            }
        }
        for (String strKey : properties.keySet())
        {
            if ((propUser == null) || (propUser.get(strKey) == null) || (propUser.get(strKey).toString().length() == 0))
            {   // Only if it doesn't exist in user properties
                out.print(Utility.startTag(strKey));
                out.print((properties.get(strKey) != null) ? properties.get(strKey) : DBConstants.BLANK);
                out.println(Utility.endTag(strKey));
            }
        }
        for (String strKey : propServlet.keySet())
        {
            if ((propUser == null) || (propUser.get(strKey) == null) || (propUser.get(strKey).toString().length() == 0))
                if ((properties == null) || (properties.get(strKey) == null))
            {   // Only if it doesn't exist in user or app properties
                out.print(Utility.startTag(strKey));
                out.print((propServlet.get(strKey) != null) ? propServlet.get(strKey) : DBConstants.BLANK);
                out.println(Utility.endTag(strKey));
            }
        }
        
        out.println(Utility.endTag(PARAMS));
    }
1089550
public void printXmlNavMenu(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        String strNavMenu = reg.getString("xmlNavMenu");
        if ((strNavMenu == null) || (strNavMenu.length() == 0))
            strNavMenu =
                " <navigation-menu>" +
                "   <navigation-item>" +
                "       <name>Home</name>" +
                "       <description>Home</description>" +
                "       <link>?menu=Home</link>" +
                "       <image>Home</image>" +
                "   </navigation-item>" +
                "   <navigation-item>" +
                "       <name>My home</name>" +
                "       <description>My home</description>" +
                "       <link>?menu=</link>" +
                "       <image>MyHome</image>" +
                "   </navigation-item>" +
                " </navigation-menu>";
        out.println(strNavMenu);
    }
943658
public void printHtmlFooter(PrintWriter out, ResourceBundle reg)
    {
        String strHTML = reg.getString("htmlFooter");
        if ((strHTML == null) || (strHTML.length() == 0))
            strHTML = "</body>\n</html>";
        out.println(strHTML);
        out.flush();
    }
1193416
public void printXmlHeader(PrintWriter out, ResourceBundle reg)
    {
        String strTopMenu = reg.getString("xmlHeader");
        if ((strTopMenu == null) || (strTopMenu.length() == 0))
            strTopMenu =
                " <top-menu>" +
                "   <menu-item>" +
                "       <description>Site home page</description>" +
                "       <link>?menu=Main</link>" +
                "       <image>Home</image>" +
                "       <name>Home</name>" +
                "   </menu-item>" +
                "   <menu-item>" +
                "       <description>My home</description>" +
                "       <link>?menu=</link>" +
                "       <image>MyHome</image>" +
                "   </menu-item>" +
                "   <menu-item>" +
                "       <description>View or change preferences</description>" +
                "       <link>" + HtmlConstants.SERVLET_LINK+ "?screen=org.jbundle.main.screen.UserPreferenceScreen&amp;java=no</link>" +
                "       <image>Lookup</image>" +
                "       <name>Preferences</name>" +
                "   </menu-item>" +
                "   <menu-item>" +
                "       <description>About us</description>" +
                "       <link>" + '?' + DBParams.HELP + '=' + "&amp;xml=docs/com/aboutus.xml</link>" +
                "       <image>About</image>" +
                "   </menu-item>" +
                "   <help-item>" +
                "       <menu-item>" +
                "           <description>Help for the current screen</description>" +
                "           <link>" + '?' + DBParams.HELP + '=' + "&amp;{url}&amp;class={helpclass}</link>" +
                "           <image>Help</image>" +
                "       </menu-item>" +
                "   </help-item>" +
                " </top-menu>";
        
        String strTitle = this.getProperty(XMLTags.TITLE);                // Menu page
        if ((strTitle == null) || (strTitle.length() == 0))
            strTitle = ((BasePanel)this.getScreenField()).getTitle();
        String strURL = this.getThisURL();
        if (strURL == null)
            strURL = DBConstants.BLANK;
        if (strURL.length() > 0)
            if (strURL.charAt(0) == '?')
                strURL = strURL.substring(1); // Always
        strURL = Utility.encodeXML(strURL);   // Convert < to &lt; , etc.

        Hashtable<String,Object> ht = new Hashtable<String,Object>();
        ht.put("helpclass", HelpScreen.class.getName());
        ht.put(XMLTags.URL, strURL);
        ht.put(XMLTags.TITLE, strTitle);
        String strUserName = this.getProperty(DBParams.USER_NAME);
        if (strUserName == null)
            strUserName = DBConstants.BLANK;
//x        ht.put(XMLTags.USER_NAME, strUserName);  // This is available in /full-screen/params/user
        String strLogin = "Login";
        if (strUserName.length() > 0)
            strLogin = "Logout";
        ht.put("loginIcon", strLogin);
        ht.put("loginDesc", reg.getString(strLogin));
        String strLoginLink = "?screen=" + UserInfoModel.USER_LOGIN_SCREEN_CLASS + "&amp;java=no";
        if (strUserName.length() > 0)
            strLoginLink = "?user=&amp;menu=";
        ht.put("loginLink", strLoginLink);
        
        strTopMenu = Utility.replaceResources(strTopMenu, reg, ht, null);

        out.println(strTopMenu);
    }
644022
public void printHtmlMenuEnd(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        String strHTML = reg.getString("htmlContentEnd");
        strHTML = Utility.replaceResources(strHTML, reg, null, null);
        if ((strHTML == null) || (strHTML.length() == 0))
            strHTML = "</td>";
        out.println(strHTML);

        strHTML = null;
        char ch = HBasePanel.getFirstToUpper(this.getProperty(DBParams.NAVMENUS), ' ');
        if (ch != UserInfoModel.NO_ICONS.charAt(0))
        {
            if (ch == UserInfoModel.ICONS_ONLY.charAt(0))  /** Icons only */
                strHTML = reg.getString("htmlNavIconsOnlyAfterContent");
            if ((strHTML == null) || (strHTML.length() == 0))
                strHTML = reg.getString("htmlNavAfterContent");
            if ((strHTML != null) && (strHTML.length() > 0))
                out.println(strHTML);
        }
        strHTML = reg.getString("htmlTableEnd");
        if ((strHTML == null) || (strHTML.length() == 0))
            strHTML = "</tr>\n</table>";
        out.println(strHTML);
    }
1056300
@Override
	public void printContentTitle(ChainWriter out, WebSiteRequest req, HttpServletResponse resp, String title, int contentColumns) {
		startContentLine(out, req, resp, contentColumns, "center", null);
		out.print("<h1>").print(title).print("</h1>\n");
		endContentLine(out, req, resp, 1, false);
	}
976270
def _print_title(self):
        
        if self.title:
            self._stream_out('{}\n'.format(self.title))
            self._stream_flush()
705304
public void printHead(final Writer writer) throws IOException {
        final String eol = "\r\n";
        int pos = 0;
        try {
            for (final String line : this.head()) {
                if (pos == 0 && !RsPrint.FIRST.matcher(line).matches()) {
                    throw new IllegalArgumentException(
                        String.format(
                            // @checkstyle LineLength (1 line)
                            "first line of HTTP response \"%s\" doesn't match \"%s\" regular expression, but it should, according to RFC 7230",
                            line, RsPrint.FIRST
                        )
                    );
                }
                if (pos > 0 && !RsPrint.OTHERS.matcher(line).matches()) {
                    throw new IllegalArgumentException(
                        String.format(
                            // @checkstyle LineLength (1 line)
                            "header line #%d of HTTP response \"%s\" doesn't match \"%s\" regular expression, but it should, according to RFC 7230",
                            pos + 1, line, RsPrint.OTHERS
                        )
                    );
                }
                writer.append(line);
                writer.append(eol);
                ++pos;
            }
            writer.append(eol);
        } finally {
            writer.flush();
        }
    }
1324133
private void printHeader(HtmlPage htmlPage, PrintWriter out) {
        out.println("<?xml version='1.0'?>");
        out.println("<BitvUnit version='" + getBitvUnitVersion() + "'>");
        out.println("<Report time='" + getFormattedDate() + "' url='" + htmlPage.getUrl().toString() + "'/>");
    }
359422
public void writeDocument(OutputStream out) {
        try {
            out.write(OPEN_GROUP);
            out.write(RtfDocument.RTF_DOCUMENT);
            this.documentHeader.writeContent(out);
            this.data.writeTo(out);
            out.write(CLOSE_GROUP);
        } catch(IOException ioe) {
            ioe.printStackTrace();
        }
    }
613214
protected void printHeader(Graphics2D g2d, String headerText)
    {
        FontMetrics fm = g2d.getFontMetrics();
        int textHeight = fm.getHeight();
        int stringWidth = fm.stringWidth(headerText);
        int textX = (pageRect.width - stringWidth) / 2 + pageRect.x;
        int textY = pageRect.y + textHeight + BORDER;
        g2d.drawString(headerText , textX, textY);
    }
702423
def output(self):
        """"""
        print(copyright_header % spec_version)
        self._output_imports()
        self._output_tags()
        self._output_validators()
        header = self.override.get_header()
        if header:
            print()
            print()
            print(header.rstrip())

        seen = {}
        for class_name, properties in sorted(self.resources.items()):
            resource_name = self.resource_names[class_name]
            t = self.build_tree(class_name, properties, resource_name)
            self.output_tree(t, seen)
916780
public static void renderIndex(final PrintWriter out, final Collection<? extends HelpPage> pages) {
    checkNotNull(out);
    checkNotNull(pages);

    checkArgument(!pages.isEmpty(), "No help pages to render index");

    // construct a printf format with sizing for showing columns
    int max = pages.stream().mapToInt(page -> page.getName().length()).max().orElse(0);
    String nameFormat = "%-" + max + 's';

    for (HelpPage page : pages) {
      String formattedName = String.format(nameFormat, page.getName());
      out.format("  @{bold %s}", formattedName);

      String description = page.getDescription();
      if (description != null) {
        out.printf("   %s%n", description);
      }
      else {
        out.println();
      }
    }
  }
669508
public static void print(CSTable table, PrintWriter out) {
        out.println(TABLE + "," + CSVParser.printLine(table.getName()));
        for (String key : table.getInfo().keySet()) {
            out.println(CSVParser.printLine(key, table.getInfo().get(key)));
        }
        if (table.getColumnCount() < 1) {
            out.flush();
            return;
        }
        out.print(HEADER);
        for (int i = 1; i <= table.getColumnCount(); i++) {
            out.print("," + table.getColumnName(i));
        }
        out.println();
        Map<String, String> m = table.getColumnInfo(1);
        for (String key : m.keySet()) {
            out.print(key);
            for (int i = 1; i <= table.getColumnCount(); i++) {
                out.print("," + table.getColumnInfo(i).get(key));
            }
            out.println();
        }
        for (String[] row : table.rows()) {
            for (int i = 1; i < row.length; i++) {
                out.print("," + row[i]);
            }
            out.println();
        }
        out.println();
        out.flush();
    }
38689
public void print(final PrintStream out, final ICodingAnnotationStudy study,
			final ICodingAnnotationItem item) {
		Map<Object, Map<Object, Double>> coincidence = 
				CodingAnnotationStudy.countCategoryCoincidence(item);
		doPrint(out, study, coincidence);
	}
1059881
public void dump(PrintStream out)
    {
        out.println(this+":");
        out.println(super.toString());
        out.println(_roles);
    }
405231
public void printScreen(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        int iPrintOptions = this.getScreenField().getPrintOptions();
        this.getScreenField().printControl(out, iPrintOptions);
        this.getScreenField().printData(out, iPrintOptions);
    }