[HepData-svn] r1646 - in trunk: hepdata-migration hepdata-migration/src/main/java/cedar/hepdata/migration hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Oct 7 15:27:58 BST 2013


Author: whalley
Date: Mon Oct  7 15:27:57 2013
New Revision: 1646

Log:
bringing SVN uptodate with h8

Modified:
   trunk/hepdata-migration/addToDb
   trunk/hepdata-migration/src/main/java/cedar/hepdata/migration/AddToDb.java
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Edit.java
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTable.java
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTest.java
   trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml

Modified: trunk/hepdata-migration/addToDb
==============================================================================
--- trunk/hepdata-migration/addToDb	Mon Oct  7 15:11:32 2013	(r1645)
+++ trunk/hepdata-migration/addToDb	Mon Oct  7 15:27:57 2013	(r1646)
@@ -1,6 +1,7 @@
 #! /usr/bin/env bash
 
-mvn dependency:build-classpath -o -Dmaven.dep.cpFile=cp.txt
+#mvn dependency:build-classpath -o -Dmaven.dep.cpFile=cp.txt
+#mvn dependency:build-classpath -Dmaven.dep.cpFile=cp.txt
 CP=$(echo -n "`pwd`/target/classes:`pwd`/target/test-classes:" && cat cp.txt)
 #echo $CP
 BUILDAIDA="java -cp $CP cedar.hepdata.migration.AddToDb"

Modified: trunk/hepdata-migration/src/main/java/cedar/hepdata/migration/AddToDb.java
==============================================================================
--- trunk/hepdata-migration/src/main/java/cedar/hepdata/migration/AddToDb.java	Mon Oct  7 15:11:32 2013	(r1645)
+++ trunk/hepdata-migration/src/main/java/cedar/hepdata/migration/AddToDb.java	Mon Oct  7 15:27:57 2013	(r1646)
@@ -9,7 +9,7 @@
 import java.io.File;
 import java.util.*;
 
-import org.apache.log4j.*;
+////import org.apache.log4j.*;
 
 
 // USAGE
@@ -25,11 +25,11 @@
 
 
 public class AddToDb {
-    static Logger log = Logger.getLogger(AddToDb.class);
+////    static Logger log = Logger.getLogger(AddToDb.class);
 
 
     static public void main(String[] args) {
-        log.info("Adding HepML files to database");
+////        log.info("Adding HepML files to database");
 
 
         // Get filenames
@@ -43,30 +43,30 @@
 
         for (String xmlfile : xmlfiles) {
             // Unmarshall the HepML file into memory as an object model
-            log.info("Reading data from HepML file " + xmlfile);
+////            log.info("Reading data from HepML file " + xmlfile);
             Data data = null;
             try {
                 data = XMLUtils.getDataFromHepML(new File(xmlfile));
             } catch (Throwable e) {
-                log.error("Couldn't get data from HepML file " + xmlfile);
+////                log.error("Couldn't get data from HepML file " + xmlfile);
                 e.printStackTrace();
             }
             if (data == null) {
-                log.error("Couldn't read data from " + xmlfile);
+////                log.error("Couldn't read data from " + xmlfile);
                 System.exit(1);
             }
 
             // Save each paper in the data to the db
             for (Paper pp : data.getPapers()) {
-                log.info(pp);
+////                log.info(pp);
                 try {
-                    log.info("Saving to db");
+////                    log.info("Saving to db");
                     DbUtils.saveAll(data);
-                    log.info("Saved to db");
+////                    log.info("Saved to db");
                 } catch (Exception e) {
-                    log.error("Problem with saving to database:");
-                    log.error(e);
-                    if (log.isDebugEnabled()) e.printStackTrace();
+////                    log.error("Problem with saving to database:");
+////                    log.error(e);
+////                    if (log.isDebugEnabled()) e.printStackTrace();
                 }
             }
 
@@ -74,14 +74,14 @@
             Query q = DbUtils.getSession().createQuery("from Paper");
             List results = q.list();
             if (results != null) {
-                log.info("Num papers: " + results.size());
+////                log.info("Num papers: " + results.size());
 
                 for (Object result : results) {
                     Paper p = (Paper) result;
-                    log.info(p.toString());
+////                    log.info(p.toString());
                 }
             } else {
-                log.error("Query failed");
+////                log.error("Query failed");
             }
         }
 

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Edit.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Edit.java	Mon Oct  7 15:11:32 2013	(r1645)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Edit.java	Mon Oct  7 15:27:57 2013	(r1646)
@@ -119,7 +119,8 @@
     }
     public StreamResponse asAIDA() {
         Set<Dataset> ds = getDatasets();
-        String asAIDA = AidaFormatter.format(ds);
+        String stype="s";
+        String asAIDA = AidaFormatter.format(ds,stype);
         if (asAIDA == null) {
             asAIDA = "No valid paper and dataset specified";
         }

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTable.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTable.java	Mon Oct  7 15:11:32 2013	(r1645)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTable.java	Mon Oct  7 15:27:57 2013	(r1646)
@@ -138,7 +138,8 @@
     }
     public StreamResponse asAIDA() {
         Set<Dataset> ds = getDatasets();
-        String asAIDA = AidaFormatter.format(ds);
+        String stype="s";
+        String asAIDA = AidaFormatter.format(ds,stype);
         if (asAIDA == null) {
             asAIDA = "No valid paper and dataset specified";
         }

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTest.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTest.java	Mon Oct  7 15:11:32 2013	(r1645)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewTest.java	Mon Oct  7 15:27:57 2013	(r1646)
@@ -150,7 +150,8 @@
     }
     public StreamResponse asAIDA() {
         Set<Dataset> ds = getDatasets();
-        String asAIDA = AidaFormatter.format(ds);
+        String stype="s";
+        String asAIDA = AidaFormatter.format(ds,stype);
         if (asAIDA == null) {
             asAIDA = "No valid paper and dataset specified";
         }

Modified: trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml
==============================================================================
--- trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml	Mon Oct  7 15:11:32 2013	(r1645)
+++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/View.tml	Mon Oct  7 15:27:57 2013	(r1646)
@@ -164,7 +164,7 @@
       </t:if>  
       <t:if test="haveExtraREDDesc1">
           <br/>
-          <a href="${showExtraREDLink1}">${showExtraREDDesc1}</a>
+          <a href="${showExtraREDLink1}"><b>${showExtraREDDesc1}</b></a>
       </t:if>  
       <t:if test="haveExtraREDDesc2">
           <br/>
@@ -221,7 +221,6 @@
           <a href="#" t:type="pagelink" t:page="view" t:context="lastcontext">Last</a>
         </p>
       </t:if>
-      
       <t:loop source="datasetsnew" value="dataset">
          <t:if test="longFormat">
          <div>


More information about the HepData-svn mailing list