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 controlled vocabulary 013 * annotation. 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 * The SBML Level 2 and Level 3 specifications define a simple 024 * format for annotating models when (a) referring to controlled vocabulary 025 * terms and database identifiers that define and describe biological and 026 * biochemical entities, and (b) describing the creator of a model and the 027 * model's modification history. This SBML format is a concrete syntax that 028 * conforms to the guidelines of MIRIAM (<a target='_blank' 029 * href='http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html'>'Minimum 030 * Information Requested in the Annotation of biochemical Models'</a>, 031 * <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005). The format uses 032 * a subset of W3C RDF (<a target='_blank' 033 * href='http://www.w3.org/RDF/'>Resource Description Format</a>). In order 034 * to help application developers work with annotations in this format, 035 * libSBML provides several helper classes that provide higher-level 036 * interfaces to the data elements; these classes include {@link CVTerm}, 037 * {@link ModelCreator}, {@link ModelHistory}, {@link RDFAnnotationParser}, and {@link Date}. 038 <p> 039 * <h2>Components of an SBML annotation</h2> 040 <p> 041 * The SBML annotation format consists of RDF-based content placed inside 042 * an <code><annotation></code> element attached to an SBML component 043 * such as {@link Species}, {@link Compartment}, etc. The following template illustrates 044 * the different parts of SBML annotations in XML form: 045 <p> 046 <pre class='fragment'> 047 <<span style='background-color: #bbb'>SBML_ELEMENT</span> <span style='background-color: #d0eed0'>+++</span> metaid="<span style='border-bottom: 1px solid black'>meta id</span>" <span style='background-color: #d0eed0'>+++</span>> 048 <span style='background-color: #d0eed0'>+++</span> 049 <annotation> 050 <span style='background-color: #d0eed0'>+++</span> 051 <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' 052 xmlns:dc='http://purl.org/dc/elements/1.1/' 053 xmlns:dcterm='http://purl.org/dc/terms/' 054 xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#' 055 xmlns:bqbiol='http://biomodels.net/biology-qualifiers/' 056 xmlns:bqmodel='http://biomodels.net/model-qualifiers/' > 057 <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 058 <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span> 059 <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 060 <rdf:Bag> 061 <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>URI</span>" /> 062 <span style='background-color: #edd'>...</span> 063 </rdf:Bag> 064 </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 065 <span style='background-color: #edd'>...</span> 066 </rdf:Description> 067 <span style='background-color: #d0eed0'>+++</span> 068 </rdf:RDF> 069 <span style='background-color: #d0eed0'>+++</span> 070 </annotation> 071 <span style='background-color: #d0eed0'>+++</span> 072 </<span style='background-color: #bbb'>SBML_ELEMENT</span>> 073 </pre> 074 <p> 075 * In the template above, the placeholder 076 * <span class='code' style='background-color: #bbb'>SBML_ELEMENT</span> stands for 077 * the XML tag name of an SBML model component (e.g., <code>model</code>, 078 * <code>reaction</code>, etc.) and the placeholder 079 * <span class='code' style='border-bottom: 1px solid black'>meta id</span> 080 * stands for the element's meta identifier, which is a field available 081 * on all SBML components derived from the {@link SBase} base object class. 082 * The <span style='border-bottom: 2px dotted #888'>dotted</span> 083 * portions are optional, the symbol 084 * <span class='code' style='background-color: #d0eed0'>+++</span> is a placeholder 085 * for either no content or valid XML content that is not defined by 086 * this annotation scheme, and the ellipses 087 * <span class='code' style='background-color: #edd'>...</span> 088 * are placeholders for zero or more elements of the same form as the 089 * immediately preceding element. The optional content 090 * <span class='code' style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span> 091 * is a creation and modification history; in libSBML, this is stored 092 * using {@link ModelHistory} objects. 093 <p> 094 * The placeholder <span class='code' style='background-color: 095 * #bbb'>RELATION_ELEMENT</span> refers to a BioModels.net qualifier element 096 * name. This is an element in either the XML namespace 097 * <code>'http://biomodels.net/model-qualifiers'</code> (for model 098 * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> (for 099 * biological qualifier). Note that these namespace URIs are only labels, 100 * and not actual Web locations, which means you cannot visit an address such 101 * as <code>'http://biomodels.net/model-qualifiers'</code> in your browser or 102 * try to have your application access it. @if Refer instead to the enumerations 103 * #ModelQualifierType_t and #BiolQualifierType_t for a list of the available 104 * relationship elements that can be used for <span class='code' 105 * style='background-color: #bbb'>RELATION_ELEMENT</span>.@endif 106 <p> 107 * The <span class='code' style='background-color: #d0d0ee'>URI</span> is a 108 * required data value that uniquely identifies a resource and data within 109 * that resource to which the annotation refers. Again, being URIs, these do 110 * not refer to physical Web locations; nevertheless, applications will often 111 * want a means of finding the resource to which a given <span class='code' 112 * style='background-color: #d0d0ee'>URI</span> refers. Providing the 113 * facilities for this task is the purpose of MIRIAM Resources, described in 114 * detail online at <a target='_blank' 115 * href='http://biomodels.net/miriam'>http://biomodels.net/miriam</a>) and 116 * also in the paper <a target='_blank' 117 * href='http://www.biomedcentral.com/1752-0509/1/58'>'MIRIAM Resources: tools to generate and 118 * resolve robust cross-references in Systems Biology'</a>, <i>BMC Systems 119 * Biology</i>, 58(1), 2007. 120 <p> 121 * The relation-resource pairs above are the 'controlled vocabulary' terms 122 * that which {@link CVTerm} is designed to store and manipulate. The next section 123 * describes these parts in more detail. For more information about 124 * SBML annotations in general, please refer to Section 6 in the 125 * SBML Level 2 (Versions 2–4) or Level 3 specification 126 * documents. 127 <p> 128 <p> 129 * <h2>The parts of a {@link CVTerm}</h2> 130 <p> 131 * Annotations that refer to controlled vocabularies are managed in libSBML 132 * using {@link CVTerm} objects. A set of RDF-based annotations attached to a 133 * given SBML <code><annotation></code> element are read by 134 * {@link RDFAnnotationParser} and converted into a list of these {@link CVTerm} objects. 135 * Each {@link CVTerm} object instance stores the following components of an 136 * annotation: 137 <p> 138 * <ul> 139 <p> 140 * <li>The <em>qualifier</em>, which can be a BioModels.net 'biological 141 * qualifier', a BioModels.net 'model qualifier', or an unknown qualifier 142 * (as far as the {@link CVTerm} class is concerned). Qualifiers are used in 143 * MIRIAM to indicate the nature of the relationship between the object 144 * being annotated and the resource. In {@link CVTerm}, the qualifiers can be 145 * manipulated using the methods {@link CVTerm#getQualifierType()}, 146 * {@link CVTerm#setQualifierType(int type)}, and related methods. 147 <p> 148 * <li>The <em>resource</em>, represented by a URI (which, we must remind 149 * developers, is not the same as a URL). In the {@link CVTerm} class, the 150 * resource component can be manipulated using the methods 151 * {@link CVTerm#addResource(String resource)} and 152 * {@link CVTerm#removeResource(String resource)}. 153 <p> 154 * </ul> 155 <p> 156 * Note that a {@link CVTerm} contains a single qualifier, but possibly more than 157 * one resource. This corresponds to the possibility of an annotation that 158 * points to multiple resources, all of which are qualified by the same 159 * BioModels.net qualifier. The {@link CVTerm} object class supports this by 160 * supporting a list of resources. 161 <p> 162 * Detailed explanations of the qualifiers defined by BioModels.net can be 163 * found at <a target='_blank' 164 * href='http://biomodels.net/qualifiers'>http://biomodels.net/qualifiers</a>. 165 */ 166 167public class CVTerm { 168 private long swigCPtr; 169 protected boolean swigCMemOwn; 170 171 protected CVTerm(long cPtr, boolean cMemoryOwn) 172 { 173 swigCMemOwn = cMemoryOwn; 174 swigCPtr = cPtr; 175 } 176 177 protected static long getCPtr(CVTerm obj) 178 { 179 return (obj == null) ? 0 : obj.swigCPtr; 180 } 181 182 protected static long getCPtrAndDisown (CVTerm obj) 183 { 184 long ptr = 0; 185 186 if (obj != null) 187 { 188 ptr = obj.swigCPtr; 189 obj.swigCMemOwn = false; 190 } 191 192 return ptr; 193 } 194 195 protected void finalize() { 196 delete(); 197 } 198 199 public synchronized void delete() { 200 if (swigCPtr != 0) { 201 if (swigCMemOwn) { 202 swigCMemOwn = false; 203 libsbmlJNI.delete_CVTerm(swigCPtr); 204 } 205 swigCPtr = 0; 206 } 207 } 208 209 /** 210 * Equality comparison method for CVTerm. 211 * <p> 212 * Because the Java methods for libSBML are actually wrappers around code 213 * implemented in C++ and C, certain operations will not behave as 214 * expected. Equality comparison is one such case. An instance of a 215 * libSBML object class is actually a <em>proxy object</em> 216 * wrapping the real underlying C/C++ object. The normal <code>==</code> 217 * equality operator in Java will <em>only compare the Java proxy objects</em>, 218 * not the underlying native object. The result is almost never what you 219 * want in practical situations. Unfortunately, Java does not provide a 220 * way to override <code>==</code>. 221 * <p> 222 * The alternative that must be followed is to use the 223 * <code>equals()</code> method. The <code>equals</code> method on this 224 * class overrides the default java.lang.Object one, and performs an 225 * intelligent comparison of instances of objects of this class. The 226 * result is an assessment of whether two libSBML Java objects are truly 227 * the same underlying native-code objects. 228 * <p> 229 * The use of this method in practice is the same as the use of any other 230 * Java <code>equals</code> method. For example, 231 * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns 232 * <code>true</code> if <em>a</em> and <em>b</em> are references to the 233 * same underlying object. 234 * 235 * @param sb a reference to an object to which the current object 236 * instance will be compared 237 * 238 * @return <code>true</code> if <code>sb</code> refers to the same underlying 239 * native object as this one, <code>false</code> otherwise 240 */ 241 public boolean equals(Object sb) 242 { 243 if ( this == sb ) 244 { 245 return true; 246 } 247 return swigCPtr == getCPtr((CVTerm)(sb)); 248 } 249 250 /** 251 * Returns a hashcode for this CVTerm object. 252 * 253 * @return a hash code usable by Java methods that need them. 254 */ 255 public int hashCode() 256 { 257 return (int)(swigCPtr^(swigCPtr>>>32)); 258 } 259 260 261/** 262 * Creates an empty {@link CVTerm}, optionally with the given 263 * qualifier <code>type</code>. 264 <p> 265 * <p> 266 * The SBML Level 2 and Level 3 specifications define a simple 267 * format for annotating models when (a) referring to controlled 268 * vocabulary terms and database identifiers that define and describe 269 * biological and other entities, and (b) describing the creator of a 270 * model and the model's modification history. The annotation content is 271 * stored in <code><annotation></code> elements attached to 272 * individual SBML elements. The format for storing the content inside 273 * SBML <code><annotation></code> elements is a subset of W3C RDF 274 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description 275 * Format</a>) expressed in XML. The {@link CVTerm} class provides a programming 276 * interface for working directly with controlled vocabulary term ('CV 277 * term') objects without having to deal directly with the XML form. 278 * When libSBML reads in an SBML model containing RDF annotations, it 279 * parses those annotations into a list of {@link CVTerm} objects, and when 280 * writing a model, it parses the {@link CVTerm} objects back into the 281 * appropriate SBML <code><annotation></code> structure. 282 <p> 283 * This method creates an empty {@link CVTerm} object. The possible qualifier 284 * types usable as values of <code>type</code> are {@link 285 * libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER} and {@link 286 * libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}. If 287 * an explicit value for <code>type</code> is not given, this method defaults to 288 * using {@link libsbmlConstants#UNKNOWN_QUALIFIER 289 * UNKNOWN_QUALIFIER}. The qualifier type 290 * can be set later using the 291 * {@link CVTerm#setQualifierType(int type)} method. 292 <p> 293 * Different BioModels.net qualifier elements encode different types of 294 * relationships. Please refer to the SBML specification or the <a 295 * target='_blank' href='http://biomodels.net/qualifiers/'>BioModels.net 296 * qualifiers web page</a> for an explanation of the meaning of these 297 * different qualifiers. 298 <p> 299 * @param type a qualifier type 300 <p> 301 * 302</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 303The native C++ implementation of this method defines a default argument 304value. In the documentation generated for different libSBML language 305bindings, you may or may not see corresponding arguments in the method 306declarations. For example, in Java and C#, a default argument is handled by 307declaring two separate methods, with one of them having the argument and 308the other one lacking the argument. However, the libSBML documentation will 309be <em>identical</em> for both methods. Consequently, if you are reading 310this and do not see an argument even though one is described, please look 311for descriptions of other variants of this method near where this one 312appears in the documentation. 313</dd></dl> 314 315 */ public 316 CVTerm(int type) { 317 this(libsbmlJNI.new_CVTerm__SWIG_0(type), true); 318 } 319 320 321/** 322 * Creates an empty {@link CVTerm}, optionally with the given 323 * qualifier <code>type</code>. 324 <p> 325 * <p> 326 * The SBML Level 2 and Level 3 specifications define a simple 327 * format for annotating models when (a) referring to controlled 328 * vocabulary terms and database identifiers that define and describe 329 * biological and other entities, and (b) describing the creator of a 330 * model and the model's modification history. The annotation content is 331 * stored in <code><annotation></code> elements attached to 332 * individual SBML elements. The format for storing the content inside 333 * SBML <code><annotation></code> elements is a subset of W3C RDF 334 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description 335 * Format</a>) expressed in XML. The {@link CVTerm} class provides a programming 336 * interface for working directly with controlled vocabulary term ('CV 337 * term') objects without having to deal directly with the XML form. 338 * When libSBML reads in an SBML model containing RDF annotations, it 339 * parses those annotations into a list of {@link CVTerm} objects, and when 340 * writing a model, it parses the {@link CVTerm} objects back into the 341 * appropriate SBML <code><annotation></code> structure. 342 <p> 343 * This method creates an empty {@link CVTerm} object. The possible qualifier 344 * types usable as values of <code>type</code> are {@link 345 * libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER} and {@link 346 * libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}. If 347 * an explicit value for <code>type</code> is not given, this method defaults to 348 * using {@link libsbmlConstants#UNKNOWN_QUALIFIER 349 * UNKNOWN_QUALIFIER}. The qualifier type 350 * can be set later using the 351 * {@link CVTerm#setQualifierType(int type)} method. 352 <p> 353 * Different BioModels.net qualifier elements encode different types of 354 * relationships. Please refer to the SBML specification or the <a 355 * target='_blank' href='http://biomodels.net/qualifiers/'>BioModels.net 356 * qualifiers web page</a> for an explanation of the meaning of these 357 * different qualifiers. 358 <p> 359 * @param type a qualifier type 360 <p> 361 * 362</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 363The native C++ implementation of this method defines a default argument 364value. In the documentation generated for different libSBML language 365bindings, you may or may not see corresponding arguments in the method 366declarations. For example, in Java and C#, a default argument is handled by 367declaring two separate methods, with one of them having the argument and 368the other one lacking the argument. However, the libSBML documentation will 369be <em>identical</em> for both methods. Consequently, if you are reading 370this and do not see an argument even though one is described, please look 371for descriptions of other variants of this method near where this one 372appears in the documentation. 373</dd></dl> 374 375 */ public 376 CVTerm() { 377 this(libsbmlJNI.new_CVTerm__SWIG_1(), true); 378 } 379 380 381/** 382 * Creates a new {@link CVTerm} from the given {@link XMLNode}. 383 <p> 384 * <p> 385 * The SBML Level 2 and Level 3 specifications define a simple 386 * format for annotating models when (a) referring to controlled 387 * vocabulary terms and database identifiers that define and describe 388 * biological and other entities, and (b) describing the creator of a 389 * model and the model's modification history. The annotation content is 390 * stored in <code><annotation></code> elements attached to 391 * individual SBML elements. The format for storing the content inside 392 * SBML <code><annotation></code> elements is a subset of W3C RDF 393 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description 394 * Format</a>) expressed in XML. The {@link CVTerm} class provides a programming 395 * interface for working directly with controlled vocabulary term ('CV 396 * term') objects without having to deal directly with the XML form. 397 * When libSBML reads in an SBML model containing RDF annotations, it 398 * parses those annotations into a list of {@link CVTerm} objects, and when 399 * writing a model, it parses the {@link CVTerm} objects back into the 400 * appropriate SBML <code><annotation></code> structure. 401 <p> 402 * This method creates a {@link CVTerm} object from the given {@link XMLNode} object 403 * <code>node</code>. {@link XMLNode} is libSBML's representation of a node in an XML tree of 404 * elements, and each such element can be placed in a namespace. This 405 * constructor looks for the element to be in the XML namespaces 406 * <code>'http://biomodels.net/model-qualifiers'</code> (for 407 * model qualifiers) and 408 * <code>'http://biomodels.net/biology-qualifiers'</code> (for 409 * biological qualifier), and if they are, creates {@link CVTerm} objects for 410 * the result. 411 <p> 412 * @param node an XMLNode representing a {@link CVTerm}. 413 <p> 414 * @note This method assumes that the given {@link XMLNode} object <code>node</code> is of 415 * the correct structural form. 416 */ public 417 CVTerm(XMLNode node) { 418 this(libsbmlJNI.new_CVTerm__SWIG_2(XMLNode.getCPtr(node), node), true); 419 } 420 421 422/** 423 * Copy constructor; creates a copy of a {@link CVTerm} object. 424 <p> 425 * @param orig the {@link CVTerm} instance to copy. 426 <p> 427 * @throws SBMLConstructorException 428 * Thrown if the argument <code>orig</code> is <code>null.</code> 429 */ public 430 CVTerm(CVTerm orig) { 431 this(libsbmlJNI.new_CVTerm__SWIG_3(CVTerm.getCPtr(orig), orig), true); 432 } 433 434 435/** 436 * Creates and returns a deep copy of this {@link CVTerm} object. 437 <p> 438 * @return a (deep) copy of this {@link CVTerm}. 439 */ public 440 CVTerm cloneObject() { 441 long cPtr = libsbmlJNI.CVTerm_cloneObject(swigCPtr, this); 442 return (cPtr == 0) ? null : new CVTerm(cPtr, true); 443 } 444 445 446/** 447 * Returns the qualifier type of this {@link CVTerm} object. 448 <p> 449 * <p> 450 * The RDF element used in the SBML format for referring to external entities 451 * is <code><rdf:Description></code>, with a 452 * <code><rdf:Bag></code> element inside of it containing one or more 453 * <code><rdf:li></code> elements. The following template illustrates 454 * the structure: 455 * <pre class='fragment'> 456 * <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 457 * <span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span> 458 * <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 459 * <rdf:Bag> 460 * <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 461 * <span style='background-color: #edd'>...</span> 462 * </rdf:Bag> 463 * </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 464 * <span style='background-color: #edd'>...</span> 465 * </rdf:Description> 466 * </pre> 467 * In the template above, the placeholder <span class='code' 468 * style='border-bottom: 1px solid black'>meta id</span> stands for the 469 * element's meta identifier, which is a field available on all SBML 470 * components derived from the {@link SBase} base object class. The <span 471 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 472 * optional, and the ellipses <span class='code' style='background-color: 473 * #edd'>...</span> are placeholders for zero or more elements of the same 474 * form as the immediately preceding element. 475 <p> 476 * The placeholder <span class='code' style='background-color: #bbb'> 477 * RELATION_ELEMENT</span> refers to a BioModels.net qualifier 478 * element name. This is an element in either the XML namespace 479 * <code>'http://biomodels.net/model-qualifiers'</code> (for model 480 * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> 481 * (for biological qualifier). The present method returns a code 482 * identifying which one of these two relationship namespaces is being 483 * used; any other qualifier in libSBML is considered unknown (as far as 484 * the {@link CVTerm} class is concerned). Consequently, this method will return 485 * one of the following values: 486 <p> 487 * <ul> 488 * <li> {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER} 489 * <li> {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER} 490 * <li> {@link libsbmlConstants#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER} 491 * 492 * </ul> <p> 493 * The specific relationship of this {@link CVTerm} to the enclosing SBML object 494 * can be determined using the {@link CVTerm} methods such as 495 * getModelQualifierType() and getBiologicalQualifierType(). Callers 496 * will typically want to use the present method to find out which one of 497 * the <em>other</em> two methods to call to find out the specific 498 * relationship. 499 <p> 500 * @return the qualifier type 501 * of this object or {@link libsbmlConstants#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER} 502 * (the default). 503 <p> 504 * @see #getResources() 505 * @see #getModelQualifierType() 506 * @see #getBiologicalQualifierType() 507 */ public 508 int getQualifierType() { 509 return libsbmlJNI.CVTerm_getQualifierType(swigCPtr, this); 510 } 511 512 513/** 514 * Returns the model qualifier type of this {@link CVTerm} object. 515 <p> 516 * <p> 517 * The RDF element used in the SBML format for referring to external entities 518 * is <code><rdf:Description></code>, with a 519 * <code><rdf:Bag></code> element inside of it containing one or more 520 * <code><rdf:li></code> elements. The following template illustrates 521 * the structure: 522 * <pre class='fragment'> 523 * <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 524 * <span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span> 525 * <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 526 * <rdf:Bag> 527 * <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 528 * <span style='background-color: #edd'>...</span> 529 * </rdf:Bag> 530 * </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 531 * <span style='background-color: #edd'>...</span> 532 * </rdf:Description> 533 * </pre> 534 * In the template above, the placeholder <span class='code' 535 * style='border-bottom: 1px solid black'>meta id</span> stands for the 536 * element's meta identifier, which is a field available on all SBML 537 * components derived from the {@link SBase} base object class. The <span 538 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 539 * optional, and the ellipses <span class='code' style='background-color: 540 * #edd'>...</span> are placeholders for zero or more elements of the same 541 * form as the immediately preceding element. 542 <p> 543 * The placeholder <span class='code' style='background-color: #bbb'> 544 * RELATION_ELEMENT</span> refers to a BioModels.net qualifier 545 * element name. This is an element in either the XML namespace 546 * <code>'http://biomodels.net/model-qualifiers'</code> (for model 547 * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> 548 * (for biological qualifier). Callers will typically use 549 * getQualifierType() to find out the type of qualifier relevant to this 550 * particular {@link CVTerm} object, then if it is a <em>model</em> qualifier, use the 551 * present method to determine the specific qualifier. 552 <p> 553 * Annotations with model qualifiers express a relationship between an 554 * annotation resource and the <em>modeling concept</em> represented by a 555 * given object in the model. The diagram below illustrates the 556 * relationship in this case: 557 <p> 558 * <center class='image'><img src='model-qualifiers.png'></center> 559 * 560 <p> 561 * <br> The set of known model qualifiers is, at the time of this libSBML 562 * release, the following: 563 <p> 564 * <ul> 565 * <li> {@link libsbmlConstants#BQM_IS BQM_IS} 566 * <li> {@link libsbmlConstants#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY} 567 * <li> {@link libsbmlConstants#BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM} 568 * 569 * </ul> <p> 570 * Any other BioModels.net qualifier found in the model is considered 571 * unknown by libSBML and reported as 572 * {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}. 573 <p> 574 * @return the model qualifier type 575 * of this object or {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN} 576 * (the default). 577 */ public 578 int getModelQualifierType() { 579 return libsbmlJNI.CVTerm_getModelQualifierType(swigCPtr, this); 580 } 581 582 583/** 584 * Returns the biological qualifier type of this {@link CVTerm} object. 585 <p> 586 * <p> 587 * The RDF element used in the SBML format for referring to external entities 588 * is <code><rdf:Description></code>, with a 589 * <code><rdf:Bag></code> element inside of it containing one or more 590 * <code><rdf:li></code> elements. The following template illustrates 591 * the structure: 592 * <pre class='fragment'> 593 * <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 594 * <span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span> 595 * <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 596 * <rdf:Bag> 597 * <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 598 * <span style='background-color: #edd'>...</span> 599 * </rdf:Bag> 600 * </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 601 * <span style='background-color: #edd'>...</span> 602 * </rdf:Description> 603 * </pre> 604 * In the template above, the placeholder <span class='code' 605 * style='border-bottom: 1px solid black'>meta id</span> stands for the 606 * element's meta identifier, which is a field available on all SBML 607 * components derived from the {@link SBase} base object class. The <span 608 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 609 * optional, and the ellipses <span class='code' style='background-color: 610 * #edd'>...</span> are placeholders for zero or more elements of the same 611 * form as the immediately preceding element. 612 <p> 613 * The placeholder <span class='code' style='background-color: #bbb'> 614 * RELATION_ELEMENT</span> refers to a BioModels.net qualifier 615 * element name. This is an element in either the XML namespace 616 * <code>'http://biomodels.net/model-qualifiers'</code> (for model 617 * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> 618 * (for biological qualifier). Callers will typically use 619 * getQualifierType() to find out the type of qualifier relevant to this 620 * particular {@link CVTerm} object, then if it is a <em>biological</em> qualifier, 621 * use the present method to determine the specific qualifier. 622 <p> 623 * Annotations with biological qualifiers express a relationship between an 624 * annotation resource and the <em>biological concept</em> represented by a 625 * given object in the model. The diagram 626 * below illustrates the relationship in this case: 627 <p> 628 * <center class='image'><img src='biology-qualifiers.png'></center> 629 * 630 <p> 631 * <br> The set of known biological qualifiers is, at the time of this 632 * libSBML release, the following: 633 <p> 634 * <ul> 635 * <li> {@link libsbmlConstants#BQB_IS BQB_IS} 636 * <li> {@link libsbmlConstants#BQB_HAS_PART BQB_HAS_PART} 637 * <li> {@link libsbmlConstants#BQB_IS_PART_OF BQB_IS_PART_OF} 638 * <li> {@link libsbmlConstants#BQB_IS_VERSION_OF BQB_IS_VERSION_OF} 639 * <li> {@link libsbmlConstants#BQB_HAS_VERSION BQB_HAS_VERSION} 640 * <li> {@link libsbmlConstants#BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO} 641 * <li> {@link libsbmlConstants#BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY} 642 * <li> {@link libsbmlConstants#BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY} 643 * <li> {@link libsbmlConstants#BQB_ENCODES BQB_ENCODES} 644 * <li> {@link libsbmlConstants#BQB_OCCURS_IN BQB_OCCURS_IN} 645 * <li> {@link libsbmlConstants#BQB_HAS_PROPERTY BQB_HAS_PROPERTY} 646 * <li> {@link libsbmlConstants#BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF} 647 * 648 * </ul> <p> 649 * Any other BioModels.net qualifier found in the model is considered 650 * unknown by libSBML and reported as 651 * {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}. 652 <p> 653 * @return the biology qualifier type 654 * of this object or {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN} 655 * (the default). 656 */ public 657 int getBiologicalQualifierType() { 658 return libsbmlJNI.CVTerm_getBiologicalQualifierType(swigCPtr, this); 659 } 660 661 662/** 663 * Returns the resource references for this {@link CVTerm} object. 664 <p> 665 * <p> 666 * The RDF element used in the SBML format for referring to external entities 667 * is <code><rdf:Description></code>, with a 668 * <code><rdf:Bag></code> element inside of it containing one or more 669 * <code><rdf:li></code> elements. The following template illustrates 670 * the structure: 671 * <pre class='fragment'> 672 * <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 673 * <span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span> 674 * <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 675 * <rdf:Bag> 676 * <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 677 * <span style='background-color: #edd'>...</span> 678 * </rdf:Bag> 679 * </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 680 * <span style='background-color: #edd'>...</span> 681 * </rdf:Description> 682 * </pre> 683 * In the template above, the placeholder <span class='code' 684 * style='border-bottom: 1px solid black'>meta id</span> stands for the 685 * element's meta identifier, which is a field available on all SBML 686 * components derived from the {@link SBase} base object class. The <span 687 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 688 * optional, and the ellipses <span class='code' style='background-color: 689 * #edd'>...</span> are placeholders for zero or more elements of the same 690 * form as the immediately preceding element. 691 <p> 692 * The <span class='code' style='background-color: #d0d0ee'>resource 693 * URI</span> values shown in the template above are stored internally in 694 * {@link CVTerm} objects using an {@link XMLAttributes} object. Each attribute stored 695 * inside the {@link XMLAttributes} will have the same name (specifically, 696 * "<code>rdf:resource</code>") but a different value, and the 697 * value will be a <span class='code' style='background-color: #d0d0ee'> 698 * resource URI</span> shown in the XML template above. 699 <p> 700 * A valid {@link CVTerm} entity must always have at least one resource and 701 * a value for the relationship qualifier. 702 <p> 703 * @return the {@link XMLAttributes} that store the resources of this {@link CVTerm}. 704 <p> 705 * @see #getQualifierType() 706 * @see #addResource(String resource) 707 * @see #getResourceURI(long n) 708 */ public 709 XMLAttributes getResources() { 710 long cPtr = libsbmlJNI.CVTerm_getResources__SWIG_0(swigCPtr, this); 711 return (cPtr == 0) ? null : new XMLAttributes(cPtr, false); 712 } 713 714 715/** 716 * Returns the number of resources for this {@link CVTerm} object. 717 <p> 718 * <p> 719 * The RDF element used in the SBML format for referring to external entities 720 * is <code><rdf:Description></code>, with a 721 * <code><rdf:Bag></code> element inside of it containing one or more 722 * <code><rdf:li></code> elements. The following template illustrates 723 * the structure: 724 * <pre class='fragment'> 725 * <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 726 * <span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span> 727 * <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 728 * <rdf:Bag> 729 * <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 730 * <span style='background-color: #edd'>...</span> 731 * </rdf:Bag> 732 * </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 733 * <span style='background-color: #edd'>...</span> 734 * </rdf:Description> 735 * </pre> 736 * In the template above, the placeholder <span class='code' 737 * style='border-bottom: 1px solid black'>meta id</span> stands for the 738 * element's meta identifier, which is a field available on all SBML 739 * components derived from the {@link SBase} base object class. The <span 740 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 741 * optional, and the ellipses <span class='code' style='background-color: 742 * #edd'>...</span> are placeholders for zero or more elements of the same 743 * form as the immediately preceding element. 744 <p> 745 * The fragment above illustrates that there can be more than one 746 * resource referenced by a given relationship annotation (i.e., the 747 * <span class='code' style='background-color: #d0d0ee'>resource 748 * URI</span> values associated with a particular <span class='code' 749 * style='background-color: #bbb'>RELATION_ELEMENT</span>). The present 750 * method returns a count of the resources stored in this {@link CVTerm} object. 751 <p> 752 * @return the number of resources in the set of {@link XMLAttributes} 753 * of this {@link CVTerm}. 754 <p> 755 * @see #getResources() 756 * @see #getResourceURI(long n) 757 */ public 758 long getNumResources() { 759 return libsbmlJNI.CVTerm_getNumResources(swigCPtr, this); 760 } 761 762 763/** 764 * Returns the value of the <em>n</em>th resource for this {@link CVTerm} object. 765 <p> 766 * <p> 767 * The RDF element used in the SBML format for referring to external entities 768 * is <code><rdf:Description></code>, with a 769 * <code><rdf:Bag></code> element inside of it containing one or more 770 * <code><rdf:li></code> elements. The following template illustrates 771 * the structure: 772 * <pre class='fragment'> 773 * <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 774 * <span style='background-color: #ddd; border-bottom: 2px dotted #888'>HISTORY</span> 775 * <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 776 * <rdf:Bag> 777 * <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 778 * <span style='background-color: #edd'>...</span> 779 * </rdf:Bag> 780 * </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 781 * <span style='background-color: #edd'>...</span> 782 * </rdf:Description> 783 * </pre> 784 * In the template above, the placeholder <span class='code' 785 * style='border-bottom: 1px solid black'>meta id</span> stands for the 786 * element's meta identifier, which is a field available on all SBML 787 * components derived from the {@link SBase} base object class. The <span 788 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 789 * optional, and the ellipses <span class='code' style='background-color: 790 * #edd'>...</span> are placeholders for zero or more elements of the same 791 * form as the immediately preceding element. 792 <p> 793 * The fragment above illustrates that there can be more than one 794 * resource referenced by a given relationship annotation (i.e., the 795 * <span class='code' style='background-color: #d0d0ee'>resource 796 * URI</span> values associated with a particular <span class='code' 797 * style='background-color: #bbb'>RELATION_ELEMENT</span>). LibSBML 798 * stores all resource URIs in a single {@link CVTerm} object for a given 799 * relationship. Callers can use getNumResources() to find out how many 800 * resources are stored in this {@link CVTerm} object, then call this method to 801 * retrieve the <em>n</em>th resource URI. 802 <p> 803 * @param n the index of the resource to query 804 <p> 805 * @return string representing the value of the nth resource 806 * in the set of {@link XMLAttributes} of this {@link CVTerm}. 807 <p> 808 * @see #getNumResources() 809 * @see #getQualifierType() 810 */ public 811 String getResourceURI(long n) { 812 return libsbmlJNI.CVTerm_getResourceURI(swigCPtr, this, n); 813 } 814 815 816/** 817 * Sets the qualifier code of this 818 * {@link CVTerm} object. 819 <p> 820 * @param type the qualifier type. 821 * The possible values returned by this function are: 822 * <ul> 823 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 824 * 825 * </ul> <p> 826 * @see #getQualifierType() 827 */ public 828 int setQualifierType(int type) { 829 return libsbmlJNI.CVTerm_setQualifierType(swigCPtr, this, type); 830 } 831 832 833/** 834 * Sets the model qualifier type 835 * of this {@link CVTerm} object. 836 <p> 837 * @param type the model qualifier type 838 <p> 839 * @return integer value indicating success/failure of the 840 * function. The possible values returned by this function are: 841 * <ul> 842 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 843 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 844 * 845 * </ul> <p> 846 * @note If the Qualifier Type of this object is not 847 * {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER}, 848 * then the ModelQualifierType_t value will default to 849 * {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}. 850 <p> 851 * @see #getQualifierType() 852 * @see #setQualifierType(int type) 853 */ public 854 int setModelQualifierType(int type) { 855 return libsbmlJNI.CVTerm_setModelQualifierType__SWIG_0(swigCPtr, this, type); 856 } 857 858 859/** 860 * Sets the biology qualifier type 861 * of this {@link CVTerm} object. 862 <p> 863 * @param type the biology qualifier type. 864 <p> 865 * @return integer value indicating success/failure of the 866 * function. The possible values returned by this function are: 867 * <ul> 868 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 869 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 870 * 871 * </ul> <p> 872 * @note If the Qualifier Type of this object is not 873 * {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}, 874 * then the biology qualifier type will default 875 * to {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}. 876 <p> 877 * @see #getQualifierType() 878 * @see #setQualifierType(int type) 879 */ public 880 int setBiologicalQualifierType(int type) { 881 return libsbmlJNI.CVTerm_setBiologicalQualifierType__SWIG_0(swigCPtr, this, type); 882 } 883 884 885/** 886 * Sets the model qualifier type code value of this {@link CVTerm} object. 887 <p> 888 * @param qualifier the string representing a model qualifier 889 <p> 890 * @return integer value indicating success/failure of the 891 * function. The possible values 892 * returned by this function are: 893 * <ul> 894 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 895 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 896 * 897 * </ul> <p> 898 * @note If the Qualifier Type of this object is not 899 * {@link libsbmlConstants#MODEL_QUALIFIER MODEL_QUALIFIER}, 900 * then the ModelQualifierType_t value will default to 901 * {@link libsbmlConstants#BQM_UNKNOWN BQM_UNKNOWN}. 902 <p> 903 * @see #getQualifierType() 904 * @see #setQualifierType(int type) 905 */ public 906 int setModelQualifierType(String qualifier) { 907 return libsbmlJNI.CVTerm_setModelQualifierType__SWIG_1(swigCPtr, this, qualifier); 908 } 909 910 911/** 912 * Sets the biology qualifier 913 * type code of this {@link CVTerm} object. 914 <p> 915 * @param qualifier the string representing a biology qualifier 916 <p> 917 * @return integer value indicating success/failure of the 918 * function. The possible values 919 * returned by this function are: 920 * <ul> 921 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 922 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 923 * 924 * </ul> <p> 925 * @note If the Qualifier Type of this object is not 926 * {@link libsbmlConstants#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER}, 927 * then the biology qualifier type code value will default 928 * to {@link libsbmlConstants#BQB_UNKNOWN BQB_UNKNOWN}. 929 <p> 930 * @see #getQualifierType() 931 * @see #setQualifierType(int type) 932 */ public 933 int setBiologicalQualifierType(String qualifier) { 934 return libsbmlJNI.CVTerm_setBiologicalQualifierType__SWIG_1(swigCPtr, this, qualifier); 935 } 936 937 938/** 939 * Adds a resource reference to this {@link CVTerm} object. 940 <p> 941 * <p> 942 * The SBML Level 2 and Level 3 specifications define a simple 943 * format for annotating models when (a) referring to controlled 944 * vocabulary terms and database identifiers that define and describe 945 * biological and other entities, and (b) describing the creator of a 946 * model and the model's modification history. The annotation content is 947 * stored in <code><annotation></code> elements attached to 948 * individual SBML elements. The format for storing the content inside 949 * SBML <code><annotation></code> elements is a subset of W3C RDF 950 * (<a target='_blank' href='http://www.w3.org/RDF/'>Resource Description 951 * Format</a>) expressed in XML. The {@link CVTerm} class provides a programming 952 * interface for working directly with controlled vocabulary term ('CV 953 * term') objects without having to deal directly with the XML form. 954 * When libSBML reads in an SBML model containing RDF annotations, it 955 * parses those annotations into a list of {@link CVTerm} objects, and when 956 * writing a model, it parses the {@link CVTerm} objects back into the 957 * appropriate SBML <code><annotation></code> structure. 958 <p> 959 * The specific RDF element used in this SBML format for referring to 960 * external entities is <code><rdf:Description></code>, with a 961 * <code><rdf:Bag></code> element containing one or more 962 * <code><rdf:li></code> elements. Each such element refers to a 963 * data item in an external resource; the resource and data item are 964 * together identified uniquely using a URI. The following template 965 * illustrates the structure: 966 <p> 967 <pre class='fragment'> 968 <rdf:Description rdf:about="#<span style='border-bottom: 1px solid black'>meta id</span>"> 969 <span style='background-color: #e0e0e0; border-bottom: 2px dotted #888'>HISTORY</span> 970 <<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 971 <rdf:Bag> 972 <rdf:li rdf:resource="<span style='background-color: #d0d0ee'>resource URI</span>" /> 973 <span style='background-color: #edd'>...</span> 974 </rdf:Bag> 975 </<span style='background-color: #bbb'>RELATION_ELEMENT</span>> 976 <span style='background-color: #edd'>...</span> 977 </rdf:Description> 978 </pre> 979 <p> 980 * In the template above, the placeholder <span class='code' 981 * style='border-bottom: 1px solid black'>meta id</span> stands for the 982 * element's meta identifier, which is a field available on all SBML 983 * components derived from the {@link SBase} base object class. The <span 984 * style='border-bottom: 2px dotted #888'>dotted</span> portions are 985 * optional, and the ellipses <span class='code' 986 * style='background-color: #edd'>...</span> are placeholders for zero or 987 * more elements of the same form as the immediately preceding element. 988 * The placeholder <span class='code' style='background-color: #bbb'> 989 * RELATION_ELEMENT</span> refers to a BioModels.net qualifier element 990 * name. This is an element in either the XML namespace 991 * <code>'http://biomodels.net/model-qualifiers'</code> (for model 992 * qualifiers) or <code>'http://biomodels.net/biology-qualifiers'</code> 993 * (for biological qualifier). 994 <p> 995 * The <span class='code' style='background-color: #d0d0ee'>resource 996 * URI</span> is a required data value that uniquely identifies a 997 * resource and data within that resource to which the annotation refers. 998 * The present method allows callers to add a reference to a resource URI 999 * with the same relationship to the enclosing SBML object. (In other 1000 * words, the argument to this method is a <span class='code' 1001 * style='background-color: #d0d0ee'>resource URI</span> as shown in the 1002 * XML fragment above.) Resources are stored in this {@link CVTerm} object 1003 * within an {@link XMLAttributes} object. 1004 <p> 1005 * The relationship of this {@link CVTerm} to the enclosing SBML object can be 1006 * determined using the {@link CVTerm} methods such as getModelQualifierType() 1007 * and getBiologicalQualifierType(). 1008 <p> 1009 * @param resource a string representing the URI of the resource and data 1010 * item being referenced; e.g., 1011 * <code>'http://www.geneontology.org/#GO:0005892'</code>. 1012 <p> 1013 * @return integer value indicating success/failure of the call. The 1014 * possible values returned by this function are: 1015 * <ul> 1016 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1017 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED} 1018 * 1019 * </ul> <p> 1020 * @see #getResources() 1021 * @see #removeResource(String resource) 1022 * @see #getQualifierType() 1023 * @see #getModelQualifierType() 1024 * @see #getBiologicalQualifierType() 1025 */ public 1026 int addResource(String resource) { 1027 return libsbmlJNI.CVTerm_addResource(swigCPtr, this, resource); 1028 } 1029 1030 1031/** 1032 * Removes a resource URI from the set of resources stored in this {@link CVTerm} 1033 * object. 1034 <p> 1035 * @param resource a string representing the resource URI to remove; 1036 * e.g., <code>'http://www.geneontology.org/#GO:0005892'</code>. 1037 <p> 1038 * @return integer value indicating success/failure of the 1039 * function. The possible values 1040 * returned by this function are: 1041 * <ul> 1042 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS} 1043 * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE} 1044 * 1045 * </ul> <p> 1046 * @see #addResource(String resource) 1047 */ public 1048 int removeResource(String resource) { 1049 return libsbmlJNI.CVTerm_removeResource(swigCPtr, this, resource); 1050 } 1051 1052 1053/** 1054 * Predicate returning <code>true</code> if all the required elements for this 1055 * {@link CVTerm} object have been set. 1056 <p> 1057 * @note The required attributes for a {@link CVTerm} are: 1058 * <ul> 1059 * <li> a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier 1060 * <li> at least one resource 1061 * </ul> 1062 */ public 1063 boolean hasRequiredAttributes() { 1064 return libsbmlJNI.CVTerm_hasRequiredAttributes(swigCPtr, this); 1065 } 1066 1067 1068/** * @internal */ public 1069 boolean hasBeenModified() { 1070 return libsbmlJNI.CVTerm_hasBeenModified(swigCPtr, this); 1071 } 1072 1073 1074/** * @internal */ public 1075 void resetModifiedFlags() { 1076 libsbmlJNI.CVTerm_resetModifiedFlags(swigCPtr, this); 1077 } 1078 1079}