[HepData-svn] r1618 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Apr 29 15:00:06 BST 2013


Author: whalley
Date: Mon Apr 29 15:00:06 2013
New Revision: 1618

Log:
moving position of extra comment

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Thu Apr 25 14:14:54 2013	(r1617)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Mon Apr 29 15:00:06 2013	(r1618)
@@ -109,6 +109,26 @@
        
         writer.end(); //p 
 
+// This next sections adds any extra information to the specific table.
+// Not ideal because the relative table Id could change but I see no better was.
+// Requires two files:   description.n and link.n in the specific resource direcotry
+       String descname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/description."+_dataset.getId();
+       String linkname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/link."+_dataset.getId();
+       File descfile = new File(descname);
+       if(descfile.exists()) {
+           try{
+               BufferedReader indesc=new BufferedReader(new FileReader(descname));
+               BufferedReader inlink=new BufferedReader(new FileReader(linkname));
+               String desc = indesc.readLine();
+               String link = inlink.readLine();
+               writer.write(desc);
+               writer.element("a");
+               writer.attributes("href","/resource/"+_dataset.getPaper().getSpiresId()+"/"+link);
+               writer.write("here");
+               writer.end();
+           } catch (IOException e){}
+        }
+
         // Determine the number of axes and points in the dataset
         final int nx = _dataset.getXAxes().size(); // number of xaxes in the dataset
         final int ny = _dataset.getYAxes().size();  // number of yaxes in the dataset
@@ -636,22 +656,22 @@
 // This next sections adds any extra information to the specific table.
 // Not ideal because the relative table Id could change but I see no better was.
 // Requires two files:   description.n and link.n in the specific resource direcotry
-       String descname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/description."+_dataset.getId();
-       String linkname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/link."+_dataset.getId();
-       File descfile = new File(descname);
-       if(descfile.exists()) {
-           try{
-               BufferedReader indesc=new BufferedReader(new FileReader(descname));
-               BufferedReader inlink=new BufferedReader(new FileReader(linkname));
-               String desc = indesc.readLine();
-               String link = inlink.readLine();
-               writer.write(desc);
-               writer.element("a");
-               writer.attributes("href","/resource/"+_dataset.getPaper().getSpiresId()+"/"+link);
-               writer.write("here");
-               writer.end();
-           } catch (IOException e){}
-       }
+//       String descname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/description."+_dataset.getId();
+//       String linkname="/home/whalley/resource/"+_dataset.getPaper().getSpiresId()+"/link."+_dataset.getId();
+//       File descfile = new File(descname);
+//       if(descfile.exists()) {
+//           try{
+//               BufferedReader indesc=new BufferedReader(new FileReader(descname));
+//               BufferedReader inlink=new BufferedReader(new FileReader(linkname));
+//               String desc = indesc.readLine();
+//               String link = inlink.readLine();
+//               writer.write(desc);
+//               writer.element("a");
+//               writer.attributes("href","/resource/"+_dataset.getPaper().getSpiresId()+"/"+link);
+//               writer.write("here");
+//               writer.end();
+//           } catch (IOException e){}
+//       }
     }
 
 


More information about the HepData-svn mailing list