|
[HepData-svn] r1503 - trunk/hepdata-model/src/main/java/cedar/hepdata/modelblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Dec 16 11:05:48 GMT 2011
Author: whalley Date: Fri Dec 16 11:05:48 2011 New Revision: 1503 Log: moving Rivet code to Paper Modified: trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Modified: trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java ============================================================================== --- trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Thu Dec 15 17:24:06 2011 (r1502) +++ trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Fri Dec 16 11:05:48 2011 (r1503) @@ -1,6 +1,7 @@ package cedar.hepdata.model; import java.util.*; +import java.io.*; import javax.persistence.*; import org.hibernate.annotations.Proxy; @@ -378,6 +379,41 @@ return crstring; } + public boolean getHaveRivet(){ + boolean rtn = false; + if (_inspireId != null){ + File fi = new File("/home/whalley/rivet/" + _inspireId); + if(fi.exists()) { rtn = true; } + } + if ( _spiresId != null){ + File fs = new File("/home/whalley/rivet/" + _spiresId); + if(fs.exists()) { rtn = true; } + } + return rtn; + } + + public String getRivetName(){ + String str=""; + if( _inspireId != null){ + String filename = "/home/whalley/rivet/" + _inspireId; + try { + BufferedReader in = new BufferedReader(new FileReader(filename)); + String line; + while((line=in.readLine()) != null) {str=line;} + } catch (IOException e) {} + } + if( _spiresId != null){ + String filename = "/home/whalley/rivet/" + _spiresId; + try { + BufferedReader in = new BufferedReader(new FileReader(filename)); + String line; + while((line=in.readLine()) != null) {str=line;} + } catch (IOException e) {} + } + return str; + } + + ////////////////////////////////////////////////////////
More information about the HepData-svn mailing list |