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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Oct 15 15:18:27 BST 2010


Author: whalley
Date: Fri Oct 15 15:18:27 2010
New Revision: 1414

Log:
eps files now have unique names

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JhepworkFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JhepworkFormatter.java	Fri Oct 15 12:13:27 2010	(r1413)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JhepworkFormatter.java	Fri Oct 15 15:18:27 2010	(r1414)
@@ -75,11 +75,16 @@
         if (x != null && y != null) {
             StringBuffer s = new StringBuffer();
             StringTemplate path = new StringTemplate("/HepData/$paperid$/d$did$-x$xid$-y$yid$");
+            StringTemplate patheps = new StringTemplate("-HepData-$paperid$-d$did$-x$xid$-y$yid$");
             Dataset d = x.getDataset();
             path.setAttribute("paperid", d.getPaper().getId());
             path.setAttribute("did", d.getId());
             path.setAttribute("xid", x.getId());
             path.setAttribute("yid", y.getId());
+            patheps.setAttribute("paperid", d.getPaper().getId());
+            patheps.setAttribute("did", d.getId());
+            patheps.setAttribute("xid", x.getId());
+            patheps.setAttribute("yid", y.getId());
             String ref = "";
             if( d.getPaper().getFirstPublished() != null) {
                 ref = d.getPaper().getFirstPublished();
@@ -181,7 +186,7 @@
             s.append("# draw and export\n");
             s.append("p1.setErrAll(1) # show all errors\n");
             s.append("c1.draw(p1)\n");
-            s.append("c1.export('jhepwork.eps')\n");
+            s.append("c1.export('jhepwork" + patheps.toString() + ".eps')\n");
    
 
             out = s.toString();


More information about the HepData-svn mailing list