|
[HepData-svn] r1500 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pagesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Dec 15 16:26:53 GMT 2011
Author: whalley Date: Thu Dec 15 16:26:53 2011 New Revision: 1500 Log: update to display Rivet availablilty Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java Thu Dec 15 16:26:01 2011 (r1499) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/Search.java Thu Dec 15 16:26:53 2011 (r1500) @@ -14,6 +14,7 @@ import org.hibernate.*; //import org.hibernate.criterion.*; import java.util.*; +import java.io.*; import java.lang.Long; import java.lang.Integer; import java.math.BigInteger; @@ -267,7 +268,28 @@ return (Long) result; } } - + + public boolean getHaveRivet(){ + if(_paper.getSpiresId() != null){ + String filename = "/home/whalley/rivet/" + _paper.getSpiresId(); + File f = new File(filename); + return f.exists(); + } + else{ + return false; + } + } + + public String getRivetName(){ + String str=""; + String filename = "/home/whalley/rivet/" + _paper.getSpiresId(); + try { + BufferedReader in = new BufferedReader(new FileReader(filename)); + String line; + while((line=in.readLine()) != null) {str=line;} + } catch (IOException e) {} + return str; + } public List<String> getPaperIdContext() { List<String> ctx = new Vector<String>();
More information about the HepData-svn mailing list |