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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Jan 26 15:46:39 GMT 2015


Author: whalley
Date: Mon Jan 26 15:46:39 2015
New Revision: 1840

Log:
addtion of reaction, observable and energy keywords

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java	Mon Dec  8 11:50:13 2014	(r1839)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java	Mon Jan 26 15:46:39 2015	(r1840)
@@ -95,6 +95,34 @@
         }
         s.append("      </subfield>\n");
         s.append("    </datafield>\n");
+
+        s.append("    <datafield tag=\"652\" ind1=\"\" ind2=\"\">\n");
+        for (String dsreac : ds.getDsReactions()){
+            s.append("      <subfield code=\"r\">") ;
+            s.append(dsreac);
+            s.append(" </subfield>\n") ;
+        }
+        for (String dsobs : ds.getDsObservables()){
+            s.append("      <subfield code=\"o\">") ;
+            s.append(dsobs);
+            s.append(" </subfield>\n") ;
+        }
+        for (String dsplab : ds.getDsPlabs()){
+            s.append("      <subfield code=\"p\">") ;
+            s.append(dsplab);
+            s.append(" </subfield>\n") ;
+        }
+        for (YAxis yax : ds.getYAxes()){
+            for (Property prop : yax.getProperties()){
+                if(prop.getFull().startsWith("SQRT") || prop.getFull().startsWith("sqrt") ) {
+                    s.append("      <subfield code=\"s\">") ;
+                    s.append(prop.getFull().substring(prop.getFull().indexOf(":")+1));
+                    s.append(" </subfield>\n") ;
+                }
+            }
+        }
+        s.append("    </datafield>\n");
+
        
         int nxmax = ds.getXAxes().size();
         int nymax = ds.getYAxes().size();


More information about the HepData-svn mailing list