|
[HepData-svn] r1927 - trunk/hepdata-model/src/main/java/cedar/hepdata/modelblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Feb 9 14:27:37 GMT 2016
Author: whalley Date: Tue Feb 9 14:27:37 2016 New Revision: 1927 Log: Addition of getPublicationDate and getPreprintDate 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 Tue Feb 9 14:23:14 2016 (r1926) +++ trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Tue Feb 9 14:27:37 2016 (r1927) @@ -224,6 +224,27 @@ return firstpubref; } + public String getPublicationYear() { + String year = null; + for (Reference ref : getReferences()) { + if (ref.getType().equals("JOUR")) { + year = ref.getDate(); + break; + } + } + return year; + } + public String getPreprintYear() { + String year = null; + for (Reference ref : getReferences()) { + if (ref.getType().equals("PREP")) { + year = ref.getDate(); + break; + } + } + return year; + } + public String getSecondPublished() { String secondpublished = null; int n=0;
More information about the HepData-svn mailing list |