001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.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 * container class that stores {@link GlobalRenderInformation} objects. 013 <p> 014 * The {@link ListOfLayouts} in the SBML model contains a {@link ListOfGlobalRenderInformation} which holds all {@link GlobalRenderInformation} 015 * objects. 016 */ 017 018public class ListOfGlobalRenderInformation extends ListOf { 019 private long swigCPtr; 020 021 protected ListOfGlobalRenderInformation(long cPtr, boolean cMemoryOwn) 022 { 023 super(libsbmlJNI.ListOfGlobalRenderInformation_SWIGUpcast(cPtr), cMemoryOwn); 024 swigCPtr = cPtr; 025 } 026 027 protected static long getCPtr(ListOfGlobalRenderInformation obj) 028 { 029 return (obj == null) ? 0 : obj.swigCPtr; 030 } 031 032 protected static long getCPtrAndDisown (ListOfGlobalRenderInformation obj) 033 { 034 long ptr = 0; 035 036 if (obj != null) 037 { 038 ptr = obj.swigCPtr; 039 obj.swigCMemOwn = false; 040 } 041 042 return ptr; 043 } 044 045 protected void finalize() { 046 delete(); 047 } 048 049 public synchronized void delete() { 050 if (swigCPtr != 0) { 051 if (swigCMemOwn) { 052 swigCMemOwn = false; 053 libsbmlJNI.delete_ListOfGlobalRenderInformation(swigCPtr); 054 } 055 swigCPtr = 0; 056 } 057 super.delete(); 058 } 059 060 061/** 062 * Creates and returns a deep copy of the {@link ListOfGlobalRenderInformation} object. 063 <p> 064 * @return a (deep) copy of this {@link ListOfGlobalRenderInformation} 065 */ public 066 ListOfGlobalRenderInformation cloneObject() { 067 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_cloneObject(swigCPtr, this); 068 return (cPtr == 0) ? null : new ListOfGlobalRenderInformation(cPtr, true); 069 } 070 071 072/** 073 * Parses the xml information in the given node and sets the attributes. 074 * This method should never be called by the user. It is only used to read render 075 * information from annotations. 076 <p> 077 * @param node the {@link XMLNode} object reference that describes the {@link ListOfGlobalRenderInformation} 078 * object to be instantiated. 079 */ public 080 void parseXML(XMLNode node) { 081 libsbmlJNI.ListOfGlobalRenderInformation_parseXML(swigCPtr, this, XMLNode.getCPtr(node), node); 082 } 083 084 085/** 086 * Constructor which instantiates an empty {@link ListOfGlobalRenderInformation} object. 087 */ public 088 ListOfGlobalRenderInformation(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 089 this(libsbmlJNI.new_ListOfGlobalRenderInformation__SWIG_0(level, version, pkgVersion), true); 090 } 091 092 093/** 094 * Constructor which instantiates an empty {@link ListOfGlobalRenderInformation} object. 095 */ public 096 ListOfGlobalRenderInformation(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 097 this(libsbmlJNI.new_ListOfGlobalRenderInformation__SWIG_1(level, version), true); 098 } 099 100 101/** 102 * Constructor which instantiates an empty {@link ListOfGlobalRenderInformation} object. 103 */ public 104 ListOfGlobalRenderInformation(long level) throws org.sbml.libsbml.SBMLConstructorException { 105 this(libsbmlJNI.new_ListOfGlobalRenderInformation__SWIG_2(level), true); 106 } 107 108 109/** 110 * Constructor which instantiates an empty {@link ListOfGlobalRenderInformation} object. 111 */ public 112 ListOfGlobalRenderInformation() throws org.sbml.libsbml.SBMLConstructorException { 113 this(libsbmlJNI.new_ListOfGlobalRenderInformation__SWIG_3(), true); 114 } 115 116 117/** 118 * Ctor. 119 */ public 120 ListOfGlobalRenderInformation(RenderPkgNamespaces renderns) throws org.sbml.libsbml.SBMLConstructorException { 121 this(libsbmlJNI.new_ListOfGlobalRenderInformation__SWIG_4(RenderPkgNamespaces.getCPtr(renderns), renderns), true); 122 } 123 124 125/** 126 * Copy constructor for {@link ListOfGlobalRenderInformation} objects. 127 */ public 128 ListOfGlobalRenderInformation(ListOfGlobalRenderInformation source) throws org.sbml.libsbml.SBMLConstructorException { 129 this(libsbmlJNI.new_ListOfGlobalRenderInformation__SWIG_5(ListOfGlobalRenderInformation.getCPtr(source), source), true); 130 } 131 132 133/** 134 * Get the type code of the objects contained in this {@link ListOf}. 135 <p> 136 * LibSBML attaches an identifying code to every 137 * kind of SBML object. These are known as <em>SBML type codes</em>. In 138 * other languages, the set of type codes is stored in an enumeration; in 139 * the Java language interface for libSBML, the type codes are defined as 140 * static integer constants in the interface class {@link 141 * libsbmlConstants}. The names of the type codes all begin with the 142 * characters <code>SBML_.</code> 143 <p> 144 * @return the SBML type code for the objects contained in this {@link ListOf} 145 * instance, or {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default). 146 */ public 147 int getItemTypeCode() { 148 return libsbmlJNI.ListOfGlobalRenderInformation_getItemTypeCode(swigCPtr, this); 149 } 150 151 152/** */ public 153 boolean isValidTypeForList(SBase item) { 154 return libsbmlJNI.ListOfGlobalRenderInformation_isValidTypeForList(swigCPtr, this, SBase.getCPtrAndDisown(item), item); 155 } 156 157 158/** 159 * Returns the XML element name of this object, which for 160 * {@link ListOfGlobalRenderInformation}, is always <code>'listOfGlobalRenderInformation'.</code> 161 <p> 162 * @return the name of this element, i.e., <code>'listOfGlobalRenderInformation'.</code> 163 */ public 164 String getElementName() { 165 return libsbmlJNI.ListOfGlobalRenderInformation_getElementName(swigCPtr, this); 166 } 167 168 169/** 170 * Creates an {@link XMLNode} object from this {@link ListOfGlobalRenderInformation} object. 171 <p> 172 * @return the {@link XMLNode} with the XML representation for the 173 * {@link ListOfGlobalRenderInformation} object. 174 */ public 175 XMLNode toXML() { 176 return new XMLNode(libsbmlJNI.ListOfGlobalRenderInformation_toXML(swigCPtr, this), true); 177 } 178 179 180/** 181 * Sets the version of the render information list. 182 * The version consists of a major and a minor version number. 183 <p> 184 * @param major major version number 185 * @param minor minor version number 186 */ public 187 void setVersion(long major, long minor) { 188 libsbmlJNI.ListOfGlobalRenderInformation_setVersion(swigCPtr, this, major, minor); 189 } 190 191 192/** 193 * Returns the major version of the render information list. 194 <p> 195 * @return the major version number of the global render information list 196 */ public 197 long getMajorVersion() { 198 return libsbmlJNI.ListOfGlobalRenderInformation_getMajorVersion(swigCPtr, this); 199 } 200 201 202/** 203 * Returns the minor version of the render information list. 204 <p> 205 * @return the minor version number of the global render information list 206 */ public 207 long getMinorVersion() { 208 return libsbmlJNI.ListOfGlobalRenderInformation_getMinorVersion(swigCPtr, this); 209 } 210 211 212/** 213 * Predicate returning <code>true</code> if this {@link ListOfGlobalRenderInformation}'s 214 * 'versionMajor' attribute is set. 215 <p> 216 * @return <code>true</code> if this {@link ListOfGlobalRenderInformation}'s 'versionMajor' 217 * attribute has been set, otherwise <code>false</code> is returned. 218 */ public 219 boolean isSetVersionMajor() { 220 return libsbmlJNI.ListOfGlobalRenderInformation_isSetVersionMajor(swigCPtr, this); 221 } 222 223 224/** 225 * Predicate returning <code>true</code> if this {@link ListOfGlobalRenderInformation}'s 226 * 'versionMinor' attribute is set. 227 <p> 228 * @return <code>true</code> if this {@link ListOfGlobalRenderInformation}'s 'versionMinor' 229 * attribute has been set, otherwise <code>false</code> is returned. 230 */ public 231 boolean isSetVersionMinor() { 232 return libsbmlJNI.ListOfGlobalRenderInformation_isSetVersionMinor(swigCPtr, this); 233 } 234 235 236/** 237 * Unsets the value of the 'versionMajor' attribute of this 238 * {@link ListOfGlobalRenderInformation}. 239 <p> 240 * <p> 241 * @return integer value indicating success/failure of the 242 * function. The possible values 243 * returned by this function are: 244 * <ul> 245 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 246 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 247 * </ul> 248 */ public 249 int unsetVersionMajor() { 250 return libsbmlJNI.ListOfGlobalRenderInformation_unsetVersionMajor(swigCPtr, this); 251 } 252 253 254/** 255 * Unsets the value of the 'versionMinor' attribute of this 256 * {@link ListOfGlobalRenderInformation}. 257 <p> 258 * <p> 259 * @return integer value indicating success/failure of the 260 * function. The possible values 261 * returned by this function are: 262 * <ul> 263 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 264 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 265 * </ul> 266 */ public 267 int unsetVersionMinor() { 268 return libsbmlJNI.ListOfGlobalRenderInformation_unsetVersionMinor(swigCPtr, this); 269 } 270 271 272/** 273 * Sets the value of the 'versionMajor' attribute of this 274 * {@link ListOfGlobalRenderInformation}. 275 <p> 276 * @param versionMajor long value of the 'versionMajor' attribute to 277 * be set. 278 <p> 279 * <p> 280 * @return integer value indicating success/failure of the 281 * function. The possible values 282 * returned by this function are: 283 * <ul> 284 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 285 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 286 * </ul> 287 */ public 288 int setVersionMajor(long versionMajor) { 289 return libsbmlJNI.ListOfGlobalRenderInformation_setVersionMajor(swigCPtr, this, versionMajor); 290 } 291 292 293/** 294 * Sets the value of the 'versionMinor' attribute of this 295 * {@link ListOfGlobalRenderInformation}. 296 <p> 297 * @param versionMinor long value of the 'versionMinor' attribute to 298 * be set. 299 <p> 300 * <p> 301 * @return integer value indicating success/failure of the 302 * function. The possible values 303 * returned by this function are: 304 * <ul> 305 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 306 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 307 * </ul> 308 */ public 309 int setVersionMinor(long versionMinor) { 310 return libsbmlJNI.ListOfGlobalRenderInformation_setVersionMinor(swigCPtr, this, versionMinor); 311 } 312 313 314/** 315 * Returns the version as a string. 316 <p> 317 * @return the version of the {@link GlobalRenderInformation} object 318 * as a string 319 */ public 320 String getVersionString() { 321 return libsbmlJNI.ListOfGlobalRenderInformation_getVersionString(swigCPtr, this); 322 } 323 324 325/** 326 * Returns a pointer to the {@link GlobalRenderInformation} with the given index or null if 327 * the index is invalid. 328 <p> 329 * @param i index of the {@link GlobalRenderInformation} object to be returned 330 <p> 331 * @return pointer to the {@link GlobalRenderInformation} at the given index or null. 332 */ public 333 SBase get(long i) { 334 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_get__SWIG_0(swigCPtr, this, i); 335 return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false); 336 } 337 338 339/** 340 * Returns a pointer to the {@link GlobalRenderInformation} with the given <code>id</code> or <code>null</code> if 341 * the id is invalid. 342 <p> 343 * @param id id of the {@link GlobalRenderInformation} object to be returned 344 <p> 345 * @return pointer to the {@link GlobalRenderInformation} at the given <code>id</code> or <code>null.</code> 346 */ public 347 GlobalRenderInformation get(String id) { 348 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_get__SWIG_2(swigCPtr, this, id); 349 return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, false); 350 } 351 352 353/** 354 * Removes the nth item from this {@link ListOfGlobalRenderInformation} items and returns a pointer to 355 * it. 356 <p> 357 * The caller owns the returned item and is responsible for deleting it. 358 <p> 359 * @param n the index of the item to remove 360 <p> 361 * @see #size() 362 */ public 363 SBase remove(long n) { 364 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_remove__SWIG_0(swigCPtr, this, n); 365 return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, true); 366 } 367 368 369/** 370 * Removes item in this {@link ListOfGlobalRenderInformation} items with the given identifier. 371 <p> 372 * The caller owns the returned item and is responsible for deleting it. 373 * If none of the items in this list have the identifier <code>sid</code>, then @c 374 * null is returned. 375 <p> 376 * @param sid the identifier of the item to remove 377 <p> 378 * @return the item removed. As mentioned above, the caller owns the 379 * returned item. 380 */ public 381 GlobalRenderInformation remove(String sid) { 382 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_remove__SWIG_1(swigCPtr, this, sid); 383 return (cPtr == 0) ? null : new GlobalRenderInformation(cPtr, true); 384 } 385 386 387/** 388 * Returns the value of the 'defaultValues' element of this 389 * {@link ListOfGlobalRenderInformation}. 390 <p> 391 * @return the value of the 'defaultValues' element of this 392 * {@link ListOfGlobalRenderInformation} as a {@link DefaultValues}. 393 */ public 394 DefaultValues getDefaultValues() { 395 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_getDefaultValues__SWIG_0(swigCPtr, this); 396 return (cPtr == 0) ? null : new DefaultValues(cPtr, false); 397 } 398 399 400/** 401 * Predicate returning <code>true</code> if this {@link ListOfGlobalRenderInformation}'s 402 * 'defaultValues' element is set. 403 <p> 404 * @return <code>true</code> if this {@link ListOfGlobalRenderInformation}'s 'defaultValues' 405 * element has been set, otherwise <code>false</code> is returned. 406 */ public 407 boolean isSetDefaultValues() { 408 return libsbmlJNI.ListOfGlobalRenderInformation_isSetDefaultValues(swigCPtr, this); 409 } 410 411 412/** 413 * Sets the value of the 'defaultValues' element of this 414 * {@link ListOfGlobalRenderInformation}. 415 <p> 416 * @param defaultValues {@link DefaultValues} value of the 'defaultValues' element 417 * to be set. 418 <p> 419 * <p> 420 * @return integer value indicating success/failure of the 421 * function. The possible values 422 * returned by this function are: 423 * <ul> 424 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 425 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 426 * </ul> 427 */ public 428 int setDefaultValues(DefaultValues defaultValues) { 429 return libsbmlJNI.ListOfGlobalRenderInformation_setDefaultValues(swigCPtr, this, DefaultValues.getCPtr(defaultValues), defaultValues); 430 } 431 432 433/** 434 * Creates a new {@link DefaultValues} object, adds it to this 435 * {@link ListOfGlobalRenderInformation} object and returns the {@link DefaultValues} object 436 * created. 437 <p> 438 * @return a new {@link DefaultValues} object instance. 439 */ public 440 DefaultValues createDefaultValues() { 441 long cPtr = libsbmlJNI.ListOfGlobalRenderInformation_createDefaultValues(swigCPtr, this); 442 return (cPtr == 0) ? null : new DefaultValues(cPtr, false); 443 } 444 445 446/** 447 * Unsets the value of the 'defaultValues' element of this 448 * {@link ListOfGlobalRenderInformation}. 449 <p> 450 * <p> 451 * @return integer value indicating success/failure of the 452 * function. The possible values 453 * returned by this function are: 454 * <ul> 455 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 456 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 457 * </ul> 458 */ public 459 int unsetDefaultValues() { 460 return libsbmlJNI.ListOfGlobalRenderInformation_unsetDefaultValues(swigCPtr, this); 461 } 462 463 464/** * @internal */ public 465 void connectToChild() { 466 libsbmlJNI.ListOfGlobalRenderInformation_connectToChild(swigCPtr, this); 467 } 468 469}