Examples of HtmlWriter


Examples of jreepad.io.HtmlWriter

        String output = null;
        JreepadWriter writer = null;
        switch(exportFormat)
        {
          case FILE_FORMAT_HTML:
            writer = new HtmlWriter(getPrefs().getEncoding(),
                getPrefs().htmlExportArticleType,
                getPrefs().htmlExportUrlsToLinks,
                getPrefs().htmlExportAnchorLinkType);
            break;
          case FILE_FORMAT_XML:

Examples of liquibase.dbdoc.HTMLWriter

        }
    }

    public void writeHTML(File rootOutputDir, ResourceAccessor resourceAccessor) throws IOException, DatabaseException, DatabaseHistoryException, InvalidExampleException {
        //ChangeLogWriter changeLogWriter = new ChangeLogWriter(resourceAccessor, rootOutputDir);
        HTMLWriter authorWriter = new AuthorWriter(rootOutputDir, database);
        HTMLWriter tableWriter = new TableWriter(rootOutputDir, database);
        HTMLWriter columnWriter = new ColumnWriter(rootOutputDir, database);
        HTMLWriter pendingChangesWriter = new PendingChangesWriter(rootOutputDir, database);
        HTMLWriter recentChangesWriter = new RecentChangesWriter(rootOutputDir, database);
        HTMLWriter pendingSQLWriter = new PendingSQLWriter(rootOutputDir, database, rootChangeLog);

        copyFile("liquibase/dbdoc/stylesheet.css", rootOutputDir);
        copyFile("liquibase/dbdoc/index.html", rootOutputDir);
        copyFile("liquibase/dbdoc/globalnav.html", rootOutputDir);
        copyFile("liquibase/dbdoc/overview-summary.html", rootOutputDir);

        DatabaseSnapshot snapshot = SnapshotGeneratorFactory.getInstance().createSnapshot(database.getDefaultSchema(), database, new SnapshotControl(database));

        new ChangeLogListWriter(rootOutputDir).writeHTML(changeLogs);
        new TableListWriter(rootOutputDir).writeHTML(new TreeSet<Object>(snapshot.get(Table.class)));
        new AuthorListWriter(rootOutputDir).writeHTML(new TreeSet<Object>(changesByAuthor.keySet()));

        for (String author : changesByAuthor.keySet()) {
            authorWriter.writeHTML(author, changesByAuthor.get(author), changesToRunByAuthor.get(author), rootChangeLogName);
        }

        for (Table table : snapshot.get(Table.class)) {
            tableWriter.writeHTML(table, changesByObject.get(table), changesToRunByObject.get(table), rootChangeLogName);
        }

        for (Column column : snapshot.get(Column.class)) {
            columnWriter.writeHTML(column, changesByObject.get(column), changesToRunByObject.get(column), rootChangeLogName);
        }

//        for (ChangeLogInfo changeLog : changeLogs) {
//            changeLogWriter.writeChangeLog(changeLog.logicalPath, changeLog.physicalPath);
//        }

        pendingChangesWriter.writeHTML("index", null, changesToRun, rootChangeLogName);
        pendingSQLWriter.writeHTML("sql", null, changesToRun, rootChangeLogName);

        if (recentChanges.size() > MAX_RECENT_CHANGE) {
            recentChanges = recentChanges.subList(0, MAX_RECENT_CHANGE);
        }
        recentChangesWriter.writeHTML("index", recentChanges, null, rootChangeLogName);

Examples of net.sf.apptools.utils.HTMLWriter

  /**Put sequences to a HTML file*/
  @SuppressWarnings("unchecked")
  public void putSequenceDB(Writer out, DefiniteSequenceDB<? extends T> sequences,
      Map<?, ?> properties) {
    PrintWriter pw = new PrintWriter(out);
    HTMLWriter hw = new HTMLWriter(pw);
    String titleString = "No title"; //$NON-NLS-1$
    List<String> props = new ArrayList<String>();
    //Go through properties
    if (properties != null) {
      for (Iterator<?> i = properties.entrySet().iterator(); i.hasNext(); ) {
        Map.Entry e = (Map.Entry) i.next();
        String keyString = e.getKey().toString();
        String valueString = e.getValue().toString();
        if (keyString.equals(TITLE_STRING)) {
          titleString = keyString;
        }
        else {
          props.add(keyString + ": " + valueString); //$NON-NLS-1$
        }
      }
    }

    hw.printTag(HTMLWriter.HTML);   
    hw.printAttributeTag(HTMLWriter.HEAD,new String[] { "title" }, new String[] { titleString }); //$NON-NLS-1$
    hw.printEndTag(HTMLWriter.HEAD);
    hw.printTag(HTMLWriter.BODY);

    for (Iterator pi = props.iterator(); pi.hasNext(); ) {
      pw.println(pi.next());
    }

    for (Iterator si = sequences.iterator(); si.hasNext(); ) {
      Object probe = si.next();
      if (probe instanceof Probe) {
        Probe p = (Probe) probe;
        PropertyAcceptorNucleotideSequence fivePrime;
        PropertyAcceptorNucleotideSequence threePrime;
        try {
          fivePrime = (PropertyAcceptorNucleotideSequence) p.getTSSPair().getSequence(TSSPair.KEY_FIVE_PRIME);
        }
        catch (ClusterException e) {
          fivePrime = null;
        }
        try {
          threePrime = (PropertyAcceptorNucleotideSequence) p.getTSSPair().getSequence(TSSPair.KEY_THREE_PRIME);
        }
        catch (ClusterException e) {
          threePrime = null;
        }


        hw.printEnclosed(p.getName(), HTMLWriter.H4);
        hw.println(Messages.getString("HTMLOutputFormat.ID") + p.getID()); //$NON-NLS-1$
        String seqstr = p.seqString();
        //String seq = "";
        int index = 0;
        int width = 60;
        while (index <= seqstr.length() - width) {
          hw.printEnclosed(seqstr.substring(index, index += width), HTMLWriter.TT);
        }
        hw.printEnclosed(seqstr.substring(index), HTMLWriter.TT);
        hw.printTag(HTMLWriter.BR);
        hw.println(p.getTarget() == null ? Messages.getString("HTMLOutputFormat.NO_TARGET") : //$NON-NLS-1$
          Messages.getString("HTMLOutputFormat.TARGET") + p.getTarget().getID()); //$NON-NLS-1$
        hw.printEnclosed(Messages.getString("HTMLOutputFormat.BLOCKS"), HTMLWriter.H5); //$NON-NLS-1$
        for (int i = 1; i <= p.getSequenceCount(); i++) {
          hw.println(p.getSequence(i).getID() + ": " + //$NON-NLS-1$
              p.getSequence(i).seqString());
        }
        hw.println(Messages.getString("HTMLOutputFormat.HYB_TEMPS_5") + //$NON-NLS-1$
            tempFormat.format(fivePrime == null ? 0 : ProbeMakerPropertyUtils.getHybridizationTemp(fivePrime)) +
            Messages.getString("HTMLOutputFormat.HYB_TEMPS_3") + //$NON-NLS-1$
            tempFormat.format(threePrime == null ? 0 : ProbeMakerPropertyUtils.getHybridizationTemp(threePrime)));

        hw.printEnclosed(Messages.getString("HTMLOutputFormat.MESSAGES"), HTMLWriter.H5); //$NON-NLS-1$
        hw.printTag(HTMLWriter.UL);
        for (Iterator i = ProbeMakerPropertyUtils.getAllMessages(p).iterator(); i.hasNext(); ) {
          hw.printEnclosed(i.next().toString(), HTMLWriter.LI);
        }
        hw.printEndTag(HTMLWriter.UL);
      }
      else {
        throw new IllegalArgumentException("Output sequence is not a Probe object"); //$NON-NLS-1$
      }     
    }

    hw.printEndTag(HTMLWriter.BODY);
    hw.printEndTag(HTMLWriter.HTML);   
  }

Examples of org.apache.empire.struts2.html.HtmlWriter

            // Check writer
            if (writer==null)
                return false;
          
            // HtmlTagDictionary dic = HtmlTagDictionary.getInstance(); 
            HtmlWriter htmlWriter = new HtmlWriter(writer);

            // The Anchors
            if (disabled==false)
            {
                String url = getUrl();

                HtmlTag a = htmlWriter.startTag("a");
                a.addAttribute("id",       this.getId());
                a.addAttribute("href",     url);
        a.addAttribute("target",   this.target);
                a.addAttribute("class",    this.cssClass);
                a.addAttribute("style",    this.cssStyle);
                a.addAttribute("onclick"this.onclick);
                a.beginBody(text);
                a.endTag(body);
            }
            else
            {  
                // disabledTag = null
                HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
                if (disabledTag == null)
                    disabledTag = dic.AnchorDisabledTag();
                if (cssClass ==null)
                    cssClass = dic.AnchorDisabledClass();
                // The value
                HtmlTag s = htmlWriter.startTag(disabledTag);
                s.addAttribute("class",    this.cssClass);
                s.addAttribute("style",    this.cssStyle);
                s.beginBody(text);
                s.endTag(body);
            }

Examples of org.apache.empire.struts2.html.HtmlWriter

    {      
        // Get the action
        Object action = getAction();
        if (action instanceof ActionErrorProvider)
        {   // Tabel cell tag
            HtmlWriter w = new HtmlWriter(pageContext.getOut());
            renderAllErrors(w, (ActionErrorProvider)action);
        }
        else
        {   // Error: Action does implement ActionErrorProvider
            log.error("Cannot render errors. Action does implement ActionErrorProvider.");

Examples of org.apache.empire.struts2.html.HtmlWriter

        // evaluateParams();
        try
        { // No Value

            // Render value
            HtmlWriter htmlWriter = new HtmlWriter(writer);
            HtmlTag table = htmlWriter.startTag("table");
            table.addAttribute("id", this.id);
            table.addAttribute("class", this.cssClass);
            table.addAttribute("style", this.cssStyle);
            table.addAttribute("cellpadding", this.cellpadding);
            table.addAttribute("cellspacing", this.cellspacing);

Examples of org.apache.empire.struts2.html.HtmlWriter

    public boolean start(Writer writer)
    {
        evaluateParams(); // We need to call this!
        try {
           
            HtmlWriter htmlWriter = new HtmlWriter(writer);

            // render form Tag?
            if (readOnly==false)
            {
                urlRenderer.renderFormUrl(this);
                formTag = htmlWriter.startTag("form");
                formTag.addAttribute("id",       getId());
                formTag.addAttribute("name",     getName());
                formTag.addAttribute("onsubmit", this.onsubmit);
                formTag.addAttribute("action",   getURL(action));
                formTag.addAttribute("target",   this.target);

Examples of org.apache.empire.struts2.html.HtmlWriter

        // evaluateParams();
        try
        { // No Value

            // Render value
            HtmlWriter htmlWriter = new HtmlWriter(writer);
            HtmlTag table = htmlWriter.startTag("table");
            table.addAttribute("id", this.id);
            table.addAttribute("class", this.cssClass);
            table.addAttribute("style", this.cssStyle);
            table.addAttribute("cellpadding", this.cellpadding);
            table.addAttribute("cellspacing", this.cellspacing);

Examples of org.apache.empire.struts2.html.HtmlWriter

        { // No Value
            if (recordValue == ObjectUtils.NO_VALUE)
                return false;

            // Render value
            HtmlWriter hw = new HtmlWriter(writer);
            render(hw, body, control);

            return false; // do not evaluate body again!

        } catch (Exception e)

Examples of org.apache.empire.struts2.html.HtmlWriter

    {      
        // Get the action
        Object action = getAction();
        if (action instanceof ActionErrorProvider)
        {   // Tabel cell tag
            HtmlWriter w = new HtmlWriter(pageContext.getOut());
            renderAllErrors(w, (ActionErrorProvider)action);
        }
        else
        {   // Error: Action does implement ActionErrorProvider
            log.error("Cannot render errors. Action does implement ActionErrorProvider.");
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.