Inheritance: IDisposable
示例#1
0
 ModelHistory(ModelHistory orig) : this(libsbmlPINVOKE.new_ModelHistory__SWIG_1(ModelHistory.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#2
0
        ModelHistory clone()
        {
            IntPtr       cPtr = libsbmlPINVOKE.ModelHistory_clone(swigCPtr);
            ModelHistory ret  = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, true);

            return(ret);
        }
        static ModelHistory parseRDFAnnotation(XMLNode annotation)
        {
            IntPtr       cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseRDFAnnotation__SWIG_2(XMLNode.getCPtr(annotation));
            ModelHistory ret  = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, false);

            return(ret);
        }
        static ModelHistory parseRDFAnnotation(XMLNode annotation, string metaId)
        {
            global::System.IntPtr cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseRDFAnnotation__SWIG_1(XMLNode.getCPtr(annotation), metaId);
            ModelHistory          ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ModelHistory(cPtr, false);

            return(ret);
        }
        static ModelHistory parseRDFAnnotation(XMLNode annotation, string metaId, XMLInputStream stream)
        {
            IntPtr       cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseRDFAnnotation__SWIG_0(XMLNode.getCPtr(annotation), metaId, XMLInputStream.getCPtr(stream));
            ModelHistory ret  = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, false);

            return(ret);
        }
 public void test_ModelHistory_addCreator3()
 {
     ModelHistory mh = new  ModelHistory();
       ModelCreator mc = null;
       int i = mh.addCreator(mc);
       assertTrue( i == libsbml.LIBSBML_OPERATION_FAILED );
       assertTrue( mh.getNumCreators() == 0 );
       mh = null;
 }
 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;
 }
 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;
 }
示例#9
0
        internal static HandleRef getCPtrAndDisown(ModelHistory obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

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

            return(ptr);
        }
 public void test_ModelHistory_setCreatedDate1()
 {
     ModelHistory mh = new  ModelHistory();
       assertTrue( mh != null );
       Date date = new  Date("2005-12-30T12:15:32+02:00");
       int i = mh.setCreatedDate(date);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mh.isSetCreatedDate() == true );
       assertTrue( date != mh.getCreatedDate() );
       string dateChar = mh.getCreatedDate().getDateAsString();
       assertTrue((  "2005-12-30T12:15:32+02:00" == dateChar ));
       i = mh.setCreatedDate(null);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( mh.isSetCreatedDate() == false );
       date = null;
       mh = null;
 }
示例#11
0
 public void test_Model_setModelHistory1()
 {
     ModelHistory mh = new  ModelHistory();
       int i = M.setModelHistory(mh);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertEquals( false, M.isSetModelHistory() );
       i = M.unsetModelHistory();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, M.isSetModelHistory() );
       mh = null;
 }
示例#12
0
 public void test_SBase_setModelHistory_Model()
 {
     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;
 }
示例#13
0
 /**
    * Sets the ModelHistory of this object.
    *
    * The content of @p history is copied, and this object's existing model
    * history content is deleted.
    *
    * @param history ModelHistory of this object.
    *
    *
  * @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 libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
    *
    * @note In SBML Level 2, model history annotations were only
    * permitted on the Model element.  In SBML Level 3, they are
    * permitted on all SBML components derived from SBase.
    */
 public int setModelHistory(ModelHistory history)
 {
     int ret = libsbmlPINVOKE.SBase_setModelHistory(swigCPtr, ModelHistory.getCPtr(history));
     return ret;
 }
示例#14
0
 public void test_ModelHistory_create()
 {
     ModelHistory history = new  ModelHistory();
       assertTrue( history != null );
       assertTrue( history.getListCreators() != null );
       assertTrue( history.getCreatedDate() == null );
       assertTrue( history.getModifiedDate() == null );
       history = null;
 }
示例#15
0
 public void test_ModelHistory_setModifiedDate()
 {
     ModelHistory history = new  ModelHistory();
       assertTrue( history != null );
       assertTrue( history.isSetModifiedDate() == false );
       Date date = new  Date(2005,12,30,12,15,45,1,2,0);
       history.setModifiedDate(date);
       date = null;
       assertTrue( history.isSetModifiedDate() == true );
       Date newdate = history.getModifiedDate();
       assertTrue( newdate.getYear() == 2005 );
       assertTrue( newdate.getMonth() == 12 );
       assertTrue( newdate.getDay() == 30 );
       assertTrue( newdate.getHour() == 12 );
       assertTrue( newdate.getMinute() == 15 );
       assertTrue( newdate.getSecond() == 45 );
       assertTrue( newdate.getSignOffset() == 1 );
       assertTrue( newdate.getHoursOffset() == 2 );
       assertTrue( newdate.getMinutesOffset() == 0 );
       history = null;
 }
示例#16
0
 public void test_L3_Species_ModelHistory()
 {
     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;
 }
 public void test_ModelHistory_setModifiedDate2()
 {
     ModelHistory mh = new  ModelHistory();
       assertTrue( mh != null );
       Date date = new  Date(200,13,76,56,89,90,0,0,0);
       int i = mh.setModifiedDate(date);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertTrue( mh.isSetModifiedDate() == false );
       date = null;
       mh = null;
 }
示例#18
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;
 }
示例#19
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;
 }
示例#20
0
 public void test_Model_setgetModelHistory()
 {
     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;
 }
示例#21
0
 public void test_SBase_setModelHistoryL3()
 {
     SBase sb = new Species(3,1);
       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;
 }
示例#22
0
 /**
    * Copy constructor; creates a copy of this ModelHistory object.
    *
    * @param orig the object to copy.
    */
 public ModelHistory(ModelHistory orig)
     : this(libsbmlPINVOKE.new_ModelHistory__SWIG_1(ModelHistory.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#23
0
 internal static HandleRef getCPtr(ModelHistory obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
示例#24
0
        internal static HandleRef getCPtrAndDisown(ModelHistory obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

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

            return ptr;
        }
示例#25
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()) );
       }
       {
       }
 }
示例#26
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;
 }
示例#27
0
 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()) );
 }
示例#28
0
 public void test_ModelHistory_addModifiedDate()
 {
     ModelHistory history = new  ModelHistory();
       assertTrue( history != null );
       assertTrue( history.isSetModifiedDate() == false );
       assertTrue( history.getNumModifiedDates() == 0 );
       Date date = new  Date(2005,12,30,12,15,45,1,2,0);
       history.addModifiedDate(date);
       date = null;
       assertTrue( history.getNumModifiedDates() == 1 );
       assertTrue( history.isSetModifiedDate() == true );
       Date newdate = history.getListModifiedDates().get(0);
       assertTrue( newdate.getYear() == 2005 );
       assertTrue( newdate.getMonth() == 12 );
       assertTrue( newdate.getDay() == 30 );
       assertTrue( newdate.getHour() == 12 );
       assertTrue( newdate.getMinute() == 15 );
       assertTrue( newdate.getSecond() == 45 );
       assertTrue( newdate.getSignOffset() == 1 );
       assertTrue( newdate.getHoursOffset() == 2 );
       assertTrue( newdate.getMinutesOffset() == 0 );
       Date date1 = new  Date(2008,11,2,16,42,40,1,2,0);
       history.addModifiedDate(date1);
       date1 = null;
       assertTrue( history.getNumModifiedDates() == 2 );
       assertTrue( history.isSetModifiedDate() == true );
       Date newdate1 = history.getModifiedDate(1);
       assertTrue( newdate1.getYear() == 2008 );
       assertTrue( newdate1.getMonth() == 11 );
       assertTrue( newdate1.getDay() == 2 );
       assertTrue( newdate1.getHour() == 16 );
       assertTrue( newdate1.getMinute() == 42 );
       assertTrue( newdate1.getSecond() == 40 );
       assertTrue( newdate1.getSignOffset() == 1 );
       assertTrue( newdate1.getHoursOffset() == 2 );
       assertTrue( newdate1.getMinutesOffset() == 0 );
       history = null;
 }
 public void test_ModelHistory_setCreatedDate2()
 {
     ModelHistory mh = new  ModelHistory();
       assertTrue( mh != null );
       Date date = new  Date("Jan 12");
       int i = mh.setCreatedDate(date);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertTrue( mh.isSetCreatedDate() == false );
       date = null;
       mh = null;
 }
示例#30
0
 internal static HandleRef getCPtr(ModelHistory obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
示例#31
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;
 }
示例#32
0
 public void test_SBase_setModelHistory()
 {
     SBase sb = new Species(2,4);
       ModelHistory mh = new  ModelHistory();
       int i = sb.setModelHistory(mh);
       assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
       mh = null;
 }