001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.11 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 GeneAssociation extends SBase { 012 private long swigCPtr; 013 014 protected GeneAssociation(long cPtr, boolean cMemoryOwn) 015 { 016 super(libsbmlJNI.GeneAssociation_SWIGUpcast(cPtr), cMemoryOwn); 017 swigCPtr = cPtr; 018 } 019 020 protected static long getCPtr(GeneAssociation obj) 021 { 022 return (obj == null) ? 0 : obj.swigCPtr; 023 } 024 025 protected static long getCPtrAndDisown (GeneAssociation 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_GeneAssociation(swigCPtr); 047 } 048 swigCPtr = 0; 049 } 050 super.delete(); 051 } 052 053 public GeneAssociation(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException { 054 this(libsbmlJNI.new_GeneAssociation__SWIG_0(level, version, pkgVersion), true); 055 } 056 057 public GeneAssociation(long level, long version) throws org.sbml.libsbml.SBMLConstructorException { 058 this(libsbmlJNI.new_GeneAssociation__SWIG_1(level, version), true); 059 } 060 061 public GeneAssociation(long level) throws org.sbml.libsbml.SBMLConstructorException { 062 this(libsbmlJNI.new_GeneAssociation__SWIG_2(level), true); 063 } 064 065 public GeneAssociation() throws org.sbml.libsbml.SBMLConstructorException { 066 this(libsbmlJNI.new_GeneAssociation__SWIG_3(), true); 067 } 068 069 public GeneAssociation(XMLNode node, FbcPkgNamespaces fbcns) throws org.sbml.libsbml.SBMLConstructorException { 070 this(libsbmlJNI.new_GeneAssociation__SWIG_4(XMLNode.getCPtr(node), node, FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 071 } 072 073 public GeneAssociation(FbcPkgNamespaces fbcns) throws org.sbml.libsbml.SBMLConstructorException { 074 this(libsbmlJNI.new_GeneAssociation__SWIG_5(FbcPkgNamespaces.getCPtr(fbcns), fbcns), true); 075 } 076 077 public GeneAssociation(GeneAssociation source) throws org.sbml.libsbml.SBMLConstructorException { 078 this(libsbmlJNI.new_GeneAssociation__SWIG_6(GeneAssociation.getCPtr(source), source), true); 079 } 080 081 082/** 083 * Returns the value of the 'metaid' attribute of this object. 084 * <p> 085 * The optional attribute named 'metaid', present on every major SBML 086 * component type, is for supporting metadata annotations using RDF 087 * (Resource Description Format). The attribute value has the data type 088 * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML 089 * identifier type, which means each 'metaid' value must be globally 090 * unique within an SBML file. (Importantly, this uniqueness criterion 091 * applies across any attribute with type <a 092 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 093 * 'metaid' attribute used by SBML—something to be aware of if your 094 * application-specific XML content inside the 'annotation' subelement 095 * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.) 096 * The 'metaid' value serves to identify a model 097 * component for purposes such as referencing that component from 098 * metadata placed within 'annotation' subelements. 099 * <p> 100 * @return the meta-identifier of this SBML object, as a string. 101 * <p> 102 * @see #isSetMetaId() 103 * @see #setMetaId(String metaid) 104 * @internal 105 */ public 106 String getId() { 107 return libsbmlJNI.GeneAssociation_getId(swigCPtr, this); 108 } 109 110 111/** 112 * Predicate returning <code>true</code> if this object's 'metaid' attribute is set. 113 * <p> 114 * The optional attribute named 'metaid', present on every major SBML 115 * component type, is for supporting metadata annotations using RDF 116 * (Resource Description Format). The attribute value has the data type 117 * <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, the XML 118 * identifier type, which means each 'metaid' value must be globally 119 * unique within an SBML file. (Importantly, this uniqueness criterion 120 * applies across any attribute with type <a 121 * href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>, not just the 122 * 'metaid' attribute used by SBML—something to be aware of if your 123 * application-specific XML content inside the 'annotation' subelement 124 * happens to use <a href='http://www.w3.org/TR/REC-xml/#id'>XML ID</a>.) 125 * The 'metaid' value serves to identify a model component for purposes 126 * such as referencing that component from metadata placed within 127 * 'annotation' subelements. 128 * <p> 129 * @return <code>true</code> if the 'metaid' attribute of this SBML object is 130 * set, <code>false</code> otherwise. 131 * <p> 132 * @see #getMetaId() 133 * @see #setMetaId(String metaid) 134 * @internal 135 */ public 136 boolean isSetId() { 137 return libsbmlJNI.GeneAssociation_isSetId(swigCPtr, this); 138 } 139 140 141/** 142 * Predicate returning <code>true</code> if this 143 * object has a {@link ModelHistory} object attached to it. 144 * <p> 145 * @return <code>true</code> if the {@link ModelHistory} of this object is set, 146 * <code>false</code> otherwise. 147 * <p> 148 * @note In SBML Level 2, model history annotations were only 149 * permitted on the {@link Model} element. In SBML Level 3, they are 150 * permitted on all SBML components derived from {@link SBase}. 151 * @internal 152 */ public 153 int setId(String id) { 154 return libsbmlJNI.GeneAssociation_setId(swigCPtr, this, id); 155 } 156 157 158/** 159 * Unsets the value of the 'id' attribute of this SBML object. 160 * <p> 161 * Most (but not all) objects in SBML include two common attributes: 'id' 162 * and 'name'. The identifier given by an object's 'id' attribute value 163 * is used to identify the object within the SBML model definition. 164 * Other objects can refer to the component using this identifier. The 165 * data type of 'id' is always either <code>Sid</code> or 166 * <code>UnitSId</code>, depending on the object in question. Both 167 * data types are defined as follows: 168 * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'> 169 * letter .= 'a'..'z','A'..'Z' 170 * digit .= '0'..'9' 171 * idChar .= letter | digit | '_' 172 * SId .= ( letter | '_' ) idChar* 173 * </pre> 174 * <p> 175 * The equality of <code>SId</code> and <code>UnitSId</code> type values 176 * in SBML is determined by an exact character sequence match; i.e., 177 * comparisons of these identifiers must be performed in a case-sensitive 178 * manner. This applies to all uses of <code>SId</code> and 179 * <code>UnitSId</code>. 180 * <p> 181 * @return integer value indicating success/failure of the 182 * function. The possible values returned by this function are: 183 * <ul> 184 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 185 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED } 186 * </ul> 187 */ public 188 int unsetId() { 189 return libsbmlJNI.GeneAssociation_unsetId(swigCPtr, this); 190 } 191 192 public String getReaction() { 193 return libsbmlJNI.GeneAssociation_getReaction(swigCPtr, this); 194 } 195 196 public boolean isSetReaction() { 197 return libsbmlJNI.GeneAssociation_isSetReaction(swigCPtr, this); 198 } 199 200 public int setReaction(String reaction) { 201 return libsbmlJNI.GeneAssociation_setReaction(swigCPtr, this, reaction); 202 } 203 204 public int unsetReaction() { 205 return libsbmlJNI.GeneAssociation_unsetReaction(swigCPtr, this); 206 } 207 208 public Association createAssociation() { 209 long cPtr = libsbmlJNI.GeneAssociation_createAssociation(swigCPtr, this); 210 return (cPtr == 0) ? null : new Association(cPtr, false); 211 } 212 213 public Association getAssociation() { 214 long cPtr = libsbmlJNI.GeneAssociation_getAssociation__SWIG_0(swigCPtr, this); 215 return (cPtr == 0) ? null : new Association(cPtr, false); 216 } 217 218 public boolean isSetAssociation() { 219 return libsbmlJNI.GeneAssociation_isSetAssociation(swigCPtr, this); 220 } 221 222 public int setAssociation(Association association) { 223 return libsbmlJNI.GeneAssociation_setAssociation(swigCPtr, this, Association.getCPtr(association), association); 224 } 225 226 public int unsetAssociation() { 227 return libsbmlJNI.GeneAssociation_unsetAssociation(swigCPtr, this); 228 } 229 230 231/** 232 * Returns the XML element name of this object. 233 * <p> 234 * This is overridden by subclasses to return a string appropriate to the 235 * SBML component. For example, {@link Model} defines it as returning 236 * <code>'model'</code>, {@link CompartmentType} defines it as returning <code>'compartmentType'</code>, 237 * and so on. 238 */ public 239 String getElementName() { 240 return libsbmlJNI.GeneAssociation_getElementName(swigCPtr, this); 241 } 242 243 244/** 245 * Creates and returns a deep copy of this {@link SBase} object. 246 * <p> 247 * @return a (deep) copy of this {@link SBase} object. 248 */ public 249 GeneAssociation cloneObject() { 250 long cPtr = libsbmlJNI.GeneAssociation_cloneObject(swigCPtr, this); 251 return (cPtr == 0) ? null : new GeneAssociation(cPtr, true); 252 } 253 254 255/** 256 * Returns the libSBML type code for this object. 257 * <p> 258 * This method may return the type code of this SBML object, or it may 259 * return {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}. This 260 * is because subclasses of {@link SBase} are not required to implement this 261 * method to return a type code. This method is meant primarily for the 262 * LibSBML C interface, in which class and subclass information is not 263 * readily available. 264 * <p> 265 * @return the SBML object type code 266 * of this SBML object or 267 * {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (the default). 268 * <p> 269 * @see #getElementName() 270 * @see #getPackageName() 271 */ public 272 int getTypeCode() { 273 return libsbmlJNI.GeneAssociation_getTypeCode(swigCPtr, this); 274 } 275 276 public XMLNode toXML() { 277 return new XMLNode(libsbmlJNI.GeneAssociation_toXML(swigCPtr, this), true); 278 } 279 280}