001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.10 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * A MIRIAM-compliant date representation. 013 <p> 014 * <p style='color: #777; font-style: italic'> 015This class of objects is defined by libSBML only and has no direct 016equivalent in terms of SBML components. This class is not prescribed by 017the SBML specifications, although it is used to implement features 018defined in SBML. 019</p> 020 021 <p> 022 * A {@link Date} object stores a reasonably complete representation of date and 023 * time. Its purpose is to serve as a way to store dates to be read and 024 * written in the <a target='_blank' 025 * href='http://www.w3.org/TR/NOTE-datetime'>W3C date format</a> used in 026 * RDF Dublin Core annotations within SBML. The W3C date format is a 027 * restricted form of <a target='_blank' 028 * href='http://en.wikipedia.org/wiki/ISO_8601'>ISO 8601</a>, the 029 * international standard for the representation of dates and times. A 030 * time and date value in this W3C format takes the form 031 * YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., <code>1997-07-16T19:20:30+01:00</code>) 032 * where XHH:ZZ is the time zone offset. The libSBML {@link Date} object contains 033 * the following fields to represent these values: 034 <p> 035 * <ul> 036 * <li> <em>year</em>: a long integer representing the year. This should be a 037 * four-digit number such as <code>2011.</code> 038 <p> 039 * <li> <em>month</em>: a long integer representing the month, with a range of 040 * values of 1–12. The value <code>1</code> represents January, and so on. 041 <p> 042 * <li> <em>day</em>: a long integer representing the day of the month, with a 043 * range of values of 1–31. 044 <p> 045 * <li> <em>hour</em>: a long integer representing the hour on a 24-hour clock, 046 * with a range of values of 0–23. 047 <p> 048 * <li> <em>minute</em>: a long integer representing the minute, with a range 049 * of 0–59. 050 <p> 051 * <li> <em>second</em>: a long integer representing the second, with a range 052 * of 0–59. 053 <p> 054 * <li> <em>sign</em>: a long integer representing the sign of the offset (<code>0</code> 055 * signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph below for 056 * further explanations. 057 <p> 058 * <li> <em>hours</em> offset: a long integer representing the time zone's hour 059 * offset from GMT. 060 <p> 061 * <li> <em>minute</em> offset: a long integer representing the time zone's 062 * minute offset from GMT. 063 * 064 * </ul> <p> 065 * To illustrate the time zone offset, a value of <code>-05:00</code> would 066 * correspond to USA Eastern Standard Time. In the {@link Date} object, this would 067 * require a value of <code>1</code> for the sign field, <code>5</code> for the hour offset and 068 * <code>0</code> for the minutes offset. 069 <p> 070 * In the restricted RDF annotations used in SBML, described in 071 * Section 6 of the SBML Level 2 and Level 3 specification 072 * documents, date/time stamps can be used to indicate the time of 073 * creation and modification of a model. The following SBML model fragment 074 * illustrates this: 075<pre class='fragment'> 076<model metaid='_180340' id='GMO' name='Goldbeter1991_MinMitOscil'> 077 <annotation> 078 <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' 079 xmlns:dc='http://purl.org/dc/elements/1.1/' 080 xmlns:dcterms='http://purl.org/dc/terms/' 081 xmlns:vCard='http://www.w3.org/2001/vcard-rdf/3.0#' > 082 <rdf:Description rdf:about='#_180340'> 083 <dc:creator> 084 <rdf:Bag> 085 <rdf:li rdf:parseType='Resource'> 086 <vCard:N rdf:parseType='Resource'> 087 <vCard:Family>Shapiro</vCard:Family> 088 <vCard:Given>Bruce</vCard:Given> 089 </vCard:N> 090 <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> 091 <vCard:ORG rdf:parseType='Resource'> 092 <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> 093 </vCard:ORG> 094 </rdf:li> 095 </rdf:Bag> 096 </dc:creator> 097 <dcterms:created rdf:parseType='Resource'> 098 <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> 099 </dcterms:created> 100 <dcterms:modified rdf:parseType='Resource'> 101 <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> 102 </dcterms:modified> 103 </rdf:Description> 104 </rdf:RDF> 105 </annotation> 106</model> 107</pre> 108 */ 109 110public class Date { 111 private long swigCPtr; 112 protected boolean swigCMemOwn; 113 114 protected Date(long cPtr, boolean cMemoryOwn) 115 { 116 swigCMemOwn = cMemoryOwn; 117 swigCPtr = cPtr; 118 } 119 120 protected static long getCPtr(Date obj) 121 { 122 return (obj == null) ? 0 : obj.swigCPtr; 123 } 124 125 protected static long getCPtrAndDisown (Date obj) 126 { 127 long ptr = 0; 128 129 if (obj != null) 130 { 131 ptr = obj.swigCPtr; 132 obj.swigCMemOwn = false; 133 } 134 135 return ptr; 136 } 137 138 protected void finalize() { 139 delete(); 140 } 141 142 public synchronized void delete() { 143 if (swigCPtr != 0) { 144 if (swigCMemOwn) { 145 swigCMemOwn = false; 146 libsbmlJNI.delete_Date(swigCPtr); 147 } 148 swigCPtr = 0; 149 } 150 } 151 152 /** 153 * Equality comparison method for Date. 154 * <p> 155 * Because the Java methods for libSBML are actually wrappers around code 156 * implemented in C++ and C, certain operations will not behave as 157 * expected. Equality comparison is one such case. An instance of a 158 * libSBML object class is actually a <em>proxy object</em> 159 * wrapping the real underlying C/C++ object. The normal <code>==</code> 160 * equality operator in Java will <em>only compare the Java proxy objects</em>, 161 * not the underlying native object. The result is almost never what you 162 * want in practical situations. Unfortunately, Java does not provide a 163 * way to override <code>==</code>. 164 * <p> 165 * The alternative that must be followed is to use the 166 * <code>equals()</code> method. The <code>equals</code> method on this 167 * class overrides the default java.lang.Object one, and performs an 168 * intelligent comparison of instances of objects of this class. The 169 * result is an assessment of whether two libSBML Java objects are truly 170 * the same underlying native-code objects. 171 * <p> 172 * The use of this method in practice is the same as the use of any other 173 * Java <code>equals</code> method. For example, 174 * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns 175 * <code>true</code> if <em>a</em> and <em>b</em> are references to the 176 * same underlying object. 177 * 178 * @param sb a reference to an object to which the current object 179 * instance will be compared 180 * 181 * @return <code>true</code> if <code>sb</code> refers to the same underlying 182 * native object as this one, <code>false</code> otherwise 183 */ 184 public boolean equals(Object sb) 185 { 186 if ( this == sb ) 187 { 188 return true; 189 } 190 return swigCPtr == getCPtr((Date)(sb)); 191 } 192 193 /** 194 * Returns a hashcode for this Date object. 195 * 196 * @return a hash code usable by Java methods that need them. 197 */ 198 public int hashCode() 199 { 200 return (int)(swigCPtr^(swigCPtr>>>32)); 201 } 202 203 204/** 205 * Creates a time and date representation for use in model annotations 206 * and elsewhere. 207 <p> 208 * The following is the complete set of possible arguments to this 209 * constructor, with default values as indicated: 210 <p> 211 * @param year a long integereger representing the year. This should be 212 * a four-digit number such as <code>2011.</code> (Default value used if this 213 * argument is not given: <code>2000.</code>) 214 <p> 215 * @param month a long integereger representing the month, with a range 216 * of values of 1–12. The value <code>1</code> represents January, and so 217 * on. (Default value used if this argument is not given: <code>1.</code>) 218 <p> 219 * @param day a long integereger representing the day of the month, with 220 * a range of values of 1–31. (Default value used if this argument 221 * is not given: <code>1.</code>) 222 <p> 223 * @param hour a long integereger representing the hour on a 24-hour 224 * clock, with a range of values of 0–23. (Default value used if 225 * this argument is not given: <code>0.</code>) 226 <p> 227 * @param minute a long integereger representing the minute, with a 228 * range of 0–59. (Default value used if this argument is not 229 * given: <code>0.</code>) 230 <p> 231 * @param second a long integereger representing the second, with a 232 * range of 0–59. (Default value used if this argument is not 233 * given: <code>0.</code>) 234 <p> 235 * @param sign a long integereger representing the sign of the offset 236 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 237 * below for further explanations. (Default value used if this argument 238 * is not given: <code>0.</code>) 239 <p> 240 * @param hoursOffset a long integereger representing the time zone's 241 * hour offset from GMT. (Default value used if this argument is not 242 * given: <code>0.</code>) 243 <p> 244 * @param minutesOffset a long integereger representing the time zone's 245 * minute offset from GMT. (Default value used if this argument is not 246 * given: <code>0.</code>) 247 <p> 248 * To illustrate the time zone offset, a value of <code>-05:00</code> 249 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 250 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 251 * hour offset and <code>0</code> for the minutes offset. 252 <p> 253 * 254</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 255The native C++ implementation of this method defines a default argument 256value. In the documentation generated for different libSBML language 257bindings, you may or may not see corresponding arguments in the method 258declarations. For example, in Java and C#, a default argument is handled by 259declaring two separate methods, with one of them having the argument and 260the other one lacking the argument. However, the libSBML documentation will 261be <em>identical</em> for both methods. Consequently, if you are reading 262this and do not see an argument even though one is described, please look 263for descriptions of other variants of this method near where this one 264appears in the documentation. 265</dd></dl> 266 267 */ public 268 Date(long year, long month, long day, long hour, long minute, long second, long sign, long hoursOffset, long minutesOffset) { 269 this(libsbmlJNI.new_Date__SWIG_0(year, month, day, hour, minute, second, sign, hoursOffset, minutesOffset), true); 270 } 271 272 273/** 274 * Creates a time and date representation for use in model annotations 275 * and elsewhere. 276 <p> 277 * The following is the complete set of possible arguments to this 278 * constructor, with default values as indicated: 279 <p> 280 * @param year a long integereger representing the year. This should be 281 * a four-digit number such as <code>2011.</code> (Default value used if this 282 * argument is not given: <code>2000.</code>) 283 <p> 284 * @param month a long integereger representing the month, with a range 285 * of values of 1–12. The value <code>1</code> represents January, and so 286 * on. (Default value used if this argument is not given: <code>1.</code>) 287 <p> 288 * @param day a long integereger representing the day of the month, with 289 * a range of values of 1–31. (Default value used if this argument 290 * is not given: <code>1.</code>) 291 <p> 292 * @param hour a long integereger representing the hour on a 24-hour 293 * clock, with a range of values of 0–23. (Default value used if 294 * this argument is not given: <code>0.</code>) 295 <p> 296 * @param minute a long integereger representing the minute, with a 297 * range of 0–59. (Default value used if this argument is not 298 * given: <code>0.</code>) 299 <p> 300 * @param second a long integereger representing the second, with a 301 * range of 0–59. (Default value used if this argument is not 302 * given: <code>0.</code>) 303 <p> 304 * @param sign a long integereger representing the sign of the offset 305 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 306 * below for further explanations. (Default value used if this argument 307 * is not given: <code>0.</code>) 308 <p> 309 * @param hoursOffset a long integereger representing the time zone's 310 * hour offset from GMT. (Default value used if this argument is not 311 * given: <code>0.</code>) 312 <p> 313 * @param minutesOffset a long integereger representing the time zone's 314 * minute offset from GMT. (Default value used if this argument is not 315 * given: <code>0.</code>) 316 <p> 317 * To illustrate the time zone offset, a value of <code>-05:00</code> 318 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 319 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 320 * hour offset and <code>0</code> for the minutes offset. 321 <p> 322 * 323</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 324The native C++ implementation of this method defines a default argument 325value. In the documentation generated for different libSBML language 326bindings, you may or may not see corresponding arguments in the method 327declarations. For example, in Java and C#, a default argument is handled by 328declaring two separate methods, with one of them having the argument and 329the other one lacking the argument. However, the libSBML documentation will 330be <em>identical</em> for both methods. Consequently, if you are reading 331this and do not see an argument even though one is described, please look 332for descriptions of other variants of this method near where this one 333appears in the documentation. 334</dd></dl> 335 336 */ public 337 Date(long year, long month, long day, long hour, long minute, long second, long sign, long hoursOffset) { 338 this(libsbmlJNI.new_Date__SWIG_1(year, month, day, hour, minute, second, sign, hoursOffset), true); 339 } 340 341 342/** 343 * Creates a time and date representation for use in model annotations 344 * and elsewhere. 345 <p> 346 * The following is the complete set of possible arguments to this 347 * constructor, with default values as indicated: 348 <p> 349 * @param year a long integereger representing the year. This should be 350 * a four-digit number such as <code>2011.</code> (Default value used if this 351 * argument is not given: <code>2000.</code>) 352 <p> 353 * @param month a long integereger representing the month, with a range 354 * of values of 1–12. The value <code>1</code> represents January, and so 355 * on. (Default value used if this argument is not given: <code>1.</code>) 356 <p> 357 * @param day a long integereger representing the day of the month, with 358 * a range of values of 1–31. (Default value used if this argument 359 * is not given: <code>1.</code>) 360 <p> 361 * @param hour a long integereger representing the hour on a 24-hour 362 * clock, with a range of values of 0–23. (Default value used if 363 * this argument is not given: <code>0.</code>) 364 <p> 365 * @param minute a long integereger representing the minute, with a 366 * range of 0–59. (Default value used if this argument is not 367 * given: <code>0.</code>) 368 <p> 369 * @param second a long integereger representing the second, with a 370 * range of 0–59. (Default value used if this argument is not 371 * given: <code>0.</code>) 372 <p> 373 * @param sign a long integereger representing the sign of the offset 374 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 375 * below for further explanations. (Default value used if this argument 376 * is not given: <code>0.</code>) 377 <p> 378 * @param hoursOffset a long integereger representing the time zone's 379 * hour offset from GMT. (Default value used if this argument is not 380 * given: <code>0.</code>) 381 <p> 382 * @param minutesOffset a long integereger representing the time zone's 383 * minute offset from GMT. (Default value used if this argument is not 384 * given: <code>0.</code>) 385 <p> 386 * To illustrate the time zone offset, a value of <code>-05:00</code> 387 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 388 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 389 * hour offset and <code>0</code> for the minutes offset. 390 <p> 391 * 392</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 393The native C++ implementation of this method defines a default argument 394value. In the documentation generated for different libSBML language 395bindings, you may or may not see corresponding arguments in the method 396declarations. For example, in Java and C#, a default argument is handled by 397declaring two separate methods, with one of them having the argument and 398the other one lacking the argument. However, the libSBML documentation will 399be <em>identical</em> for both methods. Consequently, if you are reading 400this and do not see an argument even though one is described, please look 401for descriptions of other variants of this method near where this one 402appears in the documentation. 403</dd></dl> 404 405 */ public 406 Date(long year, long month, long day, long hour, long minute, long second, long sign) { 407 this(libsbmlJNI.new_Date__SWIG_2(year, month, day, hour, minute, second, sign), true); 408 } 409 410 411/** 412 * Creates a time and date representation for use in model annotations 413 * and elsewhere. 414 <p> 415 * The following is the complete set of possible arguments to this 416 * constructor, with default values as indicated: 417 <p> 418 * @param year a long integereger representing the year. This should be 419 * a four-digit number such as <code>2011.</code> (Default value used if this 420 * argument is not given: <code>2000.</code>) 421 <p> 422 * @param month a long integereger representing the month, with a range 423 * of values of 1–12. The value <code>1</code> represents January, and so 424 * on. (Default value used if this argument is not given: <code>1.</code>) 425 <p> 426 * @param day a long integereger representing the day of the month, with 427 * a range of values of 1–31. (Default value used if this argument 428 * is not given: <code>1.</code>) 429 <p> 430 * @param hour a long integereger representing the hour on a 24-hour 431 * clock, with a range of values of 0–23. (Default value used if 432 * this argument is not given: <code>0.</code>) 433 <p> 434 * @param minute a long integereger representing the minute, with a 435 * range of 0–59. (Default value used if this argument is not 436 * given: <code>0.</code>) 437 <p> 438 * @param second a long integereger representing the second, with a 439 * range of 0–59. (Default value used if this argument is not 440 * given: <code>0.</code>) 441 <p> 442 * @param sign a long integereger representing the sign of the offset 443 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 444 * below for further explanations. (Default value used if this argument 445 * is not given: <code>0.</code>) 446 <p> 447 * @param hoursOffset a long integereger representing the time zone's 448 * hour offset from GMT. (Default value used if this argument is not 449 * given: <code>0.</code>) 450 <p> 451 * @param minutesOffset a long integereger representing the time zone's 452 * minute offset from GMT. (Default value used if this argument is not 453 * given: <code>0.</code>) 454 <p> 455 * To illustrate the time zone offset, a value of <code>-05:00</code> 456 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 457 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 458 * hour offset and <code>0</code> for the minutes offset. 459 <p> 460 * 461</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 462The native C++ implementation of this method defines a default argument 463value. In the documentation generated for different libSBML language 464bindings, you may or may not see corresponding arguments in the method 465declarations. For example, in Java and C#, a default argument is handled by 466declaring two separate methods, with one of them having the argument and 467the other one lacking the argument. However, the libSBML documentation will 468be <em>identical</em> for both methods. Consequently, if you are reading 469this and do not see an argument even though one is described, please look 470for descriptions of other variants of this method near where this one 471appears in the documentation. 472</dd></dl> 473 474 */ public 475 Date(long year, long month, long day, long hour, long minute, long second) { 476 this(libsbmlJNI.new_Date__SWIG_3(year, month, day, hour, minute, second), true); 477 } 478 479 480/** 481 * Creates a time and date representation for use in model annotations 482 * and elsewhere. 483 <p> 484 * The following is the complete set of possible arguments to this 485 * constructor, with default values as indicated: 486 <p> 487 * @param year a long integereger representing the year. This should be 488 * a four-digit number such as <code>2011.</code> (Default value used if this 489 * argument is not given: <code>2000.</code>) 490 <p> 491 * @param month a long integereger representing the month, with a range 492 * of values of 1–12. The value <code>1</code> represents January, and so 493 * on. (Default value used if this argument is not given: <code>1.</code>) 494 <p> 495 * @param day a long integereger representing the day of the month, with 496 * a range of values of 1–31. (Default value used if this argument 497 * is not given: <code>1.</code>) 498 <p> 499 * @param hour a long integereger representing the hour on a 24-hour 500 * clock, with a range of values of 0–23. (Default value used if 501 * this argument is not given: <code>0.</code>) 502 <p> 503 * @param minute a long integereger representing the minute, with a 504 * range of 0–59. (Default value used if this argument is not 505 * given: <code>0.</code>) 506 <p> 507 * @param second a long integereger representing the second, with a 508 * range of 0–59. (Default value used if this argument is not 509 * given: <code>0.</code>) 510 <p> 511 * @param sign a long integereger representing the sign of the offset 512 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 513 * below for further explanations. (Default value used if this argument 514 * is not given: <code>0.</code>) 515 <p> 516 * @param hoursOffset a long integereger representing the time zone's 517 * hour offset from GMT. (Default value used if this argument is not 518 * given: <code>0.</code>) 519 <p> 520 * @param minutesOffset a long integereger representing the time zone's 521 * minute offset from GMT. (Default value used if this argument is not 522 * given: <code>0.</code>) 523 <p> 524 * To illustrate the time zone offset, a value of <code>-05:00</code> 525 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 526 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 527 * hour offset and <code>0</code> for the minutes offset. 528 <p> 529 * 530</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 531The native C++ implementation of this method defines a default argument 532value. In the documentation generated for different libSBML language 533bindings, you may or may not see corresponding arguments in the method 534declarations. For example, in Java and C#, a default argument is handled by 535declaring two separate methods, with one of them having the argument and 536the other one lacking the argument. However, the libSBML documentation will 537be <em>identical</em> for both methods. Consequently, if you are reading 538this and do not see an argument even though one is described, please look 539for descriptions of other variants of this method near where this one 540appears in the documentation. 541</dd></dl> 542 543 */ public 544 Date(long year, long month, long day, long hour, long minute) { 545 this(libsbmlJNI.new_Date__SWIG_4(year, month, day, hour, minute), true); 546 } 547 548 549/** 550 * Creates a time and date representation for use in model annotations 551 * and elsewhere. 552 <p> 553 * The following is the complete set of possible arguments to this 554 * constructor, with default values as indicated: 555 <p> 556 * @param year a long integereger representing the year. This should be 557 * a four-digit number such as <code>2011.</code> (Default value used if this 558 * argument is not given: <code>2000.</code>) 559 <p> 560 * @param month a long integereger representing the month, with a range 561 * of values of 1–12. The value <code>1</code> represents January, and so 562 * on. (Default value used if this argument is not given: <code>1.</code>) 563 <p> 564 * @param day a long integereger representing the day of the month, with 565 * a range of values of 1–31. (Default value used if this argument 566 * is not given: <code>1.</code>) 567 <p> 568 * @param hour a long integereger representing the hour on a 24-hour 569 * clock, with a range of values of 0–23. (Default value used if 570 * this argument is not given: <code>0.</code>) 571 <p> 572 * @param minute a long integereger representing the minute, with a 573 * range of 0–59. (Default value used if this argument is not 574 * given: <code>0.</code>) 575 <p> 576 * @param second a long integereger representing the second, with a 577 * range of 0–59. (Default value used if this argument is not 578 * given: <code>0.</code>) 579 <p> 580 * @param sign a long integereger representing the sign of the offset 581 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 582 * below for further explanations. (Default value used if this argument 583 * is not given: <code>0.</code>) 584 <p> 585 * @param hoursOffset a long integereger representing the time zone's 586 * hour offset from GMT. (Default value used if this argument is not 587 * given: <code>0.</code>) 588 <p> 589 * @param minutesOffset a long integereger representing the time zone's 590 * minute offset from GMT. (Default value used if this argument is not 591 * given: <code>0.</code>) 592 <p> 593 * To illustrate the time zone offset, a value of <code>-05:00</code> 594 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 595 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 596 * hour offset and <code>0</code> for the minutes offset. 597 <p> 598 * 599</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 600The native C++ implementation of this method defines a default argument 601value. In the documentation generated for different libSBML language 602bindings, you may or may not see corresponding arguments in the method 603declarations. For example, in Java and C#, a default argument is handled by 604declaring two separate methods, with one of them having the argument and 605the other one lacking the argument. However, the libSBML documentation will 606be <em>identical</em> for both methods. Consequently, if you are reading 607this and do not see an argument even though one is described, please look 608for descriptions of other variants of this method near where this one 609appears in the documentation. 610</dd></dl> 611 612 */ public 613 Date(long year, long month, long day, long hour) { 614 this(libsbmlJNI.new_Date__SWIG_5(year, month, day, hour), true); 615 } 616 617 618/** 619 * Creates a time and date representation for use in model annotations 620 * and elsewhere. 621 <p> 622 * The following is the complete set of possible arguments to this 623 * constructor, with default values as indicated: 624 <p> 625 * @param year a long integereger representing the year. This should be 626 * a four-digit number such as <code>2011.</code> (Default value used if this 627 * argument is not given: <code>2000.</code>) 628 <p> 629 * @param month a long integereger representing the month, with a range 630 * of values of 1–12. The value <code>1</code> represents January, and so 631 * on. (Default value used if this argument is not given: <code>1.</code>) 632 <p> 633 * @param day a long integereger representing the day of the month, with 634 * a range of values of 1–31. (Default value used if this argument 635 * is not given: <code>1.</code>) 636 <p> 637 * @param hour a long integereger representing the hour on a 24-hour 638 * clock, with a range of values of 0–23. (Default value used if 639 * this argument is not given: <code>0.</code>) 640 <p> 641 * @param minute a long integereger representing the minute, with a 642 * range of 0–59. (Default value used if this argument is not 643 * given: <code>0.</code>) 644 <p> 645 * @param second a long integereger representing the second, with a 646 * range of 0–59. (Default value used if this argument is not 647 * given: <code>0.</code>) 648 <p> 649 * @param sign a long integereger representing the sign of the offset 650 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 651 * below for further explanations. (Default value used if this argument 652 * is not given: <code>0.</code>) 653 <p> 654 * @param hoursOffset a long integereger representing the time zone's 655 * hour offset from GMT. (Default value used if this argument is not 656 * given: <code>0.</code>) 657 <p> 658 * @param minutesOffset a long integereger representing the time zone's 659 * minute offset from GMT. (Default value used if this argument is not 660 * given: <code>0.</code>) 661 <p> 662 * To illustrate the time zone offset, a value of <code>-05:00</code> 663 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 664 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 665 * hour offset and <code>0</code> for the minutes offset. 666 <p> 667 * 668</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 669The native C++ implementation of this method defines a default argument 670value. In the documentation generated for different libSBML language 671bindings, you may or may not see corresponding arguments in the method 672declarations. For example, in Java and C#, a default argument is handled by 673declaring two separate methods, with one of them having the argument and 674the other one lacking the argument. However, the libSBML documentation will 675be <em>identical</em> for both methods. Consequently, if you are reading 676this and do not see an argument even though one is described, please look 677for descriptions of other variants of this method near where this one 678appears in the documentation. 679</dd></dl> 680 681 */ public 682 Date(long year, long month, long day) { 683 this(libsbmlJNI.new_Date__SWIG_6(year, month, day), true); 684 } 685 686 687/** 688 * Creates a time and date representation for use in model annotations 689 * and elsewhere. 690 <p> 691 * The following is the complete set of possible arguments to this 692 * constructor, with default values as indicated: 693 <p> 694 * @param year a long integereger representing the year. This should be 695 * a four-digit number such as <code>2011.</code> (Default value used if this 696 * argument is not given: <code>2000.</code>) 697 <p> 698 * @param month a long integereger representing the month, with a range 699 * of values of 1–12. The value <code>1</code> represents January, and so 700 * on. (Default value used if this argument is not given: <code>1.</code>) 701 <p> 702 * @param day a long integereger representing the day of the month, with 703 * a range of values of 1–31. (Default value used if this argument 704 * is not given: <code>1.</code>) 705 <p> 706 * @param hour a long integereger representing the hour on a 24-hour 707 * clock, with a range of values of 0–23. (Default value used if 708 * this argument is not given: <code>0.</code>) 709 <p> 710 * @param minute a long integereger representing the minute, with a 711 * range of 0–59. (Default value used if this argument is not 712 * given: <code>0.</code>) 713 <p> 714 * @param second a long integereger representing the second, with a 715 * range of 0–59. (Default value used if this argument is not 716 * given: <code>0.</code>) 717 <p> 718 * @param sign a long integereger representing the sign of the offset 719 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 720 * below for further explanations. (Default value used if this argument 721 * is not given: <code>0.</code>) 722 <p> 723 * @param hoursOffset a long integereger representing the time zone's 724 * hour offset from GMT. (Default value used if this argument is not 725 * given: <code>0.</code>) 726 <p> 727 * @param minutesOffset a long integereger representing the time zone's 728 * minute offset from GMT. (Default value used if this argument is not 729 * given: <code>0.</code>) 730 <p> 731 * To illustrate the time zone offset, a value of <code>-05:00</code> 732 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 733 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 734 * hour offset and <code>0</code> for the minutes offset. 735 <p> 736 * 737</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 738The native C++ implementation of this method defines a default argument 739value. In the documentation generated for different libSBML language 740bindings, you may or may not see corresponding arguments in the method 741declarations. For example, in Java and C#, a default argument is handled by 742declaring two separate methods, with one of them having the argument and 743the other one lacking the argument. However, the libSBML documentation will 744be <em>identical</em> for both methods. Consequently, if you are reading 745this and do not see an argument even though one is described, please look 746for descriptions of other variants of this method near where this one 747appears in the documentation. 748</dd></dl> 749 750 */ public 751 Date(long year, long month) { 752 this(libsbmlJNI.new_Date__SWIG_7(year, month), true); 753 } 754 755 756/** 757 * Creates a time and date representation for use in model annotations 758 * and elsewhere. 759 <p> 760 * The following is the complete set of possible arguments to this 761 * constructor, with default values as indicated: 762 <p> 763 * @param year a long integereger representing the year. This should be 764 * a four-digit number such as <code>2011.</code> (Default value used if this 765 * argument is not given: <code>2000.</code>) 766 <p> 767 * @param month a long integereger representing the month, with a range 768 * of values of 1–12. The value <code>1</code> represents January, and so 769 * on. (Default value used if this argument is not given: <code>1.</code>) 770 <p> 771 * @param day a long integereger representing the day of the month, with 772 * a range of values of 1–31. (Default value used if this argument 773 * is not given: <code>1.</code>) 774 <p> 775 * @param hour a long integereger representing the hour on a 24-hour 776 * clock, with a range of values of 0–23. (Default value used if 777 * this argument is not given: <code>0.</code>) 778 <p> 779 * @param minute a long integereger representing the minute, with a 780 * range of 0–59. (Default value used if this argument is not 781 * given: <code>0.</code>) 782 <p> 783 * @param second a long integereger representing the second, with a 784 * range of 0–59. (Default value used if this argument is not 785 * given: <code>0.</code>) 786 <p> 787 * @param sign a long integereger representing the sign of the offset 788 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 789 * below for further explanations. (Default value used if this argument 790 * is not given: <code>0.</code>) 791 <p> 792 * @param hoursOffset a long integereger representing the time zone's 793 * hour offset from GMT. (Default value used if this argument is not 794 * given: <code>0.</code>) 795 <p> 796 * @param minutesOffset a long integereger representing the time zone's 797 * minute offset from GMT. (Default value used if this argument is not 798 * given: <code>0.</code>) 799 <p> 800 * To illustrate the time zone offset, a value of <code>-05:00</code> 801 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 802 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 803 * hour offset and <code>0</code> for the minutes offset. 804 <p> 805 * 806</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 807The native C++ implementation of this method defines a default argument 808value. In the documentation generated for different libSBML language 809bindings, you may or may not see corresponding arguments in the method 810declarations. For example, in Java and C#, a default argument is handled by 811declaring two separate methods, with one of them having the argument and 812the other one lacking the argument. However, the libSBML documentation will 813be <em>identical</em> for both methods. Consequently, if you are reading 814this and do not see an argument even though one is described, please look 815for descriptions of other variants of this method near where this one 816appears in the documentation. 817</dd></dl> 818 819 */ public 820 Date(long year) { 821 this(libsbmlJNI.new_Date__SWIG_8(year), true); 822 } 823 824 825/** 826 * Creates a time and date representation for use in model annotations 827 * and elsewhere. 828 <p> 829 * The following is the complete set of possible arguments to this 830 * constructor, with default values as indicated: 831 <p> 832 * @param year a long integereger representing the year. This should be 833 * a four-digit number such as <code>2011.</code> (Default value used if this 834 * argument is not given: <code>2000.</code>) 835 <p> 836 * @param month a long integereger representing the month, with a range 837 * of values of 1–12. The value <code>1</code> represents January, and so 838 * on. (Default value used if this argument is not given: <code>1.</code>) 839 <p> 840 * @param day a long integereger representing the day of the month, with 841 * a range of values of 1–31. (Default value used if this argument 842 * is not given: <code>1.</code>) 843 <p> 844 * @param hour a long integereger representing the hour on a 24-hour 845 * clock, with a range of values of 0–23. (Default value used if 846 * this argument is not given: <code>0.</code>) 847 <p> 848 * @param minute a long integereger representing the minute, with a 849 * range of 0–59. (Default value used if this argument is not 850 * given: <code>0.</code>) 851 <p> 852 * @param second a long integereger representing the second, with a 853 * range of 0–59. (Default value used if this argument is not 854 * given: <code>0.</code>) 855 <p> 856 * @param sign a long integereger representing the sign of the offset 857 * (<code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-</code>). See the paragraph 858 * below for further explanations. (Default value used if this argument 859 * is not given: <code>0.</code>) 860 <p> 861 * @param hoursOffset a long integereger representing the time zone's 862 * hour offset from GMT. (Default value used if this argument is not 863 * given: <code>0.</code>) 864 <p> 865 * @param minutesOffset a long integereger representing the time zone's 866 * minute offset from GMT. (Default value used if this argument is not 867 * given: <code>0.</code>) 868 <p> 869 * To illustrate the time zone offset, a value of <code>-05:00</code> 870 * would correspond to USA Eastern Standard Time. In the {@link Date} object, 871 * this would require a value of <code>1</code> for the sign field, <code>5</code> for the 872 * hour offset and <code>0</code> for the minutes offset. 873 <p> 874 * 875</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 876The native C++ implementation of this method defines a default argument 877value. In the documentation generated for different libSBML language 878bindings, you may or may not see corresponding arguments in the method 879declarations. For example, in Java and C#, a default argument is handled by 880declaring two separate methods, with one of them having the argument and 881the other one lacking the argument. However, the libSBML documentation will 882be <em>identical</em> for both methods. Consequently, if you are reading 883this and do not see an argument even though one is described, please look 884for descriptions of other variants of this method near where this one 885appears in the documentation. 886</dd></dl> 887 888 */ public 889 Date() { 890 this(libsbmlJNI.new_Date__SWIG_9(), true); 891 } 892 893 894/** 895 * Creates a {@link Date} object from a string expressing a date and time value. 896 <p> 897 * This constructor expects its argument to be in the <a target='_blank' 898 * href='http://www.w3.org/TR/NOTE-datetime'>W3C date format with time 899 * zone offset</a>, used in RDF Dublin Core annotations within SBML. 900 <p> 901 * <p> 902 * The date format expresses a date and time value as a string of the form 903 * YYYY-MM-DDThh:mm:ssXHH:ZZ, where 904 <p> 905 * <ul> 906 * <li> <em>YYYY</em> is a four-digit integer representing the year. This 907 * should be a four-digit number such as <code>2011.</code> 908 <p> 909 * <li> <em>MM</em> is a two-digit integer representing the month, with a range 910 * of values of 01–12. The value <code>1</code> represents January, and so 911 * on. 912 <p> 913 * <li> <em>DD</em> is a two-digit integer representing the day of the month, 914 * with a range of values of 01–31. 915 <p> 916 * <li> <em>hh</em> is a two-digit integer representing the hour on a 24-hour 917 * clock, with a range of values of 00–23. 918 <p> 919 * <li> <em>mm</em> is a two-digit integer representing the minute, with a 920 * range of 00–59. 921 <p> 922 * <li> <em>ss</em> is a two-digit integer representing the second, with a 923 * range of 0–59. 924 <p> 925 * <li> <em>X</em> is the the sign of the time zone offset, either <code>+</code> or 926 * <code>-</code>. 927 <p> 928 * <li> <em>HH</em> is a two-digit integer representing the hour of the time 929 * zone offset, with a range of 00–23. 930 <p> 931 * <li> <em>ZZ</em> is a two-digit integer representing the minutes of the time 932 * zone offset, with a range of 00–59. 933 * 934 * </ul> <p> 935 * In the string format above, it is important not to forget the literal 936 * character <code>T</code> in the string. Here is an example date/time string: 937 * <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, 938 * 1997, at 19:20:30 in Central European Time (which is UTC +1:00). 939 <p> 940 * If this constructor is given a <code>null</code> argument or a string of length 941 * zero, it constructs a {@link Date} object with the value of January 1, 2000, 942 * at time 00:00 UTC. Otherwise, the argument <em>must</em> be in the 943 * complete format described above, or unpredictable results will happen. 944 <p> 945 * @param date a string representing the date. 946 */ public 947 Date(String date) { 948 this(libsbmlJNI.new_Date__SWIG_10(date), true); 949 } 950 951 952/** 953 * Copy constructor; creates a copy of this {@link Date}. 954 <p> 955 * @param orig the object to copy. 956 */ public 957 Date(Date orig) { 958 this(libsbmlJNI.new_Date__SWIG_11(Date.getCPtr(orig), orig), true); 959 } 960 961 962/** 963 * Creates and returns a deep copy of this {@link Date} object. 964 <p> 965 * @return the (deep) copy of this {@link Date} object. 966 */ public 967 Date cloneObject() { 968 long cPtr = libsbmlJNI.Date_cloneObject(swigCPtr, this); 969 return (cPtr == 0) ? null : new Date(cPtr, true); 970 } 971 972 973/** 974 * Returns the year from this {@link Date}. 975 <p> 976 * @return the year from this {@link Date}. 977 */ public 978 long getYear() { 979 return libsbmlJNI.Date_getYear(swigCPtr, this); 980 } 981 982 983/** 984 * Returns the month from this {@link Date}. 985 <p> 986 * @return the month from this {@link Date}. 987 */ public 988 long getMonth() { 989 return libsbmlJNI.Date_getMonth(swigCPtr, this); 990 } 991 992 993/** 994 * Returns the day from this {@link Date}. 995 <p> 996 * @return the day from this {@link Date}. 997 */ public 998 long getDay() { 999 return libsbmlJNI.Date_getDay(swigCPtr, this); 1000 } 1001 1002 1003/** 1004 * Returns the hour from this {@link Date}. 1005 <p> 1006 * @return the hour from this {@link Date}. 1007 */ public 1008 long getHour() { 1009 return libsbmlJNI.Date_getHour(swigCPtr, this); 1010 } 1011 1012 1013/** 1014 * Returns the minute from this {@link Date}. 1015 <p> 1016 * @return the minute from this {@link Date}. 1017 */ public 1018 long getMinute() { 1019 return libsbmlJNI.Date_getMinute(swigCPtr, this); 1020 } 1021 1022 1023/** 1024 * Returns the seconds from this {@link Date}. 1025 <p> 1026 * @return the seconds from this {@link Date}. 1027 */ public 1028 long getSecond() { 1029 return libsbmlJNI.Date_getSecond(swigCPtr, this); 1030 } 1031 1032 1033/** 1034 * Returns the sign of the time zone offset from this {@link Date}. 1035 <p> 1036 * @return the sign of the offset from this {@link Date}. 1037 */ public 1038 long getSignOffset() { 1039 return libsbmlJNI.Date_getSignOffset(swigCPtr, this); 1040 } 1041 1042 1043/** 1044 * Returns the hours of the time zone offset from this {@link Date}. 1045 <p> 1046 * @return the hours of the offset from this {@link Date}. 1047 */ public 1048 long getHoursOffset() { 1049 return libsbmlJNI.Date_getHoursOffset(swigCPtr, this); 1050 } 1051 1052 1053/** 1054 * Returns the minutes of the time zone offset from this {@link Date}. 1055 <p> 1056 * @return the minutes of the offset from this {@link Date}. 1057 */ public 1058 long getMinutesOffset() { 1059 return libsbmlJNI.Date_getMinutesOffset(swigCPtr, this); 1060 } 1061 1062 1063/** 1064 * Returns the current {@link Date} value in text-string form. 1065 <p> 1066 * The string returned will be in the <a target='_blank' 1067 * href='http://www.w3.org/TR/NOTE-datetime'>W3C date format with time 1068 * zone offset</a>, used in RDF Dublin Core annotations within SBML. 1069 <p> 1070 * <p> 1071 * The date format expresses a date and time value as a string of the form 1072 * YYYY-MM-DDThh:mm:ssXHH:ZZ, where 1073 <p> 1074 * <ul> 1075 * <li> <em>YYYY</em> is a four-digit integer representing the year. This 1076 * should be a four-digit number such as <code>2011.</code> 1077 <p> 1078 * <li> <em>MM</em> is a two-digit integer representing the month, with a range 1079 * of values of 01–12. The value <code>1</code> represents January, and so 1080 * on. 1081 <p> 1082 * <li> <em>DD</em> is a two-digit integer representing the day of the month, 1083 * with a range of values of 01–31. 1084 <p> 1085 * <li> <em>hh</em> is a two-digit integer representing the hour on a 24-hour 1086 * clock, with a range of values of 00–23. 1087 <p> 1088 * <li> <em>mm</em> is a two-digit integer representing the minute, with a 1089 * range of 00–59. 1090 <p> 1091 * <li> <em>ss</em> is a two-digit integer representing the second, with a 1092 * range of 0–59. 1093 <p> 1094 * <li> <em>X</em> is the the sign of the time zone offset, either <code>+</code> or 1095 * <code>-</code>. 1096 <p> 1097 * <li> <em>HH</em> is a two-digit integer representing the hour of the time 1098 * zone offset, with a range of 00–23. 1099 <p> 1100 * <li> <em>ZZ</em> is a two-digit integer representing the minutes of the time 1101 * zone offset, with a range of 00–59. 1102 * 1103 * </ul> <p> 1104 * In the string format above, it is important not to forget the literal 1105 * character <code>T</code> in the string. Here is an example date/time string: 1106 * <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, 1107 * 1997, at 19:20:30 in Central European Time (which is UTC +1:00). 1108 <p> 1109 * @return the date as a string. 1110 */ public 1111 String getDateAsString() { 1112 return libsbmlJNI.Date_getDateAsString(swigCPtr, this); 1113 } 1114 1115 1116/** 1117 * Sets the value of the year of this {@link Date} object. 1118 <p> 1119 * The value given as argument must be between 1000 and 9999 inclusive. 1120 * (In the millennium during which this libSBML documentation is being 1121 * written, a typical value is <code>2011</code>, but we hope that SBML will 1122 * continue to be used for a long time.) 1123 <p> 1124 * @param year a long integer representing the year. 1125 <p> 1126 * <p> 1127 * @return integer value indicating success/failure of the 1128 * function. The possible values 1129 * returned by this function are: 1130 * <ul> 1131 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1132 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1133 * </ul> 1134 */ public 1135 int setYear(long year) { 1136 return libsbmlJNI.Date_setYear(swigCPtr, this, year); 1137 } 1138 1139 1140/** 1141 * Sets the value of the month of this {@link Date} object. 1142 <p> 1143 * @param month a long integer representing the month; it must be in the 1144 * range 1–12 or an error will be signaled. 1145 <p> 1146 * <p> 1147 * @return integer value indicating success/failure of the 1148 * function. The possible values 1149 * returned by this function are: 1150 * <ul> 1151 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1152 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1153 * </ul> 1154 */ public 1155 int setMonth(long month) { 1156 return libsbmlJNI.Date_setMonth(swigCPtr, this, month); 1157 } 1158 1159 1160/** 1161 * Sets the value of the day of this {@link Date} object. 1162 <p> 1163 * @param day a long integer representing the day; it must be in the 1164 * range 0–31 or an error will be signaled. 1165 <p> 1166 * <p> 1167 * @return integer value indicating success/failure of the 1168 * function. The possible values 1169 * returned by this function are: 1170 * <ul> 1171 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1172 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1173 * </ul> 1174 */ public 1175 int setDay(long day) { 1176 return libsbmlJNI.Date_setDay(swigCPtr, this, day); 1177 } 1178 1179 1180/** 1181 * Sets the value of the hour of this {@link Date} object. 1182 <p> 1183 * @param hour a long integer representing the hour to set; it must be 1184 * in the range 0–23 or an error will be signaled. 1185 <p> 1186 * <p> 1187 * @return integer value indicating success/failure of the 1188 * function. The possible values 1189 * returned by this function are: 1190 * <ul> 1191 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1192 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1193 * </ul> 1194 */ public 1195 int setHour(long hour) { 1196 return libsbmlJNI.Date_setHour(swigCPtr, this, hour); 1197 } 1198 1199 1200/** 1201 * Sets the value of the minute of this {@link Date} object. 1202 <p> 1203 * @param minute a long integer representing the minute to set; it must 1204 * be in the range 0–59 or an error will be signaled. 1205 <p> 1206 * <p> 1207 * @return integer value indicating success/failure of the 1208 * function. The possible values 1209 * returned by this function are: 1210 * <ul> 1211 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1212 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1213 * </ul> 1214 */ public 1215 int setMinute(long minute) { 1216 return libsbmlJNI.Date_setMinute(swigCPtr, this, minute); 1217 } 1218 1219 1220/** 1221 * Sets the value of the second of the {@link Date} object. 1222 <p> 1223 * @param second a long integer representing the seconds; it must 1224 * be in the range 0–59 or an error will be signaled. 1225 <p> 1226 * <p> 1227 * @return integer value indicating success/failure of the 1228 * function. The possible values 1229 * returned by this function are: 1230 * <ul> 1231 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1232 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1233 * </ul> 1234 */ public 1235 int setSecond(long second) { 1236 return libsbmlJNI.Date_setSecond(swigCPtr, this, second); 1237 } 1238 1239 1240/** 1241 * Sets the value of the sign of the time zone offset of this {@link Date} object. 1242 <p> 1243 * The only permissible values are <code>0</code> and <code>1.</code> 1244 <p> 1245 * @param sign a long integer representing the sign of the offset, with 1246 * <code>0</code> signifying <code>+</code> and <code>1</code> signifying <code>-.</code> 1247 <p> 1248 * <p> 1249 * @return integer value indicating success/failure of the 1250 * function. The possible values 1251 * returned by this function are: 1252 * <ul> 1253 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1254 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1255 * </ul> 1256 */ public 1257 int setSignOffset(long sign) { 1258 return libsbmlJNI.Date_setSignOffset(swigCPtr, this, sign); 1259 } 1260 1261 1262/** 1263 * Sets the value of this {@link Date} object's time zone hour offset. 1264 <p> 1265 * @param hoursOffset a long integer representing the hours of the 1266 * offset; it must be in the range 0–23 or an error will be 1267 * signaled. 1268 <p> 1269 * <p> 1270 * @return integer value indicating success/failure of the 1271 * function. The possible values 1272 * returned by this function are: 1273 * <ul> 1274 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1275 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1276 * </ul> 1277 */ public 1278 int setHoursOffset(long hoursOffset) { 1279 return libsbmlJNI.Date_setHoursOffset(swigCPtr, this, hoursOffset); 1280 } 1281 1282 1283/** 1284 * Sets the value of this {@link Date} object's time zone minutes offset. 1285 <p> 1286 * @param minutesOffset a long integer representing the minutes of the 1287 * offset; it must be in the range 0–59 or an error will be 1288 * signaled. 1289 <p> 1290 * <p> 1291 * @return integer value indicating success/failure of the 1292 * function. The possible values 1293 * returned by this function are: 1294 * <ul> 1295 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1296 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1297 * </ul> 1298 */ public 1299 int setMinutesOffset(long minutesOffset) { 1300 return libsbmlJNI.Date_setMinutesOffset(swigCPtr, this, minutesOffset); 1301 } 1302 1303 1304/** 1305 * Sets the value of this {@link Date} object using a date and time value 1306 * expressed as a text string. 1307 <p> 1308 * This method expects its argument to be in the <a target='_blank' 1309 * href='http://www.w3.org/TR/NOTE-datetime'>W3C date format with time 1310 * zone offset</a>, used in RDF Dublin Core annotations within SBML. 1311 <p> 1312 * <p> 1313 * The date format expresses a date and time value as a string of the form 1314 * YYYY-MM-DDThh:mm:ssXHH:ZZ, where 1315 <p> 1316 * <ul> 1317 * <li> <em>YYYY</em> is a four-digit integer representing the year. This 1318 * should be a four-digit number such as <code>2011.</code> 1319 <p> 1320 * <li> <em>MM</em> is a two-digit integer representing the month, with a range 1321 * of values of 01–12. The value <code>1</code> represents January, and so 1322 * on. 1323 <p> 1324 * <li> <em>DD</em> is a two-digit integer representing the day of the month, 1325 * with a range of values of 01–31. 1326 <p> 1327 * <li> <em>hh</em> is a two-digit integer representing the hour on a 24-hour 1328 * clock, with a range of values of 00–23. 1329 <p> 1330 * <li> <em>mm</em> is a two-digit integer representing the minute, with a 1331 * range of 00–59. 1332 <p> 1333 * <li> <em>ss</em> is a two-digit integer representing the second, with a 1334 * range of 0–59. 1335 <p> 1336 * <li> <em>X</em> is the the sign of the time zone offset, either <code>+</code> or 1337 * <code>-</code>. 1338 <p> 1339 * <li> <em>HH</em> is a two-digit integer representing the hour of the time 1340 * zone offset, with a range of 00–23. 1341 <p> 1342 * <li> <em>ZZ</em> is a two-digit integer representing the minutes of the time 1343 * zone offset, with a range of 00–59. 1344 * 1345 * </ul> <p> 1346 * In the string format above, it is important not to forget the literal 1347 * character <code>T</code> in the string. Here is an example date/time string: 1348 * <code>1997-07-16T19:20:30+01:00</code>, which would represent July 16, 1349 * 1997, at 19:20:30 in Central European Time (which is UTC +1:00). 1350 <p> 1351 * If this method is given a <code>null</code> argument or a string of length zero, 1352 * it constructs a {@link Date} object with the value of January 1, 2000, at time 1353 * 00:00 UTC. Otherwise, the argument <em>must</em> be in the complete format 1354 * described above, or unpredictable results will happen. 1355 <p> 1356 * @param date a string representing the date. 1357 <p> 1358 * <p> 1359 * @return integer value indicating success/failure of the 1360 * function. The possible values 1361 * returned by this function are: 1362 * <ul> 1363 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1364 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1365 * </ul> 1366 */ public 1367 int setDateAsString(String date) { 1368 return libsbmlJNI.Date_setDateAsString(swigCPtr, this, date); 1369 } 1370 1371 1372/** 1373 * Returns true or false depending on whether this date object represents 1374 * a valid date and time value. 1375 <p> 1376 * This method verifies that the date/time value stored in this object is 1377 * well-formed and represents plausible values. A time and date value in 1378 * the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., 1379 * <code>1997-07-16T19:20:30+01:00</code>) where XHH:ZZ is the time zone 1380 * offset. This method checks such things as whether the value of the 1381 * month number is less than or equal to 12, whether the value of the 1382 * minutes number is less than or equal to 59, whether a time zone offset 1383 * is set, etc. 1384 <p> 1385 * @return <code>true</code> if the date is valid, <code>false</code> otherwise. 1386 */ public 1387 boolean representsValidDate() { 1388 return libsbmlJNI.Date_representsValidDate(swigCPtr, this); 1389 } 1390 1391 1392/** * @internal */ public 1393 boolean hasBeenModified() { 1394 return libsbmlJNI.Date_hasBeenModified(swigCPtr, this); 1395 } 1396 1397 1398/** * @internal */ public 1399 void resetModifiedFlags() { 1400 libsbmlJNI.Date_resetModifiedFlags(swigCPtr, this); 1401 } 1402 1403}