Наследование: IDisposable
Пример #1
0
 ModelCreator(ModelCreator orig) : this(libsbmlPINVOKE.new_ModelCreator__SWIG_2(ModelCreator.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #2
0
        public ModelCreator get(uint n)
        {
            global::System.IntPtr cPtr = libsbmlPINVOKE.ModelCreatorList_get(swigCPtr, n);
            ModelCreator          ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ModelCreator(cPtr, false);

            return(ret);
        }
Пример #3
0
        ModelCreator clone()
        {
            IntPtr       cPtr = libsbmlPINVOKE.ModelCreator_clone(swigCPtr);
            ModelCreator ret  = (cPtr == IntPtr.Zero) ? null : new ModelCreator(cPtr, true);

            return(ret);
        }
Пример #4
0
        public ModelCreator remove(uint n)
        {
            IntPtr       cPtr = libsbmlPINVOKE.ModelCreatorList_remove(swigCPtr, n);
            ModelCreator ret  = (cPtr == IntPtr.Zero) ? null : new ModelCreator(cPtr, false);

            return(ret);
        }
Пример #5
0
        ModelCreator getCreator(long n)
        {
            IntPtr       cPtr = libsbmlPINVOKE.ModelHistory_getCreator(swigCPtr, n);
            ModelCreator ret  = (cPtr == IntPtr.Zero) ? null : new ModelCreator(cPtr, false);

            return(ret);
        }
 public void test_ModelHistory_addCreator2()
 {
     ModelHistory mh = new  ModelHistory();
       ModelCreator mc = new  ModelCreator();
       mc.setGivenName( "Sarah");
       int i = mh.addCreator(mc);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertTrue( mh.getNumCreators() == 0 );
       mc = null;
       mh = null;
 }
Пример #7
0
    public static int Main(string[] args)
    {
        SBMLDocument d;
        int errors;

        if (args.Length != 2)
        {
            Console.Write(Environment.NewLine
                                      + "  usage: addModelHistory <input-filename> <output-filename>" + Environment.NewLine
                                      + Environment.NewLine);
            return 2;
        }

        d = libsbml.readSBML(args[0]);
        errors = (int)d.getNumErrors();

        if (errors > 0)
        {
            Console.Write("Read Error(s):" + Environment.NewLine);
            d.printErrors();

            Console.Write("Correct the above and re-run." + Environment.NewLine);
        }
        else
        {
            ModelHistory h = new ModelHistory();

            ModelCreator c = new ModelCreator();
            c.setFamilyName("Keating");
            c.setGivenName("Sarah");
            c.setEmail("*****@*****.**");
            c.setOrganization("University of Hertfordshire");

            long status = h.addCreator(c);
            printStatus("Status for addCreator: ", status);

            Date date = new Date("1999-11-13T06:54:32");
            Date date2 = new Date("2007-11-30T06:54:00-02:00");

            status = h.setCreatedDate(date);
            printStatus("Set created date:      ", status);

            status = h.setModifiedDate(date2);
            printStatus("Set modified date:     ", status);

            status = d.getModel().setModelHistory(h);
            printStatus("Set model history:     ", status);

            libsbml.writeSBML(d, args[1]);
        }

        return errors;
    }
Пример #8
0
        internal static HandleRef getCPtrAndDisown(ModelCreator obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
                ptr             = obj.swigCPtr;
                obj.swigCMemOwn = false;
            }

            return(ptr);
        }
 public void test_ModelHistory_addCreator1()
 {
     ModelHistory mh = new  ModelHistory();
       ModelCreator mc = new  ModelCreator();
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       int i = mh.addCreator(mc);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mh.getNumCreators() == 1 );
       mc = null;
       mh = null;
 }
 public void test_ModelCreator_setGivenName()
 {
     ModelCreator mc = new  ModelCreator();
       assertTrue( mc != null );
       int i = mc.setGivenName( "Sarah");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mc.isSetGivenName() == true );
       assertTrue((  "Sarah" == mc.getGivenName() ));
       i = mc.setGivenName( "");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mc.isSetGivenName() == false );
       i = mc.setGivenName( "Sarah");
       assertTrue( mc.isSetGivenName() == true );
       i = mc.unsetGivenName();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mc.isSetGivenName() == false );
       mc = null;
 }
Пример #11
0
 public void test_ModelHistory_copyConstructor()
 {
     ModelHistory mh = new ModelHistory();
       ModelCreator mc = new ModelCreator();
       mc.setFamilyName("Keating");
       mc.setGivenName("Sarah");
       mc.setEmail("*****@*****.**");
       mh.addCreator(mc);
       mc = null;
       Date date = new Date(2005,12,30,12,15,45,1,2,0);
       mh.setCreatedDate(date);
       date = null;
       assertTrue( mh.getCreatedDate().getMonth() == 12 );
       assertTrue( mh.getCreatedDate().getSecond() == 45 );
       assertTrue( ((ModelCreator) mh.getCreator(0)).getFamilyName() ==  "Keating" );
       ModelHistory mh2 = new ModelHistory(mh);
       assertTrue( mh2.getCreatedDate().getMonth() == 12 );
       assertTrue( mh2.getCreatedDate().getSecond() == 45 );
       assertTrue( ((ModelCreator) mh2.getCreator(0)).getFamilyName() ==  "Keating" );
       mh2 = null;
       mh = null;
 }
Пример #12
0
 public void test_L3_Species_ModelHistory()
 {
     (S).setMetaId("_3");
       ModelHistory history = new  ModelHistory();
       int i = (S).setModelHistory(history);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertEquals( false, (S).isSetModelHistory() );
       ModelCreator mc = new  ModelCreator();
       Date date = new  Date(2005,12,30,12,15,45,1,2,0);
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       mc.setEmail( "*****@*****.**");
       mc.setOrganisation( "UH");
       history.addCreator(mc);
       history.setCreatedDate(date);
       history.setModifiedDate(date);
       i = (S).setModelHistory(history);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, (S).isSetModelHistory() );
       i = (S).unsetModelHistory();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, (S).isSetModelHistory() );
       assertTrue( (S).getModelHistory() == null );
       history = null;
 }
Пример #13
0
 public void test_ModelHistory_addCreator()
 {
     ModelCreator newMC;
       ModelHistory history = new  ModelHistory();
       assertTrue( history.getNumCreators() == 0 );
       assertTrue( history != null );
       ModelCreator mc = new  ModelCreator();
       assertTrue( mc != null );
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       mc.setEmail( "*****@*****.**");
       mc.setOrganisation( "UH");
       history.addCreator(mc);
       assertTrue( history.getNumCreators() == 1 );
       mc = null;
       newMC = history.getListCreators().get(0);
       assertTrue( newMC != null );
       assertTrue((  "Keating" == newMC.getFamilyName() ));
       assertTrue((  "Sarah" == newMC.getGivenName() ));
       assertTrue((  "*****@*****.**" == newMC.getEmail() ));
       assertTrue((  "UH" == newMC.getOrganisation() ));
       history = null;
 }
Пример #14
0
 public void prepend(ModelCreator item)
 {
     libsbmlPINVOKE.ModelCreatorList_prepend(swigCPtr, ModelCreator.getCPtr(item));
 }
Пример #15
0
        internal static HandleRef getCPtrAndDisown(ModelCreator obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
            ptr             = obj.swigCPtr;
            obj.swigCMemOwn = false;
            }

            return ptr;
        }
 public void test_SBase_setModelHistory_Model()
 {
     S.setMetaId("_001");
       ModelHistory history = new  ModelHistory();
       ModelCreator mc = new  ModelCreator();
       Date date = new  Date(2005,12,30,12,15,45,1,2,0);
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       mc.setEmail( "*****@*****.**");
       mc.setOrganisation( "UH");
       history.addCreator(mc);
       history.setCreatedDate(date);
       history.setModifiedDate(date);
       int i = S.setModelHistory(history);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       history = null;
 }
 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()) );
       }
       {
       }
 }
Пример #18
0
 public void prepend(ModelCreator item)
 {
     libsbmlPINVOKE.ModelCreatorList_prepend(swigCPtr, ModelCreator.getCPtr(item));
 }
Пример #19
0
 public void test_Model_setgetModelHistory()
 {
     M.setMetaId("_001");
       ModelHistory history = new  ModelHistory();
       ModelCreator mc = new  ModelCreator();
       Date date = new  Date(2005,12,30,12,15,45,1,2,0);
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       mc.setEmail( "*****@*****.**");
       mc.setOrganisation( "UH");
       history.addCreator(mc);
       history.setCreatedDate(date);
       history.setModifiedDate(date);
       assertTrue( M.isSetModelHistory() == false );
       M.setModelHistory(history);
       assertTrue( M.isSetModelHistory() == true );
       ModelCreator newMC = history.getCreator(0);
       assertTrue( newMC != null );
       assertTrue((  "Keating" == newMC.getFamilyName() ));
       assertTrue((  "Sarah" == newMC.getGivenName() ));
       assertTrue((  "*****@*****.**" == newMC.getEmail() ));
       assertTrue((  "UH" == newMC.getOrganisation() ));
       M.unsetModelHistory();
       assertTrue( M.isSetModelHistory() == false );
       history = null;
       mc = null;
 }
Пример #20
0
 public void test_SBase_unsetAnnotationWithModelHistory()
 {
     ModelHistory h = new ModelHistory ();
     ModelCreator c = new ModelCreator ();
     Date dc;
     Date dm;
     string annt = "<annotation>\n" + "  <test:test xmlns:test=\"http://test.org/test\">this is a test node</test:test>\n" + "</annotation>";
     string annt_with_modelhistory = "<annotation>\n" + "  <test:test xmlns:test=\"http://test.org/test\">this is a test node</test:test>\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>\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" + "            <vCard:EMAIL>[email protected]</vCard:EMAIL>\n" + "          </rdf:li>\n" + "        </rdf:Bag>\n" + "      </dc:creator>\n" + "      <dcterms:created rdf:parseType=\"Resource\">\n" + "        <dcterms:W3CDTF>2005-12-29T12:15:45+02:00</dcterms:W3CDTF>\n" + "      </dcterms:created>\n" + "      <dcterms:modified rdf:parseType=\"Resource\">\n" + "        <dcterms:W3CDTF>2005-12-30T12:15:45+02:00</dcterms:W3CDTF>\n" + "      </dcterms:modified>\n" + "    </rdf:Description>\n" + "  </rdf:RDF>\n" + "</annotation>";
     S.setAnnotation (annt);
     assertTrue (S.isSetAnnotation () == true);
     assertTrue ((annt == S.getAnnotationString ()));
     S.unsetAnnotation ();
     assertTrue (S.isSetAnnotation () == false);
     assertTrue (S.getAnnotation () == null);
     S.setAnnotation (annt);
     S.setMetaId ("_000001");
     c.setFamilyName ("Keating");
     c.setGivenName ("Sarah");
     c.setEmail ("*****@*****.**");
     h.addCreator (c);
     dc = new Date (2005, 12, 29, 12, 15, 45, 1, 2, 0);
     h.setCreatedDate (dc);
     dm = new Date (2005, 12, 30, 12, 15, 45, 1, 2, 0);
     h.setModifiedDate (dm);
     S.setModelHistory (h);
     assertTrue (S.isSetAnnotation () == true);
     assertTrue ((annt_with_modelhistory == S.getAnnotationString ()));
     S.unsetAnnotation ();
     assertTrue (S.isSetAnnotation () == false);
     assertTrue (S.getAnnotation () == null);
     c = null;
     h = null;
 }
Пример #21
0
 public void test_Validation_ModelHistory3()
 {
     ModelHistory mh = new ModelHistory();
       assertTrue( mh != null );
       assertEquals( false, (mh.hasRequiredAttributes()) );
       Date date = new Date(2007,12,30,12,15,45,1,2,0);
       mh.setCreatedDate(date);
       assertEquals( false, (mh.hasRequiredAttributes()) );
       mh.setModifiedDate(date);
       assertEquals( false, (mh.hasRequiredAttributes()) );
       ModelCreator mc = new ModelCreator();
       mc.setFamilyName("Keating");
       mh.addCreator(mc);
       assertEquals( false, (mh.hasRequiredAttributes()) );
       mh = null;
 }
Пример #22
0
 public void test_Validation_ModelCreator()
 {
     ModelCreator mc = new ModelCreator();
       assertTrue( mc != null );
       assertEquals( false, (mc.hasRequiredAttributes()) );
       mc.setEmail("k123");
       assertEquals( false, (mc.hasRequiredAttributes()) );
       mc.setFamilyName("Keating");
       assertEquals( false, (mc.hasRequiredAttributes()) );
       mc.setGivenName("Sarah");
       assertEquals( true, mc.hasRequiredAttributes() );
       mc = null;
 }
 public void test_SBase_setModelHistoryL3()
 {
     SBase sb = new Species(3,1);
       sb.setMetaId("_s");
       ModelHistory mh = new  ModelHistory();
       ModelCreator mc = new  ModelCreator();
       Date date = new  Date(2005,12,30,12,15,45,1,2,0);
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       mc.setEmail( "*****@*****.**");
       mc.setOrganisation( "UH");
       mh.addCreator(mc);
       mh.setCreatedDate(date);
       mh.setModifiedDate(date);
       int i = sb.setModelHistory(mh);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( sb.isSetModelHistory() == true );
       mh = sb.getModelHistory();
       assertTrue( mh != null );
       sb.unsetModelHistory();
       mh = sb.getModelHistory();
       assertTrue( sb.isSetModelHistory() == false );
       assertTrue( mh == null );
       mh = null;
 }
Пример #24
0
        int addCreator(ModelCreator mc)
        {
            int ret = libsbmlPINVOKE.ModelHistory_addCreator(swigCPtr, ModelCreator.getCPtr(mc));

            return(ret);
        }
Пример #25
0
 internal static HandleRef getCPtr(ModelCreator obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Пример #26
0
 public void test_ModelCreator_setters()
 {
     ModelCreator mc = new  ModelCreator();
       assertTrue( mc != null );
       assertTrue( mc.isSetFamilyName() == false );
       assertTrue( mc.isSetGivenName() == false );
       assertTrue( mc.isSetEmail() == false );
       assertTrue( mc.isSetOrganisation() == false );
       mc.setFamilyName( "Keating");
       mc.setGivenName( "Sarah");
       mc.setEmail( "*****@*****.**");
       mc.setOrganisation( "UH");
       assertTrue((  "Keating" == mc.getFamilyName() ));
       assertTrue((  "Sarah" == mc.getGivenName() ));
       assertTrue((  "*****@*****.**" == mc.getEmail() ));
       assertTrue((  "UH" == mc.getOrganisation() ));
       assertTrue( mc.isSetFamilyName() == true );
       assertTrue( mc.isSetGivenName() == true );
       assertTrue( mc.isSetEmail() == true );
       assertTrue( mc.isSetOrganisation() == true );
       mc.unsetFamilyName();
       mc.unsetGivenName();
       mc.unsetEmail();
       mc.unsetOrganisation();
       assertTrue((  "" == mc.getFamilyName() ));
       assertTrue((  "" == mc.getGivenName() ));
       assertTrue((  "" == mc.getEmail() ));
       assertTrue((  "" == mc.getOrganisation() ));
       assertTrue( mc.isSetFamilyName() == false );
       assertTrue( mc.isSetGivenName() == false );
       assertTrue( mc.isSetEmail() == false );
       assertTrue( mc.isSetOrganisation() == false );
       assertTrue( mc.isSetOrganization() == false );
       mc.setOrganization( "UH");
       assertTrue((  "UH" == mc.getOrganization() ));
       assertTrue( mc.isSetOrganization() == true );
       mc.unsetOrganisation();
       assertTrue((  "" == mc.getOrganization() ));
       assertTrue( mc.isSetOrganization() == false );
       mc = null;
 }
Пример #27
0
 /**
    * Copy constructor; creates a copy of the ModelCreator.
    *
    * @param orig the object to copy.
    */
 public ModelCreator(ModelCreator orig)
     : this(libsbmlPINVOKE.new_ModelCreator__SWIG_2(ModelCreator.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Пример #28
0
 public void test_ModelCreator_assignmentOperator()
 {
     ModelCreator mc = new ModelCreator();
       mc.setFamilyName("Keating");
       mc.setEmail("*****@*****.**");
       assertTrue( mc.getFamilyName() ==  "Keating" );
       assertTrue( mc.getEmail() ==  "*****@*****.**" );
       ModelCreator mc2 = new ModelCreator();
       mc2 = mc;
       assertTrue( mc2.getFamilyName() ==  "Keating" );
       assertTrue( mc2.getEmail() ==  "*****@*****.**" );
       mc2 = null;
       mc = null;
 }
 public void test_ModelCreator_setOrganization()
 {
     ModelCreator mc = new  ModelCreator();
       assertTrue( mc != null );
       int i = mc.setOrganization( "Caltech");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mc.isSetOrganization() == true );
       assertTrue((  "Caltech" == mc.getOrganization() ));
       i = mc.setOrganization( "");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mc.isSetOrganization() == false );
       i = mc.setOrganization( "Caltech");
       assertTrue( mc.isSetOrganization() == true );
       i = mc.unsetOrganization();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mc.isSetOrganization() == false );
       mc = null;
 }
Пример #30
0
 public void test_ModelCreator_copyConstructor()
 {
     ModelCreator mc = new ModelCreator();
       mc.setFamilyName("Keating");
       mc.setEmail("*****@*****.**");
       assertTrue( mc.getFamilyName() ==  "Keating" );
       assertTrue( mc.getEmail() ==  "*****@*****.**" );
       ModelCreator mc2 = new ModelCreator(mc);
       assertTrue( mc2.getFamilyName() ==  "Keating" );
       assertTrue( mc2.getEmail() ==  "*****@*****.**" );
       mc2 = null;
       mc = null;
 }
Пример #31
0
 internal static HandleRef getCPtr(ModelCreator obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
 public void test_RDFAnnotation2_modelWithHistoryWithCharacterReference()
 {
     ModelHistory h = new ModelHistory();
       ModelCreator c = new ModelCreator();
       c.setFamilyName("Dr&#228;ger");
       c.setGivenName("Andreas");
       h.addCreator(c);
       Date d = new Date(2005,2,2,14,56,11);
       h.setCreatedDate(d);
       h.addModifiedDate(d);
       m2.unsetModelHistory();
       m2.setModelHistory(h);
       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>Dr&#228;ger</vCard:Family>\n" +
     "              <vCard:Given>Andreas</vCard:Given>\n" +
     "            </vCard:N>\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>2005-02-02T14:56:11Z</dcterms:W3CDTF>\n" +
     "      </dcterms:modified>\n" +
     "    </rdf:Description>\n" +
     "  </rdf:RDF>\n" +
     "</annotation>";
       assertEquals( true, equals(expected,ann.toXMLString()) );
 }
Пример #33
0
 /**
    * Adds a copy of a ModelCreator object to the list of 'model creator'
    * values stored in this ModelHistory object.
    *
    * In the MIRIAM format for annotations, there can be multiple model
    * creators.  The libSBML ModelHistory class supports this by storing a
    * list of 'model creator' values.
    *
    * @param mc the ModelCreator to add
    *
    * @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 libsbmlcs#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
    * @li @link libsbmlcs#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
    * @li @link libsbmlcs#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
    */
 public int addCreator(ModelCreator mc)
 {
     int ret = libsbmlPINVOKE.ModelHistory_addCreator(swigCPtr, ModelCreator.getCPtr(mc));
     return ret;
 }
Пример #34
0
 public void test_ModelCreator_create()
 {
     ModelCreator mc = new  ModelCreator();
       assertTrue( mc != null );
       mc = null;
 }