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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Nov 12 11:42:15 GMT 2013


Author: whalley
Date: Tue Nov 12 11:42:15 2013
New Revision: 1669

Log:
fixes for > and < signs in comments

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	Mon Nov 11 15:14:49 2013	(r1668)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/HepMLFormatter.java	Tue Nov 12 11:42:15 2013	(r1669)
@@ -43,6 +43,10 @@
             s.append("      <modification who='" + mod.getModifier() + "' when='" + mod.getComment() + "' />\n");
         }
         for (String cr : p.getComments()){
+            cr=cr.replaceAll(">=","≥");
+            cr=cr.replaceAll("<=","≤");
+            cr=cr.replaceAll(">",">");
+            cr=cr.replaceAll("<=","<");
             s.append("      <comment>\n");    
             s.append("        " + cr + "\n");
             s.append("      </comment>\n");    
@@ -62,6 +66,10 @@
         for (Dataset ds : p.getDatasets()){
             s.append("      <dataset id='ds-99-" + ds.getId() + "' datasetId='" + ds.getId() + "'>\n");    
             for (String ct : ds.getComments()){
+                ct=ct.replaceAll(">=","≥");
+                ct=ct.replaceAll("<=","≤");
+                ct=ct.replaceAll(">",">");
+                ct=ct.replaceAll("<=","<");
                 s.append("        <comment>\n");    
                 s.append("          " + ct + "\n");
                 s.append("        </comment>\n");    


More information about the HepData-svn mailing list