[HepData-svn] r1579 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Oct 11 10:41:13 BST 2012


Author: whalley
Date: Thu Oct 11 10:41:13 2012
New Revision: 1579

Log:
mods to AllIds to include papers with no Inspire/Spires id

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java	Thu Oct 11 10:40:40 2012	(r1578)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java	Thu Oct 11 10:41:13 2012	(r1579)
@@ -29,8 +29,23 @@
     public void setPaper(Paper p) { _paper = p; }
 
     public List <Paper> getPapers(){
-        Query q = _session.createQuery("from Paper p where p._inspireId is not null");
+       Query q = _session.createQuery("from Paper p");
         return q.list();
     }
-
+    public Long getInspireId(){
+        Long zero= new Long("0");
+        if(_paper.getInspireId() == null){
+            return  zero;
+        } else{
+            return _paper.getInspireId();
+        }   
+    }
+    public Long getSpiresId(){
+        Long zero= new Long("0");
+        if(_paper.getSpiresId() == null){
+            return  zero;
+        } else{
+            return _paper.getSpiresId();
+        }   
+    }
 }


More information about the HepData-svn mailing list