View Javadoc
1   /*
2    * #%L
3    * This file is part of jFold.
4    * %%
5    * Copyright (C) 2012 - 2024 Mike Thomas <mikepthomas@outlook.com>
6    * %%
7    * jFold is free software: you can redistribute it and/or modify
8    * it under the terms of the GNU General Public License as published by
9    * the Free Software Foundation, either version 3 of the License, or
10   * (at your option) any later version.
11   * %
12   * jFold is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Public License for more details.
16   * %
17   * You should have received a copy of the GNU General Public License
18   * along with jFold.  If not, see <http://www.gnu.org/licenses/>.
19   * #L%
20   */
21  package info.mikethomas.jfold.simulation;
22  
23  import info.mikethomas.jfold.util.DateAdapter;
24  
25  import java.io.Serializable;
26  import java.util.Date;
27  
28  import jakarta.xml.bind.annotation.XmlElement;
29  import jakarta.xml.bind.annotation.XmlRootElement;
30  import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
31  
32  import lombok.Getter;
33  import lombok.ToString;
34  
35  /**
36   * <p>SimulationInfo class.</p>
37   *
38   * @author Michael Thomas (mikepthomas@outlook.com)
39   * @version 7.6.21
40   */
41  @Getter
42  @ToString
43  @XmlRootElement(name = "simulation-info")
44  public class SimulationInfo implements Serializable {
45  
46      /**
47       * User name.
48       *
49       * @return the <code>user</code> from <code>simulation-info</code>
50       */
51      @XmlElement
52      private String user;
53  
54      /**
55       * Team name.
56       *
57       * @return the <code>team</code> from <code>simulation-info</code>
58       */
59      @XmlElement
60      private long team;
61  
62      /**
63       * Project this Simulation belongs to.
64       *
65       * @return the <code>project</code> from <code>simulation-info</code>
66       */
67      @XmlElement
68      private int project;
69  
70      /**
71       * Run of the Project.
72       *
73       * @return the <code>run</code> from <code>simulation-info</code>
74       */
75      @XmlElement
76      private int run;
77  
78      /**
79       * Clone of the Project.
80       *
81       * @return the <code>clone</code> from <code>simulation-info</code>
82       */
83      @XmlElement
84      private int clone;
85  
86      /**
87       * Generation of the Project.
88       *
89       * @return the <code>gen</code> from <code>simulation-info</code>
90       */
91      @XmlElement
92      private int gen;
93  
94      /**
95       * Core type.
96       *
97       * @return the <code>core_type</code> from <code>simulation-info</code>
98       */
99      @XmlElement(name = "core_type")
100     private int coreType;
101 
102     /**
103      * Core identifier.
104      *
105      * @return the <code>core</code> from <code>simulation-info</code>
106      */
107     @XmlElement
108     private String core;
109 
110     /**
111      * Project Description.
112      *
113      * @deprecated no longer returned by simulation-info
114      * @return the <code>description</code> from <code>simulation-info</code>
115      */
116     @Deprecated
117     @XmlElement
118     private String description;
119 
120     /**
121      * Total number of iterations in this Simulation.
122      *
123      * @return the <code>total_iterations</code> from <code>simulation-info</code>
124      */
125     @XmlElement(name = "total_iterations")
126     private int totalIterations;
127 
128     /**
129      * Number of iterations completed.
130      *
131      * @return the <code>iterations_done</code> from <code>simulation-info</code>
132      */
133     @XmlElement(name = "iterations_done")
134     private int iterationsDone;
135 
136     /**
137      * Energy.
138      *
139      * @return the <code>energy</code> from <code>simulation-info</code>
140      */
141     @XmlElement
142     private int energy;
143 
144     /**
145      * Temperature.
146      *
147      * @return the <code>temperature</code> from <code>simulation-info</code>
148      */
149     @XmlElement
150     private int temperature;
151 
152     /**
153      * Time and date this Simulation started.
154      *
155      * @return the <code>start_time</code> from <code>simulation-info</code>
156      */
157     @XmlElement(name = "start_time")
158     @XmlJavaTypeAdapter(DateAdapter.class)
159     private Date startTime;
160 
161     /**
162      * Time and date this Simulation expires.
163      *
164      * @return the <code>timeout</code> from <code>simulation-info</code>
165      */
166     @XmlElement
167     private long timeout;
168 
169     /**
170      * Time and date this Simulation needs to be completed by.
171      *
172      * @return the <code>deadline</code> from <code>simulation-info</code>
173      */
174     @XmlElement
175     private long deadline;
176 
177     /**
178      * Time and date this Simulation has been running for.
179      *
180      * @deprecated no longer returned by simulation-info
181      * @return the <code>run_time</code> from <code>simulation-info</code>
182      */
183     @Deprecated
184     @XmlElement(name = "run_time")
185     private Long runTime;
186 
187     /**
188      * Simulation time.
189      *
190      * @deprecated no longer returned by simulation-info
191      * @return the <code>simulation_time</code> from <code>simulation-info</code>
192      */
193     @Deprecated
194     @XmlElement(name = "simulation_time")
195     private Long simulationTime;
196 
197     /**
198      * Estimated time of arrival.
199      *
200      * @return the <code>eta</code> from <code>simulation-info</code>
201      */
202     @XmlElement
203     private long eta;
204 
205     /**
206      * Progress.
207      *
208      * @return the <code>progress</code> from <code>simulation-info</code>
209      */
210     @XmlElement
211     private double progress;
212 
213     /**
214      * Simulation news.
215      *
216      * @deprecated no longer returned by simulation-info
217      * @return the <code>news</code> from <code>simulation-info</code>
218      */
219     @Deprecated
220     @XmlElement
221     private String news;
222 
223     /**
224      * Slot number.
225      *
226      * @return the <code>slot</code> from <code>simulation-info</code>
227      */
228     @XmlElement
229     private int slot;
230 }