setAnnotation() public method

public setAnnotation ( XMLNode annotation ) : int
annotation XMLNode
return int
        public void test_SyncAnnotation_stringChangesMetaid1()
        {
            Model c = new Model(2, 3);
              c.setMetaId("_000005");
              c.setId("A");

              string addedAnn =
            "  <annotation>\n" +
            "    <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"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/\">\n" +
            "      <rdf:Description rdf:about=\"#_000003\">\n" +
            "        <dc:creator>\n" +
            "          <rdf:Bag>\n" +
            "            <rdf:li rdf:parseType=\"Resource\">\n" +
            "              <vCard:N rdf:parseType=\"Resource\">\n" +
            "                <vCard:Family>Le Novere</vCard:Family>\n" +
            "                <vCard:Given>Nicolas</vCard:Given>\n" +
            "              </vCard:N>\n" +
            "              <vCard:EMAIL>[email protected]</vCard:EMAIL>\n" +
            "              <vCard:ORG rdf:parseType=\"Resource\">\n" +
            "                <vCard:Orgname>EMBL-EBI</vCard:Orgname>\n" +
            "              </vCard:ORG>\n" +
            "            </rdf:li>\n" +
            "          </rdf:Bag>\n" +
            "        </dc:creator>\n" +
            "        <dcterms:created rdf:parseType=\"Resource\">\n" +
            "          <dcterms:W3CDTF>2005-02-02T14:56:11Z</dcterms:W3CDTF>\n" +
            "        </dcterms:created>\n" +
            "        <dcterms:modified rdf:parseType=\"Resource\">\n" +
            "          <dcterms:W3CDTF>2006-05-30T10:46:02Z</dcterms:W3CDTF>\n" +
            "        </dcterms:modified>\n" +
            "        <bqbiol:is>\n" +
            "          <rdf:Bag>\n" +
            "            <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" +
            "          </rdf:Bag>\n" +
            "        </bqbiol:is>\n" +
            "      </rdf:Description>\n" +
            "    </rdf:RDF>\n" +
            "  </annotation>";

              c.setAnnotation(addedAnn);

              string expected =
            "<model metaid=\"_000005\" id=\"A\">\n" +
            "  <annotation>\n" +
            "    <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"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/\">\n" +
            "      <rdf:Description rdf:about=\"#_000005\">\n" +
            "        <dc:creator rdf:parseType=\"Resource\">\n" +
            "          <rdf:Bag>\n" +
            "            <rdf:li rdf:parseType=\"Resource\">\n" +
            "              <vCard:N rdf:parseType=\"Resource\">\n" +
            "                <vCard:Family>Le Novere</vCard:Family>\n" +
            "                <vCard:Given>Nicolas</vCard:Given>\n" +
            "              </vCard:N>\n" +
            "              <vCard:EMAIL>[email protected]</vCard:EMAIL>\n" +
            "              <vCard:ORG>\n" +
            "                <vCard:Orgname>EMBL-EBI</vCard:Orgname>\n" +
            "              </vCard:ORG>\n" +
            "            </rdf:li>\n" +
            "          </rdf:Bag>\n" +
            "        </dc:creator>\n" +
            "        <dcterms:created rdf:parseType=\"Resource\">\n" +
            "          <dcterms:W3CDTF>2005-02-02T14:56:11Z</dcterms:W3CDTF>\n" +
            "        </dcterms:created>\n" +
            "        <dcterms:modified rdf:parseType=\"Resource\">\n" +
            "          <dcterms:W3CDTF>2006-05-30T10:46:02Z</dcterms:W3CDTF>\n" +
            "        </dcterms:modified>\n" +
            "        <bqbiol:is>\n" +
            "          <rdf:Bag>\n" +
            "            <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" +
            "          </rdf:Bag>\n" +
            "        </bqbiol:is>\n" +
            "      </rdf:Description>\n" +
            "    </rdf:RDF>\n" +
            "  </annotation>\n" +
            "</model>";

              assertEquals(true, equals(expected, c.toSBML()));
        }