Public Member Functions | |
Paper () | |
No-arg constructor for Hibernate. | |
Paper (String title) | |
Paper (String title, Long spiresId) | |
Paper (String title, Integer spiresId) | |
Long | getSpiresId () |
Get method for SPIRES ID. | |
Paper | setSpiresId (Long spiresId) |
Set method for SPIRES ID. | |
Paper | setSpiresId (Integer spiresId) |
Compatibility set method for SPIRES ID. | |
Long | getRedId () |
Get method for reaction database ID. | |
Paper | setRedId (Long redId) |
Set method for reaction database ID. | |
Paper | setRedId (Integer redId) |
Compatibility set method for reaction database ID. | |
String | getTitle () |
Get paper title. | |
Paper | setTitle (String title) |
Set paper title. | |
SortedSet< Experiment > | getExperiments () |
Get experiments. | |
Paper | setExperiments (SortedSet< Experiment > experiments) |
Set experiments. | |
Paper | addExperiment (Experiment experiment) |
Add an experiment. | |
Paper | removeExperiment (Experiment experiment) |
Remove an experiment. | |
SortedSet< String > | getAuthors () |
Paper | setAuthors (SortedSet< String > authors) |
Paper | addAuthor (String author) |
Paper | removeAuthor (String author) |
List< String > | getComments () |
Get the comments. | |
Paper | setComments (List< String > comments) |
Set the comments. | |
Paper | addComment (String comment) |
Add a comment. | |
SortedSet< Dataset > | getDatasets () |
Get datasets. | |
Dataset | getDataset (Integer datasetId) |
Get a specific dataset by dataset ID code. | |
Paper | setDatasets (SortedSet< Dataset > datasets) |
Set datasets explicitly from a SortedSet, to keep reflection apps happy. | |
Paper | setDatasets (Collection< Dataset > datasets) |
Set datasets from a generic Collection. | |
Paper | setDatasets (Dataset[] datasets) |
Set datasets from an array. | |
Paper | addDataset (Dataset dataset) |
Add a single dataset. | |
Paper | removeDataset (Dataset dataset) |
Remove a dataset. | |
SortedSet< Modification > | getModifications () |
Get the modifications. | |
Paper | setModifications (SortedSet< Modification > modifications) |
Set the modifications. | |
Paper | addModification (Modification modification) |
Add a modification. | |
Paper | removeModification (Modification modification) |
Remove a modification. | |
SortedSet< Reference > | getReferences () |
Get the set of references to this paper. | |
Paper | setReferences (SortedSet< Reference > references) |
Set the set of references to this paper. | |
Paper | addReference (Reference reference) |
Add a reference to this paper. | |
Paper | removeReference (Reference reference) |
Remove a reference. | |
String | toString () |
String representation. | |
String | toString (Integer indentBy) |
String representation with indent. | |
Package Functions | |
.hibernate.annotations.CollectionOfElements.hibernate.annotations. | CollectionId (columns=@Column(name="PaperExptId"), type=@org.hibernate.annotations.Type(type="long"), generator="sequence")@org.hibernate.annotations.Sort(type |
The Experiment(s) that made the measurements in this paper. | |
.hibernate.annotations.CollectionOfElements.hibernate.annotations. | Sort (type=org.hibernate.annotations.SortType.NATURAL)@org.hibernate.annotations.BatchSize(size |
Authors of the paper. | |
.hibernate.annotations.CollectionOfElements.hibernate.annotations. | CollectionId (columns=@Column(name="PaperRefId"), type=@org.hibernate.annotations.Type(type="long"), generator="sequence")@org.hibernate.annotations.Sort(type |
References to this paper. | |
.hibernate.annotations.CollectionOfElements.hibernate.annotations. | IndexColumn (name="Posn")@Column(length |
Comments about this paper. | |
.hibernate.annotations.CollectionOfElements.hibernate.annotations. | CollectionId (columns=@Column(name="PaperModId"), type=@org.hibernate.annotations.Type(type="long"), generator="sequence")@org.hibernate.annotations.Sort(type |
List of modifications. | |
.hibernate.annotations. | Fetch (value=org.hibernate.annotations.FetchMode.SUBSELECT)@org.hibernate.annotations.Cascade(value |
The important bit --- the datasets! | |
Logger | log () |
Neat method to allow every class to get hold of a custom-named Logger. |
Definition at line 13 of file Paper.java.
Paper | ( | ) |
Paper | ( | String | title | ) |
Paper | ( | String | title, | |
Long | spiresId | |||
) |
Definition at line 95 of file Paper.java.
00095 { 00096 this(title); 00097 setSpiresId(spiresId); 00098 }
Paper | ( | String | title, | |
Integer | spiresId | |||
) |
.hibernate.annotations.CollectionOfElements.hibernate.annotations. CollectionId | ( | columns | = @Column(name="PaperExptId") , |
|
type | = @org.hibernate.annotations.Type(type="long") , |
|||
generator | = "sequence" | |||
) | [package] |
The Experiment(s) that made the measurements in this paper.
.hibernate.annotations.CollectionOfElements.hibernate.annotations. Sort | ( | type | = org.hibernate.annotations.SortType.NATURAL |
) | [package] |
Authors of the paper.
.hibernate.annotations.CollectionOfElements.hibernate.annotations. CollectionId | ( | columns | = @Column(name="PaperRefId") , |
|
type | = @org.hibernate.annotations.Type(type="long") , |
|||
generator | = "sequence" | |||
) | [package] |
References to this paper.
.hibernate.annotations.CollectionOfElements.hibernate.annotations. IndexColumn | ( | name | = "Posn" |
) | [package] |
Comments about this paper.
.hibernate.annotations.CollectionOfElements.hibernate.annotations. CollectionId | ( | columns | = @Column(name="PaperModId") , |
|
type | = @org.hibernate.annotations.Type(type="long") , |
|||
generator | = "sequence" | |||
) | [package] |
List of modifications.
.hibernate.annotations. Fetch | ( | value | = org.hibernate.annotations.FetchMode.SUBSELECT |
) | [package] |
The important bit --- the datasets!
Long getSpiresId | ( | ) |
Paper setSpiresId | ( | Long | spiresId | ) |
Paper setSpiresId | ( | Integer | spiresId | ) |
Long getRedId | ( | ) |
Paper setRedId | ( | Long | redId | ) |
Paper setRedId | ( | Integer | redId | ) |
String getTitle | ( | ) |
Paper setTitle | ( | String | title | ) |
SortedSet<Experiment> getExperiments | ( | ) |
Paper setExperiments | ( | SortedSet< Experiment > | experiments | ) |
Paper addExperiment | ( | Experiment | experiment | ) |
Add an experiment.
Definition at line 165 of file Paper.java.
00165 { 00166 if (experiment != null) { 00167 _experiments.add(experiment); 00168 } else { 00169 log().warn("Tried to add a null experiment to a paper"); 00170 } 00171 return this; 00172 }
Paper removeExperiment | ( | Experiment | experiment | ) |
Remove an experiment.
Definition at line 175 of file Paper.java.
00175 { 00176 if (experiment != null) { 00177 _experiments.remove(experiment); 00178 } else { 00179 log().warn("Tried to remove a null experiment from a paper"); 00180 } 00181 return this; 00182 }
SortedSet<String> getAuthors | ( | ) |
Paper setAuthors | ( | SortedSet< String > | authors | ) |
Paper addAuthor | ( | String | author | ) |
Definition at line 194 of file Paper.java.
Referenced by Data.makeExamplePaper().
00194 { 00195 if (author != null) { 00196 _authors.add(author); 00197 } else { 00198 log().warn("Tried to add a null author to a paper"); 00199 } 00200 return this; 00201 }
Paper removeAuthor | ( | String | author | ) |
Definition at line 202 of file Paper.java.
00202 { 00203 if (author != null) { 00204 _authors.remove(author); 00205 } else { 00206 log().warn("Tried to remove a null author from a paper"); 00207 } 00208 return this; 00209 }
List<String> getComments | ( | ) |
Paper setComments | ( | List< String > | comments | ) |
Paper addComment | ( | String | comment | ) |
SortedSet<Dataset> getDatasets | ( | ) |
Dataset getDataset | ( | Integer | datasetId | ) |
Get a specific dataset by dataset ID code.
Definition at line 235 of file Paper.java.
00235 { 00236 Dataset theDataset = null; 00237 for (Dataset d : getDatasets()) { 00238 if (d.getId().equals(datasetId)) { 00239 theDataset = d; 00240 break; 00241 } 00242 } 00243 return theDataset; 00244 }
Set datasets explicitly from a SortedSet, to keep reflection apps happy.
Definition at line 247 of file Paper.java.
Set datasets from a generic Collection.
Definition at line 254 of file Paper.java.
00254 { 00255 setDatasets(new TreeSet(datasets)); 00256 return this; 00257 }
Set datasets from an array.
Definition at line 260 of file Paper.java.
00260 { 00261 setDatasets(Arrays.asList(datasets)); 00262 return this; 00263 }
Add a single dataset.
Definition at line 266 of file Paper.java.
References Dataset.getId(), Dataset.setId(), and Dataset.setPaper().
Referenced by Data.makeExample().
00266 { 00267 if (dataset != null) { 00268 if (dataset.getId() == null) { 00269 int highestId = 0; 00270 if (getDatasets().size() > 0) { 00271 highestId = getDatasets().last().getId(); 00272 } 00273 log().debug("Incrementing dataset ID: " + (highestId + 1)); 00274 dataset.setId(highestId + 1); 00275 } 00276 log().debug("Adding dataset: ID = " + dataset.getId()); 00277 dataset.setPaper(this); 00278 _datasets.add(dataset); 00279 } else { 00280 log().warn("Tried to add null dataset to a paper"); 00281 } 00282 return this; 00283 }
Remove a dataset.
Definition at line 286 of file Paper.java.
References Dataset.setPaper().
00286 { 00287 if (dataset != null) { 00288 dataset.setPaper(null); // Data orphaning 00289 _datasets.remove(dataset); 00290 } else { 00291 log().warn("Tried to remove a null dataset from a paper"); 00292 } 00293 return this; 00294 }
SortedSet<Modification> getModifications | ( | ) |
Paper setModifications | ( | SortedSet< Modification > | modifications | ) |
Paper addModification | ( | Modification | modification | ) |
Paper removeModification | ( | Modification | modification | ) |
SortedSet<Reference> getReferences | ( | ) |
String toString | ( | ) |
String representation.
Reimplemented from Storeable.
Definition at line 350 of file Paper.java.
00350 { 00351 return toString(0); 00352 }
String toString | ( | Integer | indentBy | ) |
String representation with indent.
Definition at line 356 of file Paper.java.
00356 { 00357 StringBuffer s = new StringBuffer(); 00358 String indent = ""; 00359 for (int i = 0; i < indentBy; ++i) indent += " "; 00360 00361 // Title 00362 s.append(indent + "Title: "); 00363 if (getTitle() != null) { 00364 s.append(getTitle()); 00365 } else { 00366 s.append("N/A"); 00367 } 00368 00369 // ID codes 00370 s.append("\n" + indent + "Spires ID: " + getSpiresId()); 00371 if (getRedId() != null) { 00372 s.append("\n" + indent + "Reaction database ID: " + getRedId()); 00373 } 00374 00375 // Modifications 00376 s.append("\n" + indent + "Modifications: "); 00377 if (getModifications().size() == 0) { 00378 s.append("none"); 00379 } else { 00380 for (Modification mod : getModifications()) { 00381 s.append("\n" + indent + mod.getTimestamp()); 00382 s.append(" by " + mod.getModifier()); 00383 if (mod.getComment() != null && mod.getComment().length() != 0) 00384 s.append(": " + mod.getComment()); 00385 } 00386 } 00387 00388 // Comments 00389 s.append("\n" + indent + "Comments: "); 00390 if (getComments().size() == 0) { 00391 s.append("none"); 00392 } else { 00393 for (String c : getComments()) s.append("\n" + c); 00394 } 00395 00396 // Dataset (recursive toString) 00397 if (!getDatasets().isEmpty()) { 00398 s.append("\n" + indent + getDatasets().size() + " Datasets"); 00399 for (Dataset ds : getDatasets()) { 00400 s.append("\n" + ds.toString(indentBy + 2)); 00401 } 00402 } 00403 00404 return s.toString(); 00405 }
Logger log | ( | ) | [package, inherited] |
Neat method to allow every class to get hold of a custom-named Logger.
Definition at line 14 of file Storeable.java.
Referenced by Uncertainty.compareTo(), Reference.compareTo(), PointError.compareTo(), Modification.compareTo(), Experiment.compareTo(), DatasetError.compareTo(), AxisError.compareTo(), Data.makeExample(), Data.makeExampleDataset(), Data.makeExampleExperiment(), Data.makeExamplePaper(), Data.makeExampleXAxes(), Data.makeExampleYAxes(), DatasetError.setNormType(), and Uncertainty.toString().