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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Apr 9 16:46:24 BST 2015


Author: whalley
Date: Thu Apr  9 16:46:24 2015
New Revision: 1855

Log:
readd html line breaks in comments

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	Wed Apr  8 16:50:04 2015	(r1854)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java	Thu Apr  9 16:46:24 2015	(r1855)
@@ -95,9 +95,9 @@
 
         s.append("    <datafield tag=\"520\" ind1=\"\" ind2=\"\">\n");
         s.append("      <subfield code=\"9\">HEPDATA</subfield>\n") ;
-        s.append("      <subfield code=\"a\">") ;
+        s.append("      <subfield code=\"a\">\n") ;
         for (String ct : ds.getPaper().getComments()){
-           s.append(ct.replaceAll(">",">").replaceAll("<","<"));
+           s.append(ct.replaceAll(">",">").replaceAll("<","<").replaceAll("\n","<br/>\n")+"\n");
         }
         s.append("      </subfield>\n");
         s.append("    </datafield>\n");
@@ -175,10 +175,10 @@
 
         s.append("    <datafield tag=\"520\" ind1=\"\" ind2=\"\">\n");
         s.append("      <subfield code=\"9\">HEPDATA</subfield>\n") ;
-        s.append("      <subfield code=\"h\">") ;
+        s.append("      <subfield code=\"h\">\n") ;
         for (String ct : ds.getComments()){
             if(!ct.startsWith("Location:")) {
-                s.append(ct.replaceFirst("VERBATIM","").replaceAll(">",">").replaceAll("<","<").replaceAll("\n","<br/>\n"));
+                s.append(ct.replaceFirst("VERBATIM","").replaceAll(">",">").replaceAll("<","<").replaceAll("\n","<br/>\n")+"\n");
             }
         }
         s.append("      </subfield>\n");


More information about the HepData-svn mailing list