|
[HepData-svn] r1389 - trunk/hepdata-model/src/main/java/cedar/hepdata/modelblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Sep 15 11:46:12 BST 2010
Author: whalley Date: Wed Sep 15 11:46:11 2010 New Revision: 1389 Log: preprint/ublished/archive return null 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 Wed Sep 1 10:45:40 2010 (r1388) +++ trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Wed Sep 15 11:46:11 2010 (r1389) @@ -161,7 +161,8 @@ public String getFirstPublished() { - String firstpublished = "Not published"; +// String firstpublished = "Not published"; + String firstpublished = null; /// @todo Reinstate pubtype enum for (Reference ref : getReferences()) { if (ref.getType().equals("JOUR")) { @@ -174,10 +175,11 @@ public String getFirstPreprint() { - String firstpreprint = "Not known"; +// String firstpreprint = "Not known"; + String firstpreprint = null; /// @todo Reinstate pubtype enum for (Reference ref : getReferences()) { - if (!ref.getType().equals("JOUR")) { + if (!ref.getType().equals("JOUR") && !ref.getDescription().startsWith("ARXIV")) { firstpreprint = ref.getDescription(); break; } @@ -185,6 +187,19 @@ return firstpreprint; } + public String getArchive() { +// String archive = "Not known"; + String archive = null; + /// @todo Reinstate pubtype enum + for (Reference ref : getReferences()) { + if (ref.getDescription().startsWith("ARXIV")) { + archive = ref.getDescription(); + break; + } + } + return archive; + } + public String getReferenceString(int n){ StringBuffer s = new StringBuffer(); String refstring = null; @@ -211,8 +226,8 @@ nc += 1; if(nc == n){ if( mod.getModifier()!=null){ - if(n==1) { s.append("DES = Modified" + " by " + mod.getModifier() + " on " + mod.getComment() + ";"); } - else { s.append("DES.= Modified" + " by " + mod.getModifier() + " on " + mod.getComment() + ";"); } + if(n==1) { s.append("DES = Encoded " + mod.getComment() + " by " + mod.getModifier() + ";"); } + else { s.append("DES.= Modified " + mod.getComment() + " by " + mod.getModifier() + ";"); } modstring = s.toString(); break; }
More information about the HepData-svn mailing list |