[HepData-svn] r1656 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Nov 6 15:02:08 GMT 2013


Author: whalley
Date: Wed Nov  6 15:02:08 2013
New Revision: 1656

Log:
more tweaks for errors in HepML formatter

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java	Wed Nov  6 14:31:52 2013	(r1655)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java	Wed Nov  6 15:02:08 2013	(r1656)
@@ -89,8 +89,13 @@
                 if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); }
                 if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); }
                 if(err.getNormType() != null){ s.append(" norm='" + err.getNormType().toShortName() + "'"); }
-                if(err.getComment() != null){ s.append(" comment='" + err.getComment() + "'"); }
-                s.append(" />\n");
+                s.append(" >\n");
+                if(err.getComment() != null){ 
+                    s.append("       <comment>\n");
+                    s.append("         comment='" + err.getComment() + "'"); 
+                    s.append("       </comment>\n");
+                }
+                s.append("        </error>");
             }
             for (XAxis xax : ds.getXAxes()){
                 s.append("        <xaxis id='xax-99-" + xax.getId() + "' xaxisId='" + xax.getId() + "' header='" + xax.getHeader() + "'>\n");    
@@ -155,8 +160,13 @@
                     if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); }
                     if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); }
                     if(err.getNormType() != null){ s.append(" norm='" + err.getNormType().toShortName() + "'"); }
-                    if(err.getComment() != null){ s.append(" comment='" + err.getComment() + "'"); }
-                    s.append(" />\n");
+                    s.append(" >\n");
+                    if(err.getComment() != null){
+                    s.append("           <comment>\n");
+                    s.append("             comment='" + err.getComment() + "'");
+                    s.append("           </comment>\n");
+                    s.append("         </error>");
+                    }
                 }
                 for (Point pt : yax.getPoints()){
                     s.append("            <point pointId='" + pt.getId() + "'");
@@ -170,8 +180,13 @@
                         if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); }
                         if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); }
                         if(err.getNormType() != null){ s.append(" norm='" + err.getNormType().toShortName() + "'"); }
-                        if(err.getComment() != null){ s.append(" comment='" + err.getComment() + "'"); }
-                        s.append(" />\n");
+                        s.append(" >\n");
+                        if(err.getComment() != null){ 
+                        s.append("               <comment>\n");
+                        s.append("                 comment='" + err.getComment() + "'"); 
+                        s.append("               </comment>\n");
+                        }
+                        s.append("              </error>");
                     }
                     s.append("            </point>\n");
                 }


More information about the HepData-svn mailing list