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