/usr/include/sbml/annotation/CVTerm.h is in libsbml5-dev 5.10.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 | /**
* @file CVTerm.h
* @brief Definition of a CVTerm class for adding annotations to a Model.
* @author Sarah Keating
*
* <!--------------------------------------------------------------------------
* This file is part of libSBML. Please visit http://sbml.org for more
* information about SBML, and the latest version of libSBML.
*
* Copyright (C) 2013-2014 jointly by the following organizations:
* 1. California Institute of Technology, Pasadena, CA, USA
* 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
* 3. University of Heidelberg, Heidelberg, Germany
*
* Copyright (C) 2009-2013 jointly by the following organizations:
* 1. California Institute of Technology, Pasadena, CA, USA
* 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
*
* Copyright (C) 2006-2008 by the California Institute of Technology,
* Pasadena, CA, USA
*
* Copyright (C) 2002-2005 jointly by the following organizations:
* 1. California Institute of Technology, Pasadena, CA, USA
* 2. Japan Science and Technology Agency, Japan
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation. A copy of the license agreement is provided
* in the file named "LICENSE.txt" included with this software distribution
* and also available online as http://sbml.org/software/libsbml/license.html
* ------------------------------------------------------------------------ -->
*
* @class CVTerm
* @sbmlbrief{core} Representation of MIRIAM-compliant controlled vocabulary
* annotation.
*
* @htmlinclude not-sbml-warning.html
*
* The SBML Level 2 and Level 3 specifications define a simple
* format for annotating models when (a) referring to controlled vocabulary
* terms and database identifiers that define and describe biological and
* biochemical entities, and (b) describing the creator of a model and the
* model's modification history. This SBML format is a concrete syntax that
* conforms to the guidelines of MIRIAM (<a target="_blank"
* href="http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html">"Minimum
* Information Requested in the Annotation of biochemical Models"</a>,
* <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005). The format uses
* a subset of W3C RDF (<a target="_blank"
* href="http://www.w3.org/RDF/">Resource Description Format</a>). In order
* to help application developers work with annotations in this format,
* libSBML provides several helper classes that provide higher-level
* interfaces to the data elements; these classes include CVTerm,
* ModelCreator, ModelHistory, RDFAnnotationParser, and Date.
*
* @section annotation-parts Components of an SBML annotation
*
* The SBML annotation format consists of RDF-based content placed inside
* an <code><annotation></code> element attached to an SBML component
* such as Species, Compartment, etc. The following template illustrates
* the different parts of SBML annotations in XML form:
*
<pre class="fragment">
<<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>>
<span style="background-color: #d0eed0">+++</span>
<annotation>
<span style="background-color: #d0eed0">+++</span>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterm="http://purl.org/dc/terms/"
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"
xmlns:bqmodel="http://biomodels.net/model-qualifiers/" >
<rdf:Description rdf:about="#<span style="border-bottom: 1px solid black">meta id</span>">
<span style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span>
<<span style="background-color: #bbb">RELATION_ELEMENT</span>>
<rdf:Bag>
<rdf:li rdf:resource="<span style="background-color: #d0d0ee">URI</span>" />
<span style="background-color: #edd">...</span>
</rdf:Bag>
</<span style="background-color: #bbb">RELATION_ELEMENT</span>>
<span style="background-color: #edd">...</span>
</rdf:Description>
<span style="background-color: #d0eed0">+++</span>
</rdf:RDF>
<span style="background-color: #d0eed0">+++</span>
</annotation>
<span style="background-color: #d0eed0">+++</span>
</<span style="background-color: #bbb">SBML_ELEMENT</span>>
</pre>
*
* In the template above, the placeholder
* <span class="code" style="background-color: #bbb">SBML_ELEMENT</span> stands for
* the XML tag name of an SBML model component (e.g., <code>model</code>,
* <code>reaction</code>, etc.) and the placeholder
* <span class="code" style="border-bottom: 1px solid black">meta id</span>
* stands for the element's meta identifier, which is a field available
* on all SBML components derived from the SBase base object class.
* The <span style="border-bottom: 2px dotted #888">dotted</span>
* portions are optional, the symbol
* <span class="code" style="background-color: #d0eed0">+++</span> is a placeholder
* for either no content or valid XML content that is not defined by
* this annotation scheme, and the ellipses
* <span class="code" style="background-color: #edd">...</span>
* are placeholders for zero or more elements of the same form as the
* immediately preceding element. The optional content
* <span class="code" style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span>
* is a creation and modification history; in libSBML, this is stored
* using ModelHistory objects.
*
* The placeholder <span class="code" style="background-color:
* #bbb">RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
* name. This is an element in either the XML namespace
* <code>"http://biomodels.net/model-qualifiers"</code> (for model
* qualifiers) or <code>"http://biomodels.net/biology-qualifiers"</code> (for
* biological qualifier). Note that these namespace URIs are only labels,
* and not actual Web locations, which means you cannot visit an address such
* as <code>"http://biomodels.net/model-qualifiers"</code> in your browser or
* try to have your application access it. @if Refer instead to the enumerations
* #ModelQualifierType_t and #BiolQualifierType_t for a list of the available
* relationship elements that can be used for <span class="code"
* style="background-color: #bbb">RELATION_ELEMENT</span>.@endif@~
*
* The <span class="code" style="background-color: #d0d0ee">URI</span> is a
* required data value that uniquely identifies a resource and data within
* that resource to which the annotation refers. Again, being URIs, these do
* not refer to physical Web locations; nevertheless, applications will often
* want a means of finding the resource to which a given <span class="code"
* style="background-color: #d0d0ee">URI</span> refers. Providing the
* facilities for this task is the purpose of MIRIAM Resources, described in
* detail online at <a target="_blank"
* href="http://biomodels.net/miriam">http://biomodels.net/miriam</a>) and
* also in the paper <a target="_blank"
* href="http://www.biomedcentral.com/1752-0509/1/58">"MIRIAM Resources: tools to generate and
* resolve robust cross-references in Systems Biology"</a>, <i>BMC Systems
* Biology</i>, 58(1), 2007.
*
* The relation-resource pairs above are the "controlled vocabulary" terms
* that which CVTerm is designed to store and manipulate. The next section
* describes these parts in more detail. For more information about
* SBML annotations in general, please refer to Section 6 in the
* SBML Level 2 (Versions 2–4) or Level 3 specification
* documents.
*
*
* @section cvterm-parts The parts of a CVTerm
*
* Annotations that refer to controlled vocabularies are managed in libSBML
* using CVTerm objects. A set of RDF-based annotations attached to a
* given SBML <code><annotation></code> element are read by
* RDFAnnotationParser and converted into a list of these CVTerm objects.
* Each CVTerm object instance stores the following components of an
* annotation:
*
* <ul>
*
* <li>The @em qualifier, which can be a BioModels.net "biological
* qualifier", a BioModels.net "model qualifier", or an unknown qualifier
* (as far as the CVTerm class is concerned). Qualifiers are used in
* MIRIAM to indicate the nature of the relationship between the object
* being annotated and the resource. In CVTerm, the qualifiers can be
* manipulated using the methods CVTerm::getQualifierType(),
* CVTerm::setQualifierType(@if java int type@endif), and related methods.
*
* <li>The @em resource, represented by a URI (which, we must remind
* developers, is not the same as a URL). In the CVTerm class, the
* resource component can be manipulated using the methods
* CVTerm::addResource(@if java String resource@endif) and
* CVTerm::removeResource(@if java String resource@endif).
*
* </ul>
*
* Note that a CVTerm contains a single qualifier, but possibly more than
* one resource. This corresponds to the possibility of an annotation that
* points to multiple resources, all of which are qualified by the same
* BioModels.net qualifier. The CVTerm object class supports this by
* supporting a list of resources.
*
* Detailed explanations of the qualifiers defined by BioModels.net can be
* found at <a target="_blank"
* href="http://biomodels.net/qualifiers">http://biomodels.net/qualifiers</a>.
*/
/**
* <!-- ~ ~ ~ ~ ~ Start of common documentation strings ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
* The following text is used as common documentation blocks copied multiple
* times elsewhere in this file. The use of @class is a hack needed because
* Doxygen's @copydetails command has limited functionality. Symbols
* beginning with "doc_" are marked as ignored in our Doxygen configuration.
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -->
*
* @class doc_cvterm_common_description
*
* @par
* The RDF element used in the SBML format for referring to external entities
* is <code><rdf:Description></code>, with a
* <code><rdf:Bag></code> element inside of it containing one or more
* <code><rdf:li></code> elements. The following template illustrates
* the structure:
* <pre class="fragment">
* <rdf:Description rdf:about="#<span style="border-bottom: 1px solid black">meta id</span>">
* <span style="background-color: #ddd; border-bottom: 2px dotted #888">HISTORY</span>
* <<span style="background-color: #bbb">RELATION_ELEMENT</span>>
* <rdf:Bag>
* <rdf:li rdf:resource="<span style="background-color: #d0d0ee">resource URI</span>" />
* <span style="background-color: #edd">...</span>
* </rdf:Bag>
* </<span style="background-color: #bbb">RELATION_ELEMENT</span>>
* <span style="background-color: #edd">...</span>
* </rdf:Description>
* </pre>
* In the template above, the placeholder <span class="code"
* style="border-bottom: 1px solid black">meta id</span> stands for the
* element's meta identifier, which is a field available on all SBML
* components derived from the SBase base object class. The <span
* style="border-bottom: 2px dotted #888">dotted</span> portions are
* optional, and the ellipses <span class="code" style="background-color:
* #edd">...</span> are placeholders for zero or more elements of the same
* form as the immediately preceding element.
*
*/
#ifndef CVTerm_h
#define CVTerm_h
#include <sbml/common/extern.h>
#include <sbml/common/sbmlfwd.h>
#include <sbml/common/operationReturnValues.h>
#include <sbml/xml/XMLAttributes.h>
LIBSBML_CPP_NAMESPACE_BEGIN
/**
* @enum QualifierType_t
*
* Enumeration used to indicate the type of <a target="_blank"
* href="http://biomodels.net/qualifiers/">BioModels.net</a> in a given
* CVTerm object. The qualification of an annotation is important to convey
* the relationship between a given model component and the resource used to
* annotate it. This relationship is rarely one-to-one, and the information
* content of an annotation is greatly increased if one knows what it
* represents (as opposed to knowing only that the two "are related").
*
* In the SBML/MIRIAM/BioModels.net scheme of things, there are currently two
* kinds of qualifiers. They are used for different purposes. One purpose
* is in the refinement of the relationship between an annotation resource
* and the <em>modeling concept</em> represented by a model element. The
* second purpose is in the refinement of the relationship between an
* annotation resource and the <em>biological object</em> represented by a
* model element. In libSBML, each of these two categories of qualifiers
* have their own enumerations: #ModelQualifierType_t for the former type, and
* #BiolQualifierType_t for the latter.
*
* One can view the annotation of a model component as a statement in the
* form of a @em triple. The resource used in the annotation is the @em
* object, while the qualifier is the @em predicate. In situations where a
* model qualifier is used, the @em subject of the relation is the modeling
* concept represented by the model component referenced by the annotation.
* The modeling concept may be the model itself, a mathematical construct,
* or a hypothesis that is proposed, changing the way we previously
* understood the model, etc. Conversely, in situations where a biology
* qualifier is used, the @em subject of the relation is the biological or
* biochemical object represented by the enclosing model element.
*/
typedef enum
{
MODEL_QUALIFIER /*!< The qualifier is a model qualifier. */
, BIOLOGICAL_QUALIFIER /*!< The qualifier is a biological qualifier. */
, UNKNOWN_QUALIFIER /*!< The qualifier has not been set or is unknown. */
} QualifierType_t;
/**
* @enum ModelQualifierType_t
*
* Enumeration of possible <em>model qualifiers</em> used for annotations.
* Annotations with this type of qualifier express a relationship between an
* annotation resource and the <em>modeling concept</em> represented by a
* given object in the model. The diagram below illustrates the relationship
* in this case:
*
* @image html model-qualifiers.png "Relationship expressed by model qualifiers"
* @image latex model-qualifiers.png "Relationship expressed by model qualifiers"
* <br>
*/
typedef enum
{
BQM_IS
/*!< The modeling entity represented by the object in the model is
* identical to the subject of the referenced resource. */
, BQM_IS_DESCRIBED_BY
/*!< The modeling entity represented by the object in the model is
* described by the subject of the referenced resource. For example,
* this relationship could be used to link a model element to a
* document (such as a paper published in the literature) describing
* the element. */
, BQM_IS_DERIVED_FROM
/*!< The modeling entity represented by the object in the model is
* derived from or adapted from the referenced resource. This relation
* could be used, for instance, to express a refinement or adaptation in
* usage of a model component located elsewere. */
, BQM_UNKNOWN
/*!< The relationship is unknown. */
} ModelQualifierType_t;
/**
* @enum BiolQualifierType_t
*
* Enumeration of possible <em>biological qualifiers</em> used for
* annotations. Annotations with this type of qualifier express a
* relationship between an annotation resource and the <em>biological
* concept</em> represented by a given object in the model. The diagram
* below illustrates the relationship in this case:
*
* @image html biology-qualifiers.png "Relationship expressed by biological qualifiers"
* @image latex biology-qualifiers.png "Relationship expressed by biological qualifiers"
* <br>
*/
typedef enum
{
BQB_IS
/*!< The biological entity represented by the object in the model is
* identical to the subject of the referenced resource. */
, BQB_HAS_PART
/*!< The biological entity represented by the object in the model
* includes the subject of the referenced resource. */
, BQB_IS_PART_OF
/*!< The biological entity represented by the object in the model is a
* physical or logical part of the subject of the referenced resource.
* For example, this could be used to indicate that the molecular entity
* represented by a given object in the model is part of the referenced
* molecular complex. */
, BQB_IS_VERSION_OF
/*!< The biological entity represented by the object in the model is a
* version or an instance of the subject of the referenced resource. */
, BQB_HAS_VERSION
/*!< The subject of the referenced resource is a version or an instance
* of the biological entity represented by the model element. */
, BQB_IS_HOMOLOG_TO
/*!< The biological entity represented by the object in the model is
* homologous to the subject of the referenced resource. */
, BQB_IS_DESCRIBED_BY
/*!< The biological entity represented by the object in the model is
* described by the subject of the referenced resource. This could be
* used, for example, to link a species or a parameter to the literature
* that describes the concentration of that species or the value of that
* parameter. */
, BQB_IS_ENCODED_BY
/*!< The biological entity represented by the object in the model is
* encoded, directly or transitively, by the subject of the referenced
* resource. */
, BQB_ENCODES
/*!< The biological entity represented by the object in the model encodes
* directly or transitively the subject of the referenced resource. */
, BQB_OCCURS_IN
/*!< The biological entity represented by the object in the model is
* physically limited to a location. The location is the subject of the
* referenced resource. */
, BQB_HAS_PROPERTY
/*!< The subject of the referenced resource is a property of the
* biological entity represented by the model element. */
, BQB_IS_PROPERTY_OF
/*!< The biological entity represented by the object in the model is
* a property of the referenced resource. */
, BQB_UNKNOWN
/*!< The relationship is unknown. */
} BiolQualifierType_t;
LIBSBML_CPP_NAMESPACE_END
#ifdef __cplusplus
#include <limits>
#include <iomanip>
#include <string>
#include <sstream>
#include <cstdlib>
LIBSBML_CPP_NAMESPACE_BEGIN
class LIBSBML_EXTERN CVTerm
{
public:
/**
* Creates an empty CVTerm, optionally with the given
* @if clike #QualifierType_t value@else qualifier@endif@~ @p type.
*
* @copydetails doc_what_are_cvterms
*
* This method creates an empty CVTerm object. The possible qualifier
* types usable as values of @p type are @link
* QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink and @link
* QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink. If
* an explicit value for @p type is not given, this method defaults to
* using @link QualifierType_t#UNKNOWN_QUALIFIER
* UNKNOWN_QUALIFIER@endlink. The @if clike #QualifierType_t value@else qualifier type@endif@~
* can be set later using the
* CVTerm::setQualifierType(@if java int type@endif) method.
*
* Different BioModels.net qualifier elements encode different types of
* relationships. Please refer to the SBML specification or the <a
* target="_blank" href="http://biomodels.net/qualifiers/">BioModels.net
* qualifiers web page</a> for an explanation of the meaning of these
* different qualifiers.
*
* @param type a @if clike #QualifierType_t value@else qualifier type@endif@~
*
* @if notcpp @htmlinclude warn-default-args-in-docs.html @endif@~
*/
CVTerm(QualifierType_t type = UNKNOWN_QUALIFIER);
/**
* Creates a new CVTerm from the given XMLNode.
*
* @copydetails doc_what_are_cvterms
*
* This method creates a CVTerm object from the given XMLNode object @p
* node. XMLNode is libSBML's representation of a node in an XML tree of
* elements, and each such element can be placed in a namespace. This
* constructor looks for the element to be in the XML namespaces
* <code>"http://biomodels.net/model-qualifiers"</code> (for
* model qualifiers) and
* <code>"http://biomodels.net/biology-qualifiers"</code> (for
* biological qualifier), and if they are, creates CVTerm objects for
* the result.
*
* @param node an %XMLNode representing a CVTerm.
*
* @note This method assumes that the given XMLNode object @p node is of
* the correct structural form.
*/
CVTerm(const XMLNode node);
/**
* Destroys this CVTerm.
*/
~CVTerm();
/**
* Copy constructor; creates a copy of a CVTerm object.
*
* @param orig the CVTerm instance to copy.
*
* @throws @if python ValueError @else SBMLConstructorException @endif@~
* Thrown if the argument @p orig is @c NULL.
*/
CVTerm(const CVTerm& orig);
/**
* Assignment operator for CVTerm.
*
* @param rhs The object whose values are used as the basis of the
* assignment.
*
* @throws @if python ValueError @else SBMLConstructorException @endif@~
* Thrown if the argument @p rhs is @c NULL.
*/
CVTerm& operator=(const CVTerm& rhs);
/**
* Creates and returns a deep copy of this CVTerm object.
*
* @return a (deep) copy of this CVTerm.
*/
CVTerm* clone() const;
/**
* Returns the qualifier type of this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The placeholder <span class="code" style="background-color: #bbb">
* RELATION_ELEMENT</span> refers to a BioModels.net qualifier
* element name. This is an element in either the XML namespace
* <code>"http://biomodels.net/model-qualifiers"</code> (for model
* qualifiers) or <code>"http://biomodels.net/biology-qualifiers"</code>
* (for biological qualifier). The present method returns a code
* identifying which one of these two relationship namespaces is being
* used; any other qualifier in libSBML is considered unknown (as far as
* the CVTerm class is concerned). Consequently, this method will return
* one of the following values:
*
* @li @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink
* @li @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink
* @li @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink
*
* The specific relationship of this CVTerm to the enclosing SBML object
* can be determined using the CVTerm methods such as
* getModelQualifierType() and getBiologicalQualifierType(). Callers
* will typically want to use the present method to find out which one of
* the @em other two methods to call to find out the specific
* relationship.
*
* @return the @if clike #QualifierType_t value@else qualifier type@endif@~
* of this object or @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink
* (the default).
*
* @see getResources()
* @see getModelQualifierType()
* @see getBiologicalQualifierType()
*/
QualifierType_t getQualifierType();
/**
* Returns the model qualifier type of this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The placeholder <span class="code" style="background-color: #bbb">
* RELATION_ELEMENT</span> refers to a BioModels.net qualifier
* element name. This is an element in either the XML namespace
* <code>"http://biomodels.net/model-qualifiers"</code> (for model
* qualifiers) or <code>"http://biomodels.net/biology-qualifiers"</code>
* (for biological qualifier). Callers will typically use
* getQualifierType() to find out the type of qualifier relevant to this
* particular CVTerm object, then if it is a @em model qualifier, use the
* present method to determine the specific qualifier.
*
* Annotations with model qualifiers express a relationship between an
* annotation resource and the <em>modeling concept</em> represented by a
* given object in the model. The diagram below illustrates the
* relationship in this case:
*
* @image html model-qualifiers.png "Relationship expressed by model qualifiers"
* @image latex model-qualifiers.png "Relationship expressed by model qualifiers"
*
* <br> The set of known model qualifiers is, at the time of this libSBML
* release, the following:
*
* @li @link ModelQualifierType_t#BQM_IS BQM_IS@endlink
* @li @link ModelQualifierType_t#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink
* @li @link ModelQualifierType_t#BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM@endlink
*
* Any other BioModels.net qualifier found in the model is considered
* unknown by libSBML and reported as
* @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink.
*
* @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
* of this object or @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink
* (the default).
*/
ModelQualifierType_t getModelQualifierType();
/**
* Returns the biological qualifier type of this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The placeholder <span class="code" style="background-color: #bbb">
* RELATION_ELEMENT</span> refers to a BioModels.net qualifier
* element name. This is an element in either the XML namespace
* <code>"http://biomodels.net/model-qualifiers"</code> (for model
* qualifiers) or <code>"http://biomodels.net/biology-qualifiers"</code>
* (for biological qualifier). Callers will typically use
* getQualifierType() to find out the type of qualifier relevant to this
* particular CVTerm object, then if it is a @em biological qualifier,
* use the present method to determine the specific qualifier.
*
* Annotations with biological qualifiers express a relationship between an
* annotation resource and the <em>biological concept</em> represented by a
* given object in the model. The diagram
* below illustrates the relationship in this case:
*
* @image html biology-qualifiers.png "Relationship expressed by biological qualifiers"
* @image latex biology-qualifiers.png "Relationship expressed by biological qualifiers"
*
* <br> The set of known biological qualifiers is, at the time of this
* libSBML release, the following:
*
* @li @link BiolQualifierType_t#BQB_IS BQB_IS@endlink
* @li @link BiolQualifierType_t#BQB_HAS_PART BQB_HAS_PART@endlink
* @li @link BiolQualifierType_t#BQB_IS_PART_OF BQB_IS_PART_OF@endlink
* @li @link BiolQualifierType_t#BQB_IS_VERSION_OF BQB_IS_VERSION_OF@endlink
* @li @link BiolQualifierType_t#BQB_HAS_VERSION BQB_HAS_VERSION@endlink
* @li @link BiolQualifierType_t#BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO@endlink
* @li @link BiolQualifierType_t#BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY@endlink
* @li @link BiolQualifierType_t#BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY@endlink
* @li @link BiolQualifierType_t#BQB_ENCODES BQB_ENCODES@endlink
* @li @link BiolQualifierType_t#BQB_OCCURS_IN BQB_OCCURS_IN@endlink
* @li @link BiolQualifierType_t#BQB_HAS_PROPERTY BQB_HAS_PROPERTY@endlink
* @li @link BiolQualifierType_t#BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF@endlink
*
* Any other BioModels.net qualifier found in the model is considered
* unknown by libSBML and reported as
* @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink.
*
* @return the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~
* of this object or @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink
* (the default).
*/
BiolQualifierType_t getBiologicalQualifierType();
/**
* Returns the resource references for this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The <span class="code" style="background-color: #d0d0ee">resource
* URI</span> values shown in the template above are stored internally in
* CVTerm objects using an XMLAttributes object. Each attribute stored
* inside the XMLAttributes will have the same name (specifically,
* "<code>rdf:resource</code>") but a different value, and the
* value will be a <span class="code" style="background-color: #d0d0ee">
* resource URI</span> shown in the XML template above.
*
* A valid CVTerm entity must always have at least one resource and
* a value for the relationship qualifier.
*
* @return the XMLAttributes that store the resources of this CVTerm.
*
* @see getQualifierType()
* @see addResource(const std::string& resource)
* @see getResourceURI(unsigned int n)
*/
XMLAttributes * getResources();
/**
* Returns the resources for this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The <span class="code" style="background-color: #d0d0ee">resource
* URI</span> values shown in the template above are stored internally in
* CVTerm objects using an XMLAttributes object. Each attribute stored
* inside the XMLAttributes will have the same name (specifically,
* "<code>rdf:resource</code>") but a different value, and the
* value will be a <span class="code" style="background-color: #d0d0ee">
* resource URI</span> shown in the XML template above.
*
* A valid CVTerm entity must always have at least one resource and
* a value for the relationship qualifier.
*
* @return the XMLAttributes that store the resources of this CVTerm.
*
* @see getQualifierType()
* @see addResource(const std::string& resource)
* @see getResourceURI(unsigned int n)
*/
const XMLAttributes * getResources() const;
/**
* Returns the number of resources for this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The fragment above illustrates that there can be more than one
* resource referenced by a given relationship annotation (i.e., the
* <span class="code" style="background-color: #d0d0ee">resource
* URI</span> values associated with a particular <span class="code"
* style="background-color: #bbb">RELATION_ELEMENT</span>). The present
* method returns a count of the resources stored in this CVTerm object.
*
* @return the number of resources in the set of XMLAttributes
* of this CVTerm.
*
* @see getResources()
* @see getResourceURI(unsigned int n)
*/
unsigned int getNumResources();
/**
* Returns the value of the <em>n</em>th resource for this CVTerm object.
*
* @copydetails doc_cvterm_common_description
*
* The fragment above illustrates that there can be more than one
* resource referenced by a given relationship annotation (i.e., the
* <span class="code" style="background-color: #d0d0ee">resource
* URI</span> values associated with a particular <span class="code"
* style="background-color: #bbb">RELATION_ELEMENT</span>). LibSBML
* stores all resource URIs in a single CVTerm object for a given
* relationship. Callers can use getNumResources() to find out how many
* resources are stored in this CVTerm object, then call this method to
* retrieve the <em>n</em>th resource URI.
*
* @param n the index of the resource to query
*
* @return string representing the value of the nth resource
* in the set of XMLAttributes of this CVTerm.
*
* @see getNumResources()
* @see getQualifierType()
*/
std::string getResourceURI(unsigned int n);
/**
* Sets the @if clike #QualifierType_t@else qualifier code@endif@~ of this
* CVTerm object.
*
* @param type the @if clike #QualifierType_t value@else qualifier type@endif.
* The possible values returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
*
* @see getQualifierType()
*/
int setQualifierType(QualifierType_t type);
/**
* Sets the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
* of this CVTerm object.
*
* @param type the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~
*
* @return integer value indicating success/failure of the
* function. The possible values returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
*
* @note If the Qualifier Type of this object is not
* @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink,
* then the ModelQualifierType_t value will default to
* @link QualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink.
*
* @see getQualifierType()
* @see setQualifierType(@if java int type@endif)
*/
int setModelQualifierType(ModelQualifierType_t type);
/**
* Sets the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~
* of this CVTerm object.
*
* @param type the @if clike #BiolQualifierType_t value@else biology qualifier type@endif.
*
* @return integer value indicating success/failure of the
* function. The possible values returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
*
* @note If the Qualifier Type of this object is not
* @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink,
* then the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ will default
* to @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink.
*
* @see getQualifierType()
* @see setQualifierType(@if java int type@endif)
*/
int setBiologicalQualifierType(BiolQualifierType_t type);
/**
* Sets the @if clike #ModelQualifierType_t@endif@if java model qualifier type code@endif@~ value of this CVTerm object.
*
* @param qualifier the string representing a model qualifier
*
* @return integer value indicating success/failure of the
* function. The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
*
* @note If the Qualifier Type of this object is not
* @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink,
* then the ModelQualifierType_t value will default to
* @link QualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink.
*
* @see getQualifierType()
* @see setQualifierType(@if java int type@endif)
*/
int setModelQualifierType(const std::string& qualifier);
/**
* Sets the @if clike #BiolQualifierType_t@endif@if java biology qualifier
* type code@endif@~ of this CVTerm object.
*
* @param qualifier the string representing a biology qualifier
*
* @return integer value indicating success/failure of the
* function. The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
*
* @note If the Qualifier Type of this object is not
* @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink,
* then the @if clike #BiolQualifierType_t@endif@if java biology qualifier type code@endif@~ value will default
* to @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink.
*
* @see getQualifierType()
* @see setQualifierType(@if java int type@endif)
*/
int setBiologicalQualifierType(const std::string& qualifier);
/**
* Adds a resource reference to this CVTerm object.
*
* @copydetails doc_what_are_cvterms
*
* The specific RDF element used in this SBML format for referring to
* external entities is <code><rdf:Description></code>, with a
* <code><rdf:Bag></code> element containing one or more
* <code><rdf:li></code> elements. Each such element refers to a
* data item in an external resource; the resource and data item are
* together identified uniquely using a URI. The following template
* illustrates the structure:
*
<pre class="fragment">
<rdf:Description rdf:about="#<span style="border-bottom: 1px solid black">meta id</span>">
<span style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span>
<<span style="background-color: #bbb">RELATION_ELEMENT</span>>
<rdf:Bag>
<rdf:li rdf:resource="<span style="background-color: #d0d0ee">resource URI</span>" />
<span style="background-color: #edd">...</span>
</rdf:Bag>
</<span style="background-color: #bbb">RELATION_ELEMENT</span>>
<span style="background-color: #edd">...</span>
</rdf:Description>
</pre>
*
* In the template above, the placeholder <span class="code"
* style="border-bottom: 1px solid black">meta id</span> stands for the
* element's meta identifier, which is a field available on all SBML
* components derived from the SBase base object class. The <span
* style="border-bottom: 2px dotted #888">dotted</span> portions are
* optional, and the ellipses <span class="code"
* style="background-color: #edd">...</span> are placeholders for zero or
* more elements of the same form as the immediately preceding element.
* The placeholder <span class="code" style="background-color: #bbb">
* RELATION_ELEMENT</span> refers to a BioModels.net qualifier element
* name. This is an element in either the XML namespace
* <code>"http://biomodels.net/model-qualifiers"</code> (for model
* qualifiers) or <code>"http://biomodels.net/biology-qualifiers"</code>
* (for biological qualifier).
*
* The <span class="code" style="background-color: #d0d0ee">resource
* URI</span> is a required data value that uniquely identifies a
* resource and data within that resource to which the annotation refers.
* The present method allows callers to add a reference to a resource URI
* with the same relationship to the enclosing SBML object. (In other
* words, the argument to this method is a <span class="code"
* style="background-color: #d0d0ee">resource URI</span> as shown in the
* XML fragment above.) Resources are stored in this CVTerm object
* within an XMLAttributes object.
*
* The relationship of this CVTerm to the enclosing SBML object can be
* determined using the CVTerm methods such as getModelQualifierType()
* and getBiologicalQualifierType().
*
* @param resource a string representing the URI of the resource and data
* item being referenced; e.g.,
* <code>"http://www.geneontology.org/#GO:0005892"</code>.
*
* @return integer value indicating success/failure of the call. The
* possible values returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
*
* @see getResources()
* @see removeResource(std::string resource)
* @see getQualifierType()
* @see getModelQualifierType()
* @see getBiologicalQualifierType()
*/
int addResource(const std::string& resource);
/**
* Removes a resource URI from the set of resources stored in this CVTerm
* object.
*
* @param resource a string representing the resource URI to remove;
* e.g., <code>"http://www.geneontology.org/#GO:0005892"</code>.
*
* @return integer value indicating success/failure of the
* function. The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
*
* @see addResource(const std::string& resource)
*/
int removeResource(std::string resource);
/**
* Predicate returning @c true if all the required elements for this
* CVTerm object have been set.
*
* @note The required attributes for a CVTerm are:
* @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier
* @li at least one resource
*/
bool hasRequiredAttributes();
/** @cond doxygenLibsbmlInternal */
bool hasBeenModified();
void resetModifiedFlags();
/** @endcond */
protected:
/** @cond doxygenLibsbmlInternal */
XMLAttributes * mResources;
QualifierType_t mQualifier;
ModelQualifierType_t mModelQualifier;
BiolQualifierType_t mBiolQualifier;
bool mHasBeenModified;
/** @endcond */
};
LIBSBML_CPP_NAMESPACE_END
#endif /* __cplusplus */
#ifndef SWIG
LIBSBML_CPP_NAMESPACE_BEGIN
BEGIN_C_DECLS
/**
* Creates a new CVTerm_t with the given #QualifierType_t value @p type and
* returns a pointer to it.
*
* The possible QualifierTypes are MODEL_QUALIFIER and BIOLOGICAL_QUALIFIER.
*
* @param type a #QualifierType_t
*
* @return a pointer to the newly created CVTerm_t structure.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
CVTerm_t*
CVTerm_createWithQualifierType(QualifierType_t type);
/**
* Create a new CVTerm_t from the given XMLNode_t and returns a
* pointer to it.
*
* RDFAnnotations within a model are stored as a List_t of CVTerm_t's. This allows
* the user to interact with the CVTerm_t's directly. When LibSBML reads in a
* model containing RDFAnnotations it parses them into a %List of CVTerm_t's and
* when writing a model it parses the CVTerm_t's into the appropriate annotation
* structure. This function creates a CVTerm_t from the XMLNode_t supplied.
*
* @param node an XMLNode_t representing a CVTerm_t.
*
* @return a pointer to the newly created CVTerm_t structure.
*
* @note this method assumes that the %XMLNode_t is of the correct form
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
CVTerm_t*
CVTerm_createFromNode(const XMLNode_t * node);
/**
* Frees the given CVTerm_t structure.
*
* @param c the CVTerm_t structure to be freed.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
void
CVTerm_free(CVTerm_t * c);
/**
* Creates a deep copy of the given CVTerm_t structure
*
* @param term the CVTerm_t structure to be copied
*
* @return a (deep) copy of the given CVTerm_t structure.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
CVTerm_t *
CVTerm_clone (const CVTerm_t* term);
/**
* Takes a CVTerm_t structure and returns its #QualifierType_t type.
*
* @param term the CVTerm_t structure whose #QualifierType_t value is sought
*
* @return the #QualifierType_t value of this CVTerm_t or UNKNOWN_QUALIFIER
* (default).
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
QualifierType_t
CVTerm_getQualifierType(CVTerm_t* term);
/**
* Takes a CVTerm_t structure and returns the #ModelQualifierType_t type.
*
* @param term the CVTerm_t structure whose #ModelQualifierType_t is sought.
*
* @return the #ModelQualifierType_t value of this CVTerm_t or BQM_UNKNOWN
* (default).
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
ModelQualifierType_t
CVTerm_getModelQualifierType(CVTerm_t* term);
/**
* Takes a CVTerm_t structure and returns the #BiolQualifierType_t.
*
* @param term the CVTerm_t structure whose #BiolQualifierType_t value is
* sought.
*
* @return the #BiolQualifierType_t value of this CVTerm_t or BQB_UNKNOWN
* (default).
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
BiolQualifierType_t
CVTerm_getBiologicalQualifierType(CVTerm_t* term);
/**
* Takes a CVTerm_t structure and returns the resources.
*
* @param term the CVTerm_t structure whose resources are sought.
*
* @return the XMLAttributes_t that store the resources of this CVTerm_t.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
XMLAttributes_t *
CVTerm_getResources(CVTerm_t* term);
/**
* Returns the number of resources for this %CVTerm_t.
*
* @param term the CVTerm_t structure whose resources are sought.
*
* @return the number of resources in the set of XMLAttributes
* of this %CVTerm_t.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
unsigned int
CVTerm_getNumResources(CVTerm_t* term);
/**
* Returns the value of the nth resource for this %CVTerm_t.
*
* @param term the CVTerm_t structure
* @param n the index of the resource to query
*
* @return string representing the value of the nth resource
* in the set of XMLAttributes of this %CVTerm_t.
*
* @note Since the values of the resource attributes in a CVTerm_t
* are URIs this is a convenience function to facilitate
* interaction with the CVTerm_t structure.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
char *
CVTerm_getResourceURI(CVTerm_t * term, unsigned int n);
/**
* Sets the "QualifierType_t" of this %CVTerm_t.
*
* @param term the CVTerm_t structure to set.
* @param type the QualifierType_t
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_setQualifierType(CVTerm_t * term, QualifierType_t type);
/**
* Sets the "ModelQualifierType_t" of this %CVTerm_t.
*
* @param term the CVTerm_t structure to set.
* @param type the ModelQualifierType_t
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
*
* @note if the QualifierType_t for this structure is not MODEL_QUALIFIER
* then the ModelQualifierType_t will default to BQM_UNKNOWN.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_setModelQualifierType(CVTerm_t * term, ModelQualifierType_t type);
/**
* Sets the "BiolQualifierType_t" of this %CVTerm_t.
*
* @param term the CVTerm_t structure to set.
* @param type the BiolQualifierType_t
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
*
* @note if the QualifierType_t for this structure is not BIOLOGICAL_QUALIFIER
* then the BiolQualifierType_t will default to BQB_UNKNOWN.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_setBiologicalQualifierType(CVTerm_t * term, BiolQualifierType_t type);
/**
* Sets the "ModelQualifierType_t" of this %CVTerm_t.
*
* @param term the CVTerm_t structure to set.
* @param qualifier the string representing a model qualifier
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
*
* @note if the QualifierType_t for this structure is not MODEL_QUALIFIER
* then the ModelQualifierType_t will default to BQM_UNKNOWN.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_setModelQualifierTypeByString(CVTerm_t * term, const char* qualifier);
/**
* Sets the "BiolQualifierType_t" of this %CVTerm_t.
*
* @param term the CVTerm_t structure to set.
* @param qualifier the string representing a biol qualifier
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
*
* @note if the QualifierType_t for this structure is not BIOLOGICAL_QUALIFIER
* then the BiolQualifierType_t will default to BQB_UNKNOWN.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_setBiologicalQualifierTypeByString(CVTerm_t * term, const char* qualifier);
/**
* Adds a resource to the CVTerm_t.
*
* @param term the CVTerm_t structure to set.
* @param resource string representing the resource
* e.g. http://www.geneontology.org/#GO:0005892
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink
*
* @note this method adds the name "rdf:resource" to the attribute prior
* to adding it to the resources in this CVTerm_t.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_addResource(CVTerm_t * term, const char * resource);
/**
* Removes a resource from the CVTerm_t.
*
* @param term the CVTerm_t structure.
* @param resource string representing the resource
* e.g. http://www.geneontology.org/#GO:0005892
*
* @return integer value indicating success/failure of the
* function. @if clike The value is drawn from the
* enumeration #OperationReturnValues_t. @endif@~ The possible values
* returned by this function are:
* @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE @endlink
* @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_removeResource(CVTerm_t * term, const char * resource);
/**
* Checks if the CVTerm_t has all the required attributes.
*
* @param term the CVTerm_t structure
*
* @return true (1) if this CVTerm_t has all the required elements,
* otherwise false (0) will be returned. If an invalid CVTerm_t
* was provided LIBSBML_INVALID_OBJECT is returned.
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
int
CVTerm_hasRequiredAttributes(CVTerm_t *term);
/**
* This method takes a model qualifier type code and returns a string
* representing the code.
*
* This method takes a model qualifier type as argument
* and returns a string name corresponding to that code. For example,
* passing it the qualifier <code>BQM_IS_DESCRIBED_BY</code> will return
* the string "<code>isDescribedBy</code>".
*
* @return a human readable qualifier name for the given type.
*
* @note The caller does not own the returned string and is therefore not
* allowed to modify it.
*
* @param type The ModelQualifierType_t to translate
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
const char*
ModelQualifierType_toString(ModelQualifierType_t type);
/**
* This method takes a biol qualifier type code and returns a string
* representing the code.
*
* This method takes a biol qualifier type as argument
* and returns a string name corresponding to that code. For example,
* passing it the qualifier <code>BQB_HAS_VERSION</code> will return
* the string "<code>hasVersion</code>".
*
* @return a human readable qualifier name for the given type.
*
* @note The caller does not own the returned string and is therefore not
* allowed to modify it.
*
* @param type The BiolQualifierType_t to translate
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
const char*
BiolQualifierType_toString(BiolQualifierType_t type);
/**
* This method takes a a string and returns a model qualifier
* representing the string.
*
* This method takes a string as argument and returns a model qualifier type
* corresponding to that string. For example, passing it the string
* "<code>isDescribedBy</code>" will return the qualifier
* <code>BQM_IS_DESCRIBED_BY</code>.
*
* @return a qualifier for the given human readable qualifier name.
*
* @param s The string to translate to a ModelQualifierType_t
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
ModelQualifierType_t
ModelQualifierType_fromString(const char* s);
/**
* This method takes a a string and returns a biol qualifier
* representing the string.
*
* This method takes a string as argument and returns a biol qualifier type
* corresponding to that string. For example, passing it the string
* "<code>hasVersion</code>" will return the qualifier
* <code>BQB_HAS_VERSION</code>.
*
* @return a qualifier for the given human readable qualifier name.
*
* @param s The string to translate to a BiolQualifierType_t
*
* @memberof CVTerm_t
*/
LIBSBML_EXTERN
BiolQualifierType_t
BiolQualifierType_fromString(const char* s);
END_C_DECLS
LIBSBML_CPP_NAMESPACE_END
#endif /* !SWIG */
#endif /** CVTerm_h **/
|