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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jan 12 13:21:25 GMT 2016


Author: watt
Date: Tue Jan 12 13:21:25 2016
New Revision: 1914

Log:
YAML formatter: write y-axis comments without colon as 'value' instead of 'name'

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java	Mon Jan 11 16:49:19 2016	(r1913)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YamlFormatter.java	Tue Jan 12 13:21:25 2016	(r1914)
@@ -497,7 +497,8 @@
 		    type = comment.substring(0,comment.indexOf(":")-1).trim();
 		    value = comment.substring(comment.indexOf(":")+1).trim();
 		} else {
-		    type = comment;
+		    type = ".";
+		    value = comment;
 		}
 		//                String type="SYS";
 		//                String value=comment;
@@ -534,13 +535,9 @@
 	    }
 	    Collections.sort(storelist);
 	    for (int i=0; i<storelist.size(); i++){
-		if (storelist.get(i).startsWith("zzzz")) {
-		    s.append(storelist.get(i).replaceFirst("zzzz",""));
-		} else {
-		    s.append(storelist.get(i).replaceFirst("zzzz","\\."));
-		}
+		s.append(storelist.get(i).replaceFirst("zzzz",""));
 	    }
-
+	    
 	    for(Uncertainty error : ds.getErrors()){
 		if(error.getPlus()==0.0){
 		    if(first) { s.append(s4+"qualifiers:\n"); }


More information about the HepData-svn mailing list