/*
 * The Gemma project
 * 
 * Copyright (c) 2007 University of British Columbia
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package ubic.gemma.web.taglib.arrayDesign;

import ubic.gemma.model.expression.arrayDesign.ArrayDesignValueObject;

/**
 * @author pavlidis
 * @version $Id$
 */
public class ArrayDesignHtmlUtil {

    /**
     * Generate a pretty HTML table with the array design stats summary.
     * 
     * @param object
     * @return
     */
    public static String getSummaryHtml( ArrayDesignValueObject object ) {
        return "<table class='datasummary'>" + "<tr>" + "<td colspan=2 align=center>" + "</td></tr>"
                + "<tr><td>Probes</td><td align=\"right\" >"
                + object.getDesignElementCount()
                + "</td></tr>"
                + "<tr><td title=\"Number of probes with sequences\">"
                + "With seq"
                + "</td><td align=\"right\" >"
                + object.getNumProbeSequences()
                + "</td></tr>"
                + "<tr><td title=\"Number of probes with at least one genome alignment\">"
                + "With align"
                + "</td>"
                + "<td align=\"right\" >"
                + object.getNumProbeAlignments()
                + "</td></tr>"
                + "<tr><td title=\"Number of probes mapped to genes (including predicted and anonymous locations)\">"
                + "Mapped to known genes"
                + "</td><td align=\"right\" >"
                + object.getNumProbesToKnownGenes()
                + "</td></tr>"
                +
                /*
                "<tr><td  title=\"Number of probes mapping to known genes\">"
                + "&nbsp;&nbsp;Known"
                + "</td><td align=\"right\" >"
                + object.getNumProbesToKnownGenes()
                + "</td></tr>"
                +
               
                 * "<tr><td title=\"Number of probes mapping to predicted genes\">" + "&nbsp;&nbsp;Pred." +
                 * "</td><td align=\"right\" >" + object.getNumProbesToPredictedGenes() + "</td></tr>" +
                 * 
                 * "<tr><td  title=\"Number of probes mapping to non-gene locations in the genome\">" +
                 * "&nbsp;&nbsp;Unknown" + "</td><td align=\"right\" >" + object.getNumProbesToProbeAlignedRegions() +
                 * "</td></tr>" +
                 */

                "<tr><td title=\"Number of unique genes represented on the array\" >"
                + "Unique genes"
                + "</td><td align=\"right\" >"
                + object.getNumGenes()
                + "</td></tr>"
                + "<tr><td colspan=2 align='center' class='small'>"
                + "(as of "
                + object.getDateCached()
                + ")"
                + "</td></tr>" + "</table>";
    }
}

@@ -1175,21 +1175,23 @@
 %3Ctr%3E%3Ctd%3E
-Probe
+Element
 s%3C/td%3E%3Ct
@@ -1332,29 +1332,31 @@
 %5C%22Number of 
-probe
+element
 s with seque
@@ -1564,21 +1564,23 @@
 mber of 
-probe
+element
 s with a
@@ -1607,16 +1607,31 @@
 lignment
+ (if available)
 %5C%22%3E%22%0A   
@@ -1847,29 +1847,31 @@
 %5C%22Number of 
-probe
+element
 s mapped to 
@@ -1879,54 +1879,8 @@
 enes
- (including predicted and anonymous locations)
 %5C%22%3E%22
@@ -2073,43 +2073,8 @@
    +
-%0A                /*%0A               
  %22%3Ct
@@ -2071,33 +2071,32 @@
      + %22%3Ctr%3E%3Ctd 
- 
 title=%5C%22Number o
@@ -2101,835 +2101,48 @@
  of 
-probes mapping to known genes%5C%22%3E%22%0A                + %22&nbsp;&nbsp;Known%22%0A                + %22%3C/td%3E%3Ctd align=%5C%22right%5C%22 %3E%22%0A                + object.getNumProbesToKnownGenes()%0A                + %22%3C/td%3E%3C/tr%3E%22%0A                +%0A               %0A                 * %22%3Ctr%3E%3Ctd title=%5C%22Number of probes mapping to predicted genes%5C%22%3E%22 + %22&nbsp;&nbsp;Pred.%22 +%0A                 * %22%3C/td%3E%3Ctd align=%5C%22right%5C%22 %3E%22 + object.getNumProbesToPredictedGenes() + %22%3C/td%3E%3C/tr%3E%22 +%0A                 * %0A                 * %22%3Ctr%3E%3Ctd  title=%5C%22Number of probes mapping to non-gene locations in the genome%5C%22%3E%22 +%0A                 * %22&nbsp;&nbsp;Unknown%22 + %22%3C/td%3E%3Ctd align=%5C%22right%5C%22 %3E%22 + object.getNumProbesToProbeAlignedRegions() +%0A                 * %22%3C/td%3E%3C/tr%3E%22 +%0A                 */%0A%0A                %22%3Ctr%3E%3Ctd title=%5C%22Number of unique genes represented on the array
+unique genes represented on the platform
 %5C%22 %3E

switch to element/platform terminology