001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 3.0.8 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 011public class MemberConstraint extends SBase { 012 private long swigCPtr; 013 014 protected MemberConstraint(long cPtr, boolean cMemoryOwn) 015 { 016 super(libsbmlJNI.MemberConstraint_SWIGUpcast(cPtr), cMemoryOwn); 017 swigCPtr = cPtr; 018 } 019 020 protected static long getCPtr(MemberConstraint obj) 021 { 022 return (obj == null) ? 0 : obj.swigCPtr; 023 } 024 025 protected static long getCPtrAndDisown (MemberConstraint obj) 026 { 027 long ptr = 0; 028 029 if (obj != null) 030 { 031 ptr = obj.swigCPtr; 032 obj.swigCMemOwn = false; 033 } 034 035 return ptr; 036 } 037 038 protected void finalize() { 039 delete(); 040 } 041 042 public synchronized void delete() { 043 if (swigCPtr != 0) { 044 if (swigCMemOwn) { 045 swigCMemOwn = false; 046 libsbmlJNI.delete_MemberConstraint(swigCPtr); 047 } 048 swigCPtr = 0; 049 } 050 super.delete(); 051 } 052 053 054/** 055 * Creates a new MemberConstraint with the given level, version, and package version. 056 <p> 057 * @param level a long integer, the SBML Level to assign to this MemberConstraint 058 <p> 059 * @param version a long integer, the SBML Version to assign to this MemberConstraint 060 <p> 061 * @param pkgVersion a long integer, the SBML Groups Version to assign to this MemberConstraint 062 */ public 063 MemberConstraint(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 064 this(libsbmlJNI.new_MemberConstraint__SWIG_0(level, version, pkgVersion), true); 065 } 066 067 068/** 069 * Creates a new MemberConstraint with the given level, version, and package version. 070 <p> 071 * @param level a long integer, the SBML Level to assign to this MemberConstraint 072 <p> 073 * @param version a long integer, the SBML Version to assign to this MemberConstraint 074 <p> 075 * @param pkgVersion a long integer, the SBML Groups Version to assign to this MemberConstraint 076 */ public 077 MemberConstraint(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 078 this(libsbmlJNI.new_MemberConstraint__SWIG_1(level, version), true); 079 } 080 081 082/** 083 * Creates a new MemberConstraint with the given level, version, and package version. 084 <p> 085 * @param level a long integer, the SBML Level to assign to this MemberConstraint 086 <p> 087 * @param version a long integer, the SBML Version to assign to this MemberConstraint 088 <p> 089 * @param pkgVersion a long integer, the SBML Groups Version to assign to this MemberConstraint 090 */ public 091 MemberConstraint(long level) throws org.sbml.libsbml.SBMLConstructorException { 092 this(libsbmlJNI.new_MemberConstraint__SWIG_2(level), true); 093 } 094 095 096/** 097 * Creates a new MemberConstraint with the given level, version, and package version. 098 <p> 099 * @param level a long integer, the SBML Level to assign to this MemberConstraint 100 <p> 101 * @param version a long integer, the SBML Version to assign to this MemberConstraint 102 <p> 103 * @param pkgVersion a long integer, the SBML Groups Version to assign to this MemberConstraint 104 */ public 105 MemberConstraint() throws org.sbml.libsbml.SBMLConstructorException { 106 this(libsbmlJNI.new_MemberConstraint__SWIG_3(), true); 107 } 108 109 110/** 111 * Creates a new MemberConstraint with the given {@link GroupsPkgNamespaces} object. 112 <p> 113 * @param groupsns the {@link GroupsPkgNamespaces} object 114 */ public 115 MemberConstraint(GroupsPkgNamespaces groupsns) throws org.sbml.libsbml.SBMLConstructorException { 116 this(libsbmlJNI.new_MemberConstraint__SWIG_4(GroupsPkgNamespaces.getCPtr(groupsns), groupsns), true); 117 } 118 119 120/** 121 * Copy constructor for MemberConstraint. 122 <p> 123 * @param orig; the MemberConstraint instance to copy. 124 */ public 125 MemberConstraint(MemberConstraint orig) throws org.sbml.libsbml.SBMLConstructorException { 126 this(libsbmlJNI.new_MemberConstraint__SWIG_5(MemberConstraint.getCPtr(orig), orig), true); 127 } 128 129 130/** 131 * Creates and returns a deep copy of this MemberConstraint object. 132 <p> 133 * @return a (deep) copy of this MemberConstraint object. 134 */ public 135 MemberConstraint cloneObject() { 136 long cPtr = libsbmlJNI.MemberConstraint_cloneObject(swigCPtr, this); 137 return (cPtr == 0) ? null : new MemberConstraint(cPtr, true); 138 } 139 140 141/** 142 * Returns the value of the 'id' attribute of this MemberConstraint. 143 <p> 144 * @return the value of the 'id' attribute of this MemberConstraint as a string. 145 */ public 146 String getId() { 147 return libsbmlJNI.MemberConstraint_getId(swigCPtr, this); 148 } 149 150 151/** 152 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 153 * MemberConstraint's 'id' attribute has been set. 154 <p> 155 * @return <code>true</code> if this MemberConstraint's 'id' attribute has been set, 156 * otherwise <code>false</code> is returned. 157 */ public 158 boolean isSetId() { 159 return libsbmlJNI.MemberConstraint_isSetId(swigCPtr, this); 160 } 161 162 163/** 164 * Sets the value of the 'id' attribute of this MemberConstraint. 165 <p> 166 * @param id; String value of the 'id' attribute to be set 167 <p> 168 * @return integer value indicating success/failure of the 169 * function. The possible values 170 * returned by this function are: 171 * <ul> 172 * <li> LIBSBML_OPERATION_SUCCESS 173 * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE 174 * </ul> 175 */ public 176 int setId(String id) { 177 return libsbmlJNI.MemberConstraint_setId(swigCPtr, this, id); 178 } 179 180 181/** 182 * Unsets the value of the 'id' attribute of this MemberConstraint. 183 <p> 184 * @return integer value indicating success/failure of the 185 * function. The possible values 186 * returned by this function are: 187 * <ul> 188 * <li> LIBSBML_OPERATION_SUCCESS 189 * <li> LIBSBML_OPERATION_FAILED 190 * </ul> 191 */ public 192 int unsetId() { 193 return libsbmlJNI.MemberConstraint_unsetId(swigCPtr, this); 194 } 195 196 197/** 198 * Returns the value of the 'name' attribute of this MemberConstraint. 199 <p> 200 * @return the value of the 'name' attribute of this MemberConstraint as a string. 201 */ public 202 String getName() { 203 return libsbmlJNI.MemberConstraint_getName(swigCPtr, this); 204 } 205 206 207/** 208 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 209 * MemberConstraint's 'name' attribute has been set. 210 <p> 211 * @return <code>true</code> if this MemberConstraint's 'name' attribute has been set, 212 * otherwise <code>false</code> is returned. 213 */ public 214 boolean isSetName() { 215 return libsbmlJNI.MemberConstraint_isSetName(swigCPtr, this); 216 } 217 218 219/** 220 * Sets the value of the 'name' attribute of this MemberConstraint. 221 <p> 222 * @param name; String value of the 'name' attribute to be set 223 <p> 224 * @return integer value indicating success/failure of the 225 * function. The possible values 226 * returned by this function are: 227 * <ul> 228 * <li> LIBSBML_OPERATION_SUCCESS 229 * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE 230 * </ul> 231 */ public 232 int setName(String name) { 233 return libsbmlJNI.MemberConstraint_setName(swigCPtr, this, name); 234 } 235 236 237/** 238 * Unsets the value of the 'name' attribute of this MemberConstraint. 239 <p> 240 * @return integer value indicating success/failure of the 241 * function. The possible values 242 * returned by this function are: 243 * <ul> 244 * <li> LIBSBML_OPERATION_SUCCESS 245 * <li> LIBSBML_OPERATION_FAILED 246 * </ul> 247 */ public 248 int unsetName() { 249 return libsbmlJNI.MemberConstraint_unsetName(swigCPtr, this); 250 } 251 252 253/** 254 * Returns the value of the 'distinctAttribute' attribute of this MemberConstraint. 255 <p> 256 * @return the value of the 'distinctAttribute' attribute of this MemberConstraint as a string. 257 */ public 258 String getDistinctAttribute() { 259 return libsbmlJNI.MemberConstraint_getDistinctAttribute(swigCPtr, this); 260 } 261 262 263/** 264 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 265 * MemberConstraint's 'distinctAttribute' attribute has been set. 266 <p> 267 * @return <code>true</code> if this MemberConstraint's 'distinctAttribute' attribute has been set, 268 * otherwise <code>false</code> is returned. 269 */ public 270 boolean isSetDistinctAttribute() { 271 return libsbmlJNI.MemberConstraint_isSetDistinctAttribute(swigCPtr, this); 272 } 273 274 275/** 276 * Sets the value of the 'distinctAttribute' attribute of this MemberConstraint. 277 <p> 278 * @param distinctAttribute; String value of the 'distinctAttribute' attribute to be set 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> LIBSBML_OPERATION_SUCCESS 285 * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE 286 * </ul> 287 */ public 288 int setDistinctAttribute(String distinctAttribute) { 289 return libsbmlJNI.MemberConstraint_setDistinctAttribute(swigCPtr, this, distinctAttribute); 290 } 291 292 293/** 294 * Unsets the value of the 'distinctAttribute' attribute of this MemberConstraint. 295 <p> 296 * @return integer value indicating success/failure of the 297 * function. The possible values 298 * returned by this function are: 299 * <ul> 300 * <li> LIBSBML_OPERATION_SUCCESS 301 * <li> LIBSBML_OPERATION_FAILED 302 * </ul> 303 */ public 304 int unsetDistinctAttribute() { 305 return libsbmlJNI.MemberConstraint_unsetDistinctAttribute(swigCPtr, this); 306 } 307 308 309/** 310 * Returns the value of the 'identicalAttribute' attribute of this MemberConstraint. 311 <p> 312 * @return the value of the 'identicalAttribute' attribute of this MemberConstraint as a string. 313 */ public 314 String getIdenticalAttribute() { 315 return libsbmlJNI.MemberConstraint_getIdenticalAttribute(swigCPtr, this); 316 } 317 318 319/** 320 * Predicate returning <code>true</code> or <code>false</code> depending on whether this 321 * MemberConstraint's 'identicalAttribute' attribute has been set. 322 <p> 323 * @return <code>true</code> if this MemberConstraint's 'identicalAttribute' attribute has been set, 324 * otherwise <code>false</code> is returned. 325 */ public 326 boolean isSetIdenticalAttribute() { 327 return libsbmlJNI.MemberConstraint_isSetIdenticalAttribute(swigCPtr, this); 328 } 329 330 331/** 332 * Sets the value of the 'identicalAttribute' attribute of this MemberConstraint. 333 <p> 334 * @param identicalAttribute; String value of the 'identicalAttribute' attribute to be set 335 <p> 336 * @return integer value indicating success/failure of the 337 * function. The possible values 338 * returned by this function are: 339 * <ul> 340 * <li> LIBSBML_OPERATION_SUCCESS 341 * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE 342 * </ul> 343 */ public 344 int setIdenticalAttribute(String identicalAttribute) { 345 return libsbmlJNI.MemberConstraint_setIdenticalAttribute(swigCPtr, this, identicalAttribute); 346 } 347 348 349/** 350 * Unsets the value of the 'identicalAttribute' attribute of this MemberConstraint. 351 <p> 352 * @return integer value indicating success/failure of the 353 * function. The possible values 354 * returned by this function are: 355 * <ul> 356 * <li> LIBSBML_OPERATION_SUCCESS 357 * <li> LIBSBML_OPERATION_FAILED 358 * </ul> 359 */ public 360 int unsetIdenticalAttribute() { 361 return libsbmlJNI.MemberConstraint_unsetIdenticalAttribute(swigCPtr, this); 362 } 363 364 365/** 366 * Returns the XML element name of this object, which for MemberConstraint, is 367 * always <code>'memberConstraint'.</code> 368 <p> 369 * @return the name of this element, i.e. <code>'memberConstraint'.</code> 370 */ public 371 String getElementName() { 372 return libsbmlJNI.MemberConstraint_getElementName(swigCPtr, this); 373 } 374 375 376/** 377 * Returns the libSBML type code for this SBML object. 378 <p> 379 * LibSBML attaches an identifying code to every 380 * kind of SBML object. These are known as <em>SBML type codes</em>. In 381 * other languages, the set of type codes is stored in an enumeration; in 382 * the Java language interface for libSBML, the type codes are defined as 383 * static integer constants in the interface class {@link 384 * libsbmlConstants}. The names of the type codes all begin with the 385 * characters <code>SBML_.</code> 386 <p> 387 * @return the SBML type code for this object, or 388 * {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default). 389 <p> 390 * @see #getElementName() 391 */ public 392 int getTypeCode() { 393 return libsbmlJNI.MemberConstraint_getTypeCode(swigCPtr, this); 394 } 395 396 397/** 398 * Predicate returning <code>true</code> if all the required attributes 399 * for this MemberConstraint object have been set. 400 <p> 401 * @note The required attributes for a MemberConstraint object are: 402 <p> 403 * @return a boolean value indicating whether all the required 404 * attributes for this object have been defined. 405 */ public 406 boolean hasRequiredAttributes() { 407 return libsbmlJNI.MemberConstraint_hasRequiredAttributes(swigCPtr, this); 408 } 409 410 411/** * @internal */ public 412 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) { 413 libsbmlJNI.MemberConstraint_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag); 414 } 415 416}