[HepData-svn] r1661 - trunk/hepdata-model/src/main/java/cedar/hepdata/model

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Nov 6 16:36:20 GMT 2013


Author: whalley
Date: Wed Nov  6 16:36:20 2013
New Revision: 1661

Log:
more changes for HepML formatter

Modified:
   trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java

Modified: trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java
==============================================================================
--- trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java	Wed Nov  6 16:36:09 2013	(r1660)
+++ trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java	Wed Nov  6 16:36:20 2013	(r1661)
@@ -215,6 +215,24 @@
 	    return dsostring;
     }
 
+    public String getDsObservable(int n){
+        StringBuffer s = new StringBuffer();
+        String dsostring = null;
+	    int nc = 0;
+	    for(String dso : getDsObservables()){
+	        nc += 1;
+	        if(nc == n){
+	            if( dso!=null){
+	                if(n==1) { s.append(dso); }
+		            else     { s.append(dso); } 
+	                dsostring = s.toString();
+		            break;
+	        }
+	        }
+	    }
+	    return dsostring;
+    }
+
     public String getDsPlabString(int n){
         StringBuffer s = new StringBuffer();
         String dspstring = null;


More information about the HepData-svn mailing list