setQualifierType() public method

public setQualifierType ( int type ) : int
type int
return int
コード例 #1
0
ファイル: TestValidation.cs プロジェクト: mgaldzic/copasi_api
 public void test_Validation_CVTerm2()
 {
     CVTerm cv = new CVTerm();
       assertTrue( cv != null );
       assertEquals( false, (cv.hasRequiredAttributes()) );
       cv.setQualifierType(libsbml.BIOLOGICAL_QUALIFIER);
       assertEquals( false, (cv.hasRequiredAttributes()) );
       cv.setBiologicalQualifierType(libsbml.BQB_IS);
       assertEquals( false, (cv.hasRequiredAttributes()) );
       cv.addResource("ggg");
       assertEquals( true, (cv.hasRequiredAttributes()) );
       cv = null;
 }
コード例 #2
0
ファイル: TestValidation.cs プロジェクト: mgaldzic/copasi_api
 public void test_Validation_CVTerm1()
 {
     CVTerm cv = new CVTerm();
       assertTrue( cv != null );
       assertEquals( false, (cv.hasRequiredAttributes()) );
       cv.setQualifierType(libsbml.MODEL_QUALIFIER);
       assertEquals( false, (cv.hasRequiredAttributes()) );
       cv.setModelQualifierType(libsbml.BQM_IS);
       assertEquals( false, (cv.hasRequiredAttributes()) );
       cv.addResource("ggg");
       assertEquals( true, (cv.hasRequiredAttributes()) );
       cv = null;
 }
コード例 #3
0
 public void test_RDFAnnotation2_modelWithHistoryAndCVTerms()
 {
     ModelHistory h = new ModelHistory();
       ModelCreator c = new ModelCreator();
       c.setFamilyName("Keating");
       c.setGivenName("Sarah");
       h.addCreator(c);
       Date d = new Date(2008,11,17,18,37,0,0,0,0);
       h.setCreatedDate(d);
       h.setModifiedDate(d);
       m2.unsetModelHistory();
       m2.setModelHistory(h);
       CVTerm cv = new CVTerm();
       cv.setQualifierType(libsbml.BIOLOGICAL_QUALIFIER);
       cv.setBiologicalQualifierType(libsbml.BQB_IS_VERSION_OF);
       cv.addResource("http://www.geneontology.org/#GO:0005892");
       m2.addCVTerm(cv);
       XMLNode ann = RDFAnnotationParser.parseModelHistory(m2);
       string expected = "<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=\"#_000001\">\n" +
     "      <dc:creator rdf:parseType=\"Resource\">\n" +
     "        <rdf:Bag>\n" +
     "          <rdf:li rdf:parseType=\"Resource\">\n" +
     "            <vCard:N rdf:parseType=\"Resource\">\n" +
     "              <vCard:Family>Keating</vCard:Family>\n" +
     "              <vCard:Given>Sarah</vCard:Given>\n" +
     "            </vCard:N>\n" +
     "          </rdf:li>\n" +
     "        </rdf:Bag>\n" +
     "      </dc:creator>\n" +
     "      <dcterms:created rdf:parseType=\"Resource\">\n" +
     "        <dcterms:W3CDTF>2008-11-17T18:37:00Z</dcterms:W3CDTF>\n" +
     "      </dcterms:created>\n" +
     "      <dcterms:modified rdf:parseType=\"Resource\">\n" +
     "        <dcterms:W3CDTF>2008-11-17T18:37:00Z</dcterms:W3CDTF>\n" +
     "      </dcterms:modified>\n" +
     "      <bqbiol:isVersionOf>\n" +
     "        <rdf:Bag>\n" +
     "          <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0005892\"/>\n" +
     "        </rdf:Bag>\n" +
     "      </bqbiol:isVersionOf>\n" +
     "    </rdf:Description>\n" +
     "  </rdf:RDF>\n" +
     "</annotation>";
       if (ann != null);
       {
     assertEquals( true, equals(expected,ann.toXMLString()) );
       }
       {
       }
 }
コード例 #4
0
ファイル: TestCVTerms.cs プロジェクト: mgaldzic/copasi_api
 public void test_CVTerm_set_get()
 {
     CVTerm term = new  CVTerm(libsbml.MODEL_QUALIFIER);
       assertTrue( term != null );
       assertTrue( term.getQualifierType() == libsbml.MODEL_QUALIFIER );
       term.setModelQualifierType(libsbml.BQM_IS);
       assertTrue( term != null );
       assertTrue( term.getQualifierType() == libsbml.MODEL_QUALIFIER );
       assertTrue( term.getModelQualifierType() == libsbml.BQM_IS );
       term.setQualifierType(libsbml.BIOLOGICAL_QUALIFIER);
       term.setBiologicalQualifierType(libsbml.BQB_IS);
       assertTrue( term.getQualifierType() == libsbml.BIOLOGICAL_QUALIFIER );
       assertTrue( term.getBiologicalQualifierType() == libsbml.BQB_IS );
       term = null;
 }
コード例 #5
0
 public void test_CVTerm_setBiolQualifierType()
 {
     CVTerm term = new  CVTerm(libsbml.BIOLOGICAL_QUALIFIER);
       assertTrue( term != null );
       assertTrue( term.getQualifierType() == libsbml.BIOLOGICAL_QUALIFIER );
       assertTrue( term.getModelQualifierType() == libsbml.BQM_UNKNOWN );
       assertTrue( term.getBiologicalQualifierType() == libsbml.BQB_UNKNOWN );
       int i = term.setBiologicalQualifierType(libsbml.BQB_IS);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( term.getQualifierType() == libsbml.BIOLOGICAL_QUALIFIER );
       assertTrue( term.getBiologicalQualifierType() == libsbml.BQB_IS );
       assertTrue( term.getModelQualifierType() == libsbml.BQM_UNKNOWN );
       i = term.setQualifierType(libsbml.MODEL_QUALIFIER);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( term.getQualifierType() == libsbml.MODEL_QUALIFIER );
       assertTrue( term.getModelQualifierType() == libsbml.BQM_UNKNOWN );
       assertTrue( term.getBiologicalQualifierType() == libsbml.BQB_UNKNOWN );
       i = term.setBiologicalQualifierType(libsbml.BQB_IS);
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertTrue( term.getQualifierType() == libsbml.MODEL_QUALIFIER );
       assertTrue( term.getModelQualifierType() == libsbml.BQM_UNKNOWN );
       assertTrue( term.getBiologicalQualifierType() == libsbml.BQB_UNKNOWN );
       term = null;
 }