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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Nov 5 14:54:40 GMT 2013


Author: whalley
Date: Tue Nov  5 14:54:40 2013
New Revision: 1650

Log:
new additions to 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	Tue Nov  5 09:36:27 2013	(r1649)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java	Tue Nov  5 14:54:40 2013	(r1650)
@@ -17,10 +17,14 @@
 	    StringBuffer s = new StringBuffer();
         s.append("<hepml>\n");
         s.append("  <data timestamp=''>\n");
-        s.append("    <paper spiresId='" + p.getSpiresId() + "' redId='" + p.getRedId() + "' preprintDate=''>\n");
+        s.append("    <paper spiresId='" + p.getSpiresId() + "' inspireId='" + p.getInspireId() + "' redId='" + p.getRedId() + "' preprintDate=''>\n");
         s.append("      <title>\n");
         s.append("        " + p.getTitle() + "\n");
         s.append("      </title>\n");
+        s.append("      <doi>\n");
+        s.append("        " + p.getDOI() + "\n");
+        s.append("      </doi>\n");
+        
         for (Modification mod : p.getModifications()){
             s.append("      <modification who='" + mod.getModifier() + "' when='" + mod.getComment() + "' />\n");
         }
@@ -87,8 +91,11 @@
                 for (Bin bn : xax.getBins()){
                     s.append("            <bin binId='" + bn.getId() + "'");
                     if(bn.getFocus() != null){ s.append(" focus='" + bn.getFocus() + "'"); }
+                    if(bn.getFocusLength() != null){ s.append(" focuslength='" + bn.getFocusLength() + "'"); }
                     if(bn.getLowValue() != null){ s.append(" low='" + bn.getLowValue() + "'"); }
+                    if(bn.getLowValueLength() != null){ s.append(" lowlength='" + bn.getLowValueLength() + "'"); }
                     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() + "'"); }
                     s.append(" />\n");
@@ -147,6 +154,7 @@
                 for (Point pt : yax.getPoints()){
                     s.append("            <point 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() + "'"); }
                     s.append(">\n");
                     for (PointError err : pt.getErrors()){


More information about the HepData-svn mailing list