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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Nov 6 16:37:09 GMT 2013


Author: whalley
Date: Wed Nov  6 16:37:09 2013
New Revision: 1662

Log:
more changes for 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 16:36:20 2013	(r1661)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java	Wed Nov  6 16:37:09 2013	(r1662)
@@ -98,7 +98,7 @@
                 s.append("        </error>\n");
             }
             for (XAxis xax : ds.getXAxes()){
-                s.append("        <xaxis id='xax-99-" + xax.getId() + "' xaxisId='" + xax.getId() + "' header='" + xax.getHeader() + "'>\n");    
+                s.append("        <xaxis id='xax-99-" + ds.getId() + "-" + xax.getId() + "' xaxisId='" + xax.getId() + "' header='" + xax.getHeader() + "'>\n");    
                 s.append("          <bins>\n");    
                 for (Bin bn : xax.getBins()){
                     s.append("            <bin binId='" + bn.getId() + "'");
@@ -109,14 +109,14 @@
                     if(bn.getHighValue() != null){ s.append(" high='" + bn.getHighValue() + "'"); }
                     if(bn.getHighValueLength() != null){ s.append(" highlength='" + bn.getHighValueLength() + "'"); }
                     if(bn.getWidth() != null){ s.append(" width='" + bn.getWidth() + "'"); }
-                    if(bn.getRelation() != null){ s.append(" relation='" + bn.getRelation().toString() + "'"); }
+                    if(bn.getRelation() != null){ s.append(" relation='" + bn.getRelation().toShortName() + "'"); }
                     s.append(" />\n");
                 }
                 s.append("          </bins>\n");    
                 s.append("        </xaxis>\n");    
             }
             for (YAxis yax : ds.getYAxes()){
-                s.append("        <yaxis id='yax-99-" + yax.getId() + "' yaxisId='" + yax.getId() + "' header='" + yax.getHeader() + "'>\n");    
+                s.append("        <yaxis id='yax-99-" + ds.getId() + "-" + yax.getId() + "' yaxisId='" + yax.getId() + "' observable='" + ds.getDsObservable(1) + "' header='" + yax.getHeader() + "'>\n");    
                 for (AxisReaction re : yax.getReactions()){
                     s.append("          <reaction>\n"); 
                     s.append("            <initialstate>\n"); 
@@ -169,13 +169,13 @@
                     }
                 }
                 for (Point pt : yax.getPoints()){
-                    s.append("            <point pointId='" + pt.getId() + "'");
+                    s.append("            <point id='pt-99-" + ds.getId() + "-" + yax.getId() + "-" + pt.getId() + "' pointId='" + pt.getId() + "'");
                     if(pt.getValue() != null){ s.append(" value='" + pt.getValue() + "'"); }
                     if(pt.getValueLength() != null){ s.append(" valuelength='" + pt.getValueLength() + "'"); }
-                    if(pt.getRelation() != null){ s.append(" relation='" + pt.getRelation() + "'"); }
+                    if(pt.getRelation() != null){ s.append(" relation='" + pt.getRelation().toShortName() + "'"); }
                     s.append(">\n");
                     for (PointError err : pt.getErrors()){
-                        s.append("              <error");
+                        s.append("              <error errorId='" + err.getId() + "'");
                         if(err.getPlus() != null){ s.append(" plus='" + err.getPlus() + "'"); }
                         if(err.getMinus() != null){ s.append(" minus='" + err.getMinus() + "'"); }
                         if(err.getSourceType() != null){ s.append(" source='" + err.getSourceType().toShortString() + "'"); }


More information about the HepData-svn mailing list