|
[HepData-svn] r1916 - trunk/hepdata-model/src/main/java/cedar/hepdata/modelblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Jan 27 11:47:27 GMT 2016
Author: whalley Date: Wed Jan 27 11:47:27 2016 New Revision: 1916 Log: Addition of Keyword tables to model Modified: trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Modified: trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java ============================================================================== --- trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java Fri Jan 22 17:40:22 2016 (r1915) +++ trunk/hepdata-model/src/main/java/cedar/hepdata/model/Dataset.java Wed Jan 27 11:47:27 2016 (r1916) @@ -93,6 +93,13 @@ @org.hibernate.annotations.Sort(type=org.hibernate.annotations.SortType.NATURAL) private SortedSet<YAxis> _yAxes = new TreeSet<YAxis>(); + @org.hibernate.annotations.CollectionOfElements + @JoinTable(name="DsKeywords", joinColumns=@JoinColumn(name="DATASET_ID")) + @org.hibernate.annotations.IndexColumn(name="LocalId") + @Column(name="Keyword", length=10000) + /** Comments about this paper. */ + private List<String> _keywords = new Vector<String>(); + //////////////////////////////////////////////////////// @@ -338,6 +345,21 @@ return this; } + /** Get the keywords. */ + public List<String> getDsKeywords() { + return _keywords; + } + /** Set the keywords. */ + public Dataset setDsKeywords(List<String> keywords) { + _keywords = keywords; + return this; + } + /** Add a keyword. */ + public Dataset addDsKeyword(String keyword) { + _keywords.add(keyword); + return this; + } + /** Get DsReactions. */ public List<String> getDsReactions() { Modified: trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java ============================================================================== --- trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Fri Jan 22 17:40:22 2016 (r1915) +++ trunk/hepdata-model/src/main/java/cedar/hepdata/model/Paper.java Wed Jan 27 11:47:27 2016 (r1916) @@ -111,6 +111,13 @@ /** List of modifications. */ private SortedSet<Modification> _modifications = new TreeSet<Modification>(); + @org.hibernate.annotations.CollectionOfElements + @JoinTable(name="Keywords", joinColumns=@JoinColumn(name="PAPER_ID")) + @org.hibernate.annotations.IndexColumn(name="LocalId") + @Column(name="Keyword", length=10000) + /** Comments about this paper. */ + private List<String> _keywords = new Vector<String>(); + @OneToMany(mappedBy="_paper") @org.hibernate.annotations.Fetch(value=org.hibernate.annotations.FetchMode.SUBSELECT) @@ -725,6 +732,21 @@ return this; } + /** Get the keywords. */ + public List<String> getKeywords() { + return _keywords; + } + /** Set the keywords. */ + public Paper setKeywords(List<String> keywords) { + _keywords = keywords; + return this; + } + /** Add a keyword. */ + public Paper addKeyword(String keyword) { + _keywords.add(keyword); + return this; + } + /** Get datasets. */
More information about the HepData-svn mailing list |