You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(121) |
Aug
(343) |
Sep
(98) |
Oct
(55) |
Nov
(158) |
Dec
(219) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(278) |
Feb
(170) |
Mar
(286) |
Apr
(32) |
May
(83) |
Jun
(140) |
Jul
(212) |
Aug
(242) |
Sep
(52) |
Oct
(29) |
Nov
(132) |
Dec
(259) |
| 2010 |
Jan
(251) |
Feb
(147) |
Mar
(76) |
Apr
(140) |
May
(43) |
Jun
(66) |
Jul
(273) |
Aug
(205) |
Sep
(260) |
Oct
(100) |
Nov
(58) |
Dec
(264) |
| 2011 |
Jan
(219) |
Feb
(344) |
Mar
(320) |
Apr
(334) |
May
(125) |
Jun
(131) |
Jul
(195) |
Aug
(155) |
Sep
(55) |
Oct
(261) |
Nov
(286) |
Dec
(216) |
| 2012 |
Jan
(188) |
Feb
(177) |
Mar
(39) |
Apr
(179) |
May
(148) |
Jun
(43) |
Jul
(229) |
Aug
(104) |
Sep
(76) |
Oct
(82) |
Nov
(93) |
Dec
(180) |
| 2013 |
Jan
(323) |
Feb
(335) |
Mar
(35) |
Apr
(220) |
May
(238) |
Jun
(122) |
Jul
(316) |
Aug
(73) |
Sep
(135) |
Oct
(515) |
Nov
(320) |
Dec
(185) |
| 2014 |
Jan
(81) |
Feb
(146) |
Mar
(337) |
Apr
(234) |
May
(112) |
Jun
(239) |
Jul
(323) |
Aug
(123) |
Sep
(83) |
Oct
(285) |
Nov
(321) |
Dec
(96) |
| 2015 |
Jan
(77) |
Feb
(79) |
Mar
(124) |
Apr
(71) |
May
(35) |
Jun
(45) |
Jul
(77) |
Aug
(44) |
Sep
(22) |
Oct
(84) |
Nov
(120) |
Dec
(37) |
| 2016 |
Jan
(38) |
Feb
(74) |
Mar
(242) |
Apr
(153) |
May
(59) |
Jun
(44) |
Jul
(67) |
Aug
(74) |
Sep
(150) |
Oct
(35) |
Nov
(69) |
Dec
(43) |
| 2017 |
Jan
(43) |
Feb
(9) |
Mar
(274) |
Apr
(40) |
May
(81) |
Jun
(81) |
Jul
(87) |
Aug
(46) |
Sep
(98) |
Oct
(50) |
Nov
(220) |
Dec
(66) |
| 2018 |
Jan
(110) |
Feb
(22) |
Mar
(20) |
Apr
(147) |
May
(148) |
Jun
(30) |
Jul
(83) |
Aug
(63) |
Sep
(40) |
Oct
(53) |
Nov
(51) |
Dec
(104) |
| 2019 |
Jan
(14) |
Feb
(81) |
Mar
(80) |
Apr
(102) |
May
(16) |
Jun
(5) |
Jul
(34) |
Aug
(24) |
Sep
(9) |
Oct
(12) |
Nov
(42) |
Dec
(76) |
| 2020 |
Jan
(15) |
Feb
(11) |
Mar
(12) |
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(3) |
2
|
|
3
|
4
|
5
(1) |
6
(3) |
7
(3) |
8
(10) |
9
(4) |
|
10
|
11
(3) |
12
|
13
|
14
(2) |
15
|
16
|
|
17
|
18
|
19
|
20
(1) |
21
|
22
(1) |
23
|
|
24
(1) |
25
|
26
(1) |
27
(1) |
28
(5) |
29
(4) |
30
|
|
From: <luc...@us...> - 2012-06-29 22:59:35
|
Revision: 15932
http://sbml.svn.sourceforge.net/sbml/?rev=15932&view=rev
Author: luciansmith
Date: 2012-06-29 22:59:29 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
Removed 'pop_back' since that's a c++11 thing (bah). Also, better handling of stringstream number parsing failure, which happens when reading a number with an 'e' after it, like "10e" (which *doesn't* happen with strings like "10x" for some dumb reason. Sigh.)
Modified Paths:
--------------
trunk/libsbml/src/sbml/math/L3Parser.cpp
trunk/libsbml/src/sbml/math/L3Parser.ypp
trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp
Modified: trunk/libsbml/src/sbml/math/L3Parser.cpp
===================================================================
--- trunk/libsbml/src/sbml/math/L3Parser.cpp 2012-06-29 14:35:30 UTC (rev 15931)
+++ trunk/libsbml/src/sbml/math/L3Parser.cpp 2012-06-29 22:59:29 UTC (rev 15932)
@@ -2280,6 +2280,32 @@
l3p->input.clear();
l3p->input.seekg(numbegin);
l3p->input >> number;
+ if (l3p->input.fail()) {
+ //The only reason I know of for this to happen is that there was a number followed by an 'e'.
+ l3p->input.clear(); //clear the error.
+ l3p->input.seekg(numbegin);
+ string failnum = "";
+ cc = l3p->input.get();
+ bool decimal = false;
+ while (l3p->input.good() && (isdigit(cc) || cc=='.')) {
+ failnum += cc;
+ cc = l3p->input.get();
+ }
+ if (cc=='e' || cc=='E') {
+ l3p->input.unget();
+ //We're going to call yylex recursively here, so we need to swap out l3p->input
+ streampos numend = l3p->input.tellg();
+ string tempinput = l3p->input.str();
+ l3p->input.str(failnum);
+ int ret = sbml_yylex();
+ l3p->input.str(tempinput);
+ l3p->input.clear();
+ l3p->input.seekg(numend);
+ return ret;
+ }
+ //Something weird went wrong; give up.
+ return -1;
+ }
streampos numend = l3p->input.tellg();
l3p->input.clear();
l3p->input.seekg(numbegin);
@@ -2304,13 +2330,13 @@
}
l3p->input.clear();
l3p->input.seekg(numbegin);
+ cc = l3p->input.get();
string mantissa = "";
while (l3p->input.tellg() != numend && (isdigit(cc) || cc=='.')) {
+ mantissa += cc;
cc = l3p->input.get();
- mantissa += cc;
}
if (cc=='e' || cc=='E') {
- mantissa.pop_back();
if (l3p->input.peek()=='+') {
cc = l3p->input.get();
}
Modified: trunk/libsbml/src/sbml/math/L3Parser.ypp
===================================================================
--- trunk/libsbml/src/sbml/math/L3Parser.ypp 2012-06-29 14:35:30 UTC (rev 15931)
+++ trunk/libsbml/src/sbml/math/L3Parser.ypp 2012-06-29 22:59:29 UTC (rev 15932)
@@ -538,6 +538,32 @@
l3p->input.clear();
l3p->input.seekg(numbegin);
l3p->input >> number;
+ if (l3p->input.fail()) {
+ //The only reason I know of for this to happen is that there was a number followed by an 'e'.
+ l3p->input.clear(); //clear the error.
+ l3p->input.seekg(numbegin);
+ string failnum = "";
+ cc = l3p->input.get();
+ bool decimal = false;
+ while (l3p->input.good() && (isdigit(cc) || cc=='.')) {
+ failnum += cc;
+ cc = l3p->input.get();
+ }
+ if (cc=='e' || cc=='E') {
+ l3p->input.unget();
+ //We're going to call yylex recursively here, so we need to swap out l3p->input
+ streampos numend = l3p->input.tellg();
+ string tempinput = l3p->input.str();
+ l3p->input.str(failnum);
+ int ret = sbml_yylex();
+ l3p->input.str(tempinput);
+ l3p->input.clear();
+ l3p->input.seekg(numend);
+ return ret;
+ }
+ //Something weird went wrong; give up.
+ return -1;
+ }
streampos numend = l3p->input.tellg();
l3p->input.clear();
l3p->input.seekg(numbegin);
@@ -562,13 +588,13 @@
}
l3p->input.clear();
l3p->input.seekg(numbegin);
+ cc = l3p->input.get();
string mantissa = "";
while (l3p->input.tellg() != numend && (isdigit(cc) || cc=='.')) {
+ mantissa += cc;
cc = l3p->input.get();
- mantissa += cc;
}
if (cc=='e' || cc=='E') {
- mantissa.pop_back();
if (l3p->input.peek()=='+') {
cc = l3p->input.get();
}
Modified: trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp
===================================================================
--- trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp 2012-06-29 14:35:30 UTC (rev 15931)
+++ trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp 2012-06-29 22:59:29 UTC (rev 15932)
@@ -1898,6 +1898,146 @@
END_TEST
+START_TEST (test_SBML_parseL3Formula_easunit)
+{
+ ASTNode_t *r = SBML_parseL3Formula("1.01e");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 1.01, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "e"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_easunitparen)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(1.01e)");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 1.01, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "e"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_easunitint)
+{
+ ASTNode_t *r = SBML_parseL3Formula("101e");
+
+ fail_unless( ASTNode_getType (r) == AST_INTEGER, NULL );
+ fail_unless( ASTNode_getInteger (r) == 101, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "e"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_ergunit)
+{
+ ASTNode_t *r = SBML_parseL3Formula("101erg");
+
+ fail_unless( ASTNode_getType (r) == AST_INTEGER, NULL );
+ fail_unless( ASTNode_getInteger (r) == 101, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "erg"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longinterg)
+{
+ ASTNode_t *r = SBML_parseL3Formula("166112956810631erg");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 166112956810631.0, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "erg"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longdecimalerg)
+{
+ ASTNode_t *r = SBML_parseL3Formula("0.00166112956810631erg");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 0.00166112956810631, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "erg"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longnumberparenerg)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(0.00166112956810631erg)");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 0.00166112956810631, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "erg"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_crazylongerg)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890erg)");
+
+ fail_unless( ASTNode_getType(r) == AST_REAL, NULL );
+ fail_unless( util_isInf(ASTNode_getReal(r)) == 1, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0, NULL );
+ fail_unless( !strcmp(ASTNode_getUnits(r), "erg"), NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_wrongnum)
+{
+ ASTNode_t *r = SBML_parseL3Formula("1.2.4");
+
+ fail_unless(r == NULL, NULL);
+ fail_unless( !strcmp(SBML_getLastParseL3Error(), "Error when parsing input '1.2.4' at position 5: syntax error, unexpected number"), NULL);
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_wrongnum2)
+{
+ ASTNode_t *r = SBML_parseL3Formula("1.2.");
+
+ fail_unless(r == NULL, NULL);
+ fail_unless( !strcmp(SBML_getLastParseL3Error(), "Error when parsing input '1.2.' at position 4: syntax error, unexpected $undefined"), NULL);
+}
+END_TEST
+
+
Suite *
create_suite_L3FormulaParser (void)
{
@@ -1977,6 +2117,16 @@
tcase_add_test( tcase, test_SBML_parseL3Formula_longdecimal);
tcase_add_test( tcase, test_SBML_parseL3Formula_longnumberparen);
tcase_add_test( tcase, test_SBML_parseL3Formula_crazylong);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_easunit);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_easunitparen);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_easunitint);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_ergunit);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longinterg);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longdecimalerg);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longnumberparenerg);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_crazylongerg);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_wrongnum);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_wrongnum2);
suite_add_tcase(suite, tcase);
return suite;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2012-06-29 14:35:41
|
Revision: 15931
http://sbml.svn.sourceforge.net/sbml/?rev=15931&view=rev
Author: niko-rodrigue
Date: 2012-06-29 14:35:30 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
removed some debug output that was still there and modified a bit the installer files + updated the ChangeLog to include a bit of things about the version 2.0
Modified Paths:
--------------
trunk/sbmleditor/ChangeLog
trunk/sbmleditor/TODO.txt
trunk/sbmleditor/build.xml
trunk/sbmleditor/installer/SBMLeditor-install.xml
trunk/sbmleditor/installer/runSBMLeditor.sh
trunk/sbmleditor/registerSBW.bat
trunk/sbmleditor/registerSBW.sh
trunk/sbmleditor/runSBMLeditor.bat
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/AddChildAction.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ParameterJDialog.java
Added Paths:
-----------
trunk/sbmleditor/lib/libsbmlj-5.5.0.jar
Modified: trunk/sbmleditor/ChangeLog
===================================================================
--- trunk/sbmleditor/ChangeLog 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/ChangeLog 2012-06-29 14:35:30 UTC (rev 15931)
@@ -1,5 +1,20 @@
# $Id: ChangeLog,v 1.9.2.9 2008/09/10 08:42:12 rodrigue Exp $
+version 2.0
+
+ Now SBMLeditor is using JSBML objects underneath, instead of DOM elements.
+
+ Added support for SBML level 3 version 1 core.
+
+ Miriam file updated, now elements extending SBase can be annotated.
+
+ Updated the data folder to include the fifteenth release of BioModels Database.
+
+ Added an option to hide some attributes.
+
+ Added some options to redefine the colors used in the math editor.
+
+
version 1.3.4
Added support for SBML level 2 version 4.
Modified: trunk/sbmleditor/TODO.txt
===================================================================
--- trunk/sbmleditor/TODO.txt 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/TODO.txt 2012-06-29 14:35:30 UTC (rev 15931)
@@ -5,17 +5,24 @@
needed :
---------
-
+ - update ChangeLog
+
- support for the identifiers.org URLs !!
- add back the conversion between levels and versions (try to add the SBFC converters)
- add SpeciesReference and Reaction to the possible tag type for mathML, rules, eventAssignment, ... for L3
-
+ - the display/hide menuitem does not seems to work for math and notes
+
+
can be left out :
-----------------
+ - the search seems to be going through all the attributes of a match element before going to the next hit !!
+
+ - search on the variable/symbol or ASTNode as well
+
- improve/complete/update the user guide
- remove or modify the edit annotation menuitem if there are no NonRDF annotation to edit !!??
@@ -44,7 +51,11 @@
- start a new model with LX VY, same for the conversion when we add it. Should create a new dialog with the different supported values.
-
+ - when adding back libSBML, add an option to tell if we want want to use a remote or local call for conversion and validation,
+ so that there is always the possibility to use the latest version of the online validator
+
+ - check that the SBW jar file is up to date and add a check for the $HOME/.sbw folder before trying to connect to SBW
+
-------------------------
If there is time
-------------------------
Modified: trunk/sbmleditor/build.xml
===================================================================
--- trunk/sbmleditor/build.xml 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/build.xml 2012-06-29 14:35:30 UTC (rev 15931)
@@ -22,7 +22,7 @@
<format property="YEAR" pattern="yyyy"/>
</tstamp>
<property name="Name" value="SBMLeditor"/>
- <property name="version" value="2.0-beta1"/>
+ <property name="version" value="2.0-b1"/>
<property name="year" value="${YEAR}"/>
<property name="name" value="SBMLeditor"/>
Modified: trunk/sbmleditor/installer/SBMLeditor-install.xml
===================================================================
--- trunk/sbmleditor/installer/SBMLeditor-install.xml 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/installer/SBMLeditor-install.xml 2012-06-29 14:35:30 UTC (rev 15931)
@@ -97,16 +97,21 @@
<fileset dir="lib" targetdir="$INSTALL_PATH/lib" excludes="libsbmlj.jar xercesImpl.jar xml-apis.jar xalan.jar">
<include name="*.jar"/>
</fileset>
+
+<!-- TODO : put back when we have libsbml-5.5.0
+ <file src="lib/libsbml-libxml2-4.0.0-1.i386" targetdir="$INSTALL_PATH/lib"/>
+ <file src="lib/libsbml-libxml2-4.0.0-1.x86_64" targetdir="$INSTALL_PATH/lib"/>
+ <file src="lib/libsbml-libxml2-4.0.0.macosx" targetdir="$INSTALL_PATH/lib"/>
<fileset dir="lib/libsbml-win32" targetdir="$INSTALL_PATH" os="windows">
<include name="*.dll"/>
<include name="*.exe"/>
</fileset>
- <file src="lib/libsbml-libxml2-4.0.0-1.i386" targetdir="$INSTALL_PATH/lib"/>
- <file src="lib/libsbml-libxml2-4.0.0-1.x86_64" targetdir="$INSTALL_PATH/lib"/>
- <file src="lib/libsbml-libxml2-4.0.0.macosx" targetdir="$INSTALL_PATH/lib"/>
+
+ -->
+
<fileset dir="doc" targetdir="$INSTALL_PATH/doc" excludes="**/.svn Readme.template SBMLeditorGuideExportHTML.txt SBMLeditorGuide.pdf">
</fileset>
- <parsable targetfile="$INSTALL_PATH/runSBMLeditor.sh" os="unix, macosx"/>
+ <parsable targetfile="$INSTALL_PATH/runSBMLeditor.sh" os="unix"/>
<executable targetfile="$INSTALL_PATH/runSBMLeditor.sh" stage="never" os="unix"/>
<executable targetfile="$INSTALL_PATH/registerSBW.sh" stage="never" os="unix"/>
</pack>
Modified: trunk/sbmleditor/installer/runSBMLeditor.sh
===================================================================
--- trunk/sbmleditor/installer/runSBMLeditor.sh 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/installer/runSBMLeditor.sh 2012-06-29 14:35:30 UTC (rev 15931)
@@ -37,9 +37,9 @@
JCOMPNEUR_CLASSPATH=./lib/compneur-2.1.jar
-CLASSPATH=./lib/xml-apis.jar:./lib/xercesImpl.jar:$SBML_CLASSPATH:./lib/SBWCore.jar:$JCOMPNEUR_CLASSPATH:lib/SBMLeditor.jar:./lib/log4j-1.2.15.jar
+CLASSPATH=./lib/jsbml-1.0-a1-20120628-with-dependencies.jar:$SBML_CLASSPATH:./lib/SBWCore.jar:$JCOMPNEUR_CLASSPATH:lib/SBMLeditor.jar:./lib/log4j-1.2.15.jar:./lib/libsbmlj-5.5.0.jar
-## add this parameter between java and -Xms128m if you want to have different properties files for each user
+## add this parameter between java and -Xms512m if you want to have different properties files for each user
## -DSBMLeditor.properties.dir="%HOMEDRIVE%%HOMEPATH%" under windows
## -DSBMLeditor.properties.dir=$HOME/.SBML under Linux/Mac
Added: trunk/sbmleditor/lib/libsbmlj-5.5.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/sbmleditor/lib/libsbmlj-5.5.0.jar
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/sbmleditor/registerSBW.bat
===================================================================
--- trunk/sbmleditor/registerSBW.bat 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/registerSBW.bat 2012-06-29 14:35:30 UTC (rev 15931)
@@ -1,6 +1,6 @@
@echo off
-set SBML_CLASSPATH=.\lib\xml-apis.jar;.\lib\xercesImpl.jar;.\lib\SBWCore.jar;.\lib\libsbmlj-3.1.x.jar;.\lib\libsbml-3.1.x-utils.jar
+set SBML_CLASSPATH=.\lib\jsbml-1.0-a1-20120628-with-dependencies.jar;.\lib\SBWCore.jar;.\lib\libsbmlj-5.5.0.jar
set JCOMPNEUR_CLASSPATH=.\lib\compneur-2.1.jar;.\lib\log4j-1.2.15.jar
Modified: trunk/sbmleditor/registerSBW.sh
===================================================================
--- trunk/sbmleditor/registerSBW.sh 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/registerSBW.sh 2012-06-29 14:35:30 UTC (rev 15931)
@@ -2,15 +2,13 @@
cd `dirname $0`
-XML_CLASSPATH=./lib/xml-apis.jar:./lib/xercesImpl.jar
-
JCOMPNEUR_CLASSPATH=./lib/compneur-2.1.jar
SBW_CLASSPATH=./lib/SBWCore.jar
COMMAND=java
-XML_CLASSPATH=$XML_CLASSPATH:./lib/libsbmlj-3.1.x.jar:./lib/libsbml-3.1.x-utils.jar
+XML_CLASSPATH=./lib/jsbml-1.0-a1-20120628-with-dependencies.jar:./lib/libsbmlj-5.5.0.jar
## libsbml configuration
## comment these lines or modify them if libsbml is installed somewhere else.
Modified: trunk/sbmleditor/runSBMLeditor.bat
===================================================================
--- trunk/sbmleditor/runSBMLeditor.bat 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/runSBMLeditor.bat 2012-06-29 14:35:30 UTC (rev 15931)
@@ -4,15 +4,15 @@
rem comment these lines or modify them if libsbml is installed somewhere else.
rem set LIBSBML_HOME=c:\Program Files\SBML\libsbml-4.0.0
-set LIBSBML_VERSION=4.0.0
+set LIBSBML_VERSION=5.5.0
rem end of libsbml configuration
-set SBML_CLASSPATH=.\lib\SBWCore.jar;.\lib\libsbmlj-%LIBSBML_VERSION%.jar;.\lib\libsbml-%LIBSBML_VERSION%-utils.jar
+set SBML_CLASSPATH=.\lib\jsbml-1.0-a1-20120628-with-dependencies.jar;.\lib\SBWCore.jar;.\lib\libsbmlj-%LIBSBML_VERSION%.jar
set JCOMPNEUR_CLASSPATH=.\lib\compneur-2.1.jar
-set SBFC_CLASSPATH=.\sbfc-launcher.jar
-set CLASSPATH=.\bin;.\lib\xml-apis.jar;.\lib\xercesImpl.jar;%SBFC_CLASSPATH%;%SBML_CLASSPATH%;%JCOMPNEUR_CLASSPATH%;.\lib\SBMLeditor.jar;.\lib\log4j-1.2.15.jar
+rem set SBFC_CLASSPATH=.\sbfc-launcher.jar rem %SBFC_CLASSPATH%;
+set CLASSPATH=%SBML_CLASSPATH%;%JCOMPNEUR_CLASSPATH%;.\lib\SBMLeditor.jar;.\lib\log4j-1.2.15.jar
rem add/modify/remove this parameter between java and -Xms512m if you do not want to have different properties files for each user
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java 2012-06-29 14:35:30 UTC (rev 15931)
@@ -73,7 +73,7 @@
@SuppressWarnings("deprecation")
public final class SBMLDocument {
- public static final boolean debug = true;
+ public static final boolean debug = false;
public static final int FUNCTION = 0;
public static final int UNIT_DEFINITION = 1;
@@ -783,7 +783,7 @@
*/
public Color getColorCode(String elementId, String reactionId) {
- System.out.println("SBMLDocument : getColorCode : " + this + " " + sbmlDocument);
+ SBMLDocument.debug("SBMLDocument : getColorCode : " + this + " " + sbmlDocument);
if (speciesColor == null) {
initColor();
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/AddChildAction.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/AddChildAction.java 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/AddChildAction.java 2012-06-29 14:35:30 UTC (rev 15931)
@@ -30,6 +30,7 @@
import org.sbml.jsbml.SBase;
import uk.ac.ebi.compneur.util.TemplatedAction;
+import uk.ac.ebi.sbml.editor.SBMLDocument;
import uk.ac.ebi.sbml.editor.SBMLDocumentJTree;
import uk.ac.ebi.sbml.editor.helper.SBMLElementFactory;
@@ -71,14 +72,10 @@
// We need to define the ActionEvent, with the tag name of the element to create.
// Then, we could use reflection on the parent to create the new element.
- System.out.println("AddChildAction : action event command = " + e.getActionCommand());
- System.out.println("AddChildAction : action childTagName = " + childTagName);
- System.out.println("AddChildAction : selectedNode name = " + selectedNode.toString());
-
-// if (e.getSource() instanceof SBase) {
-// SBase parentSB = (SBase) e.getSource();
-// }
- System.out.println("AddChildAction : action childTagName = " + userObject.equals(e.getSource()));
+ SBMLDocument.debug("AddChildAction : action event command = " + e.getActionCommand());
+ SBMLDocument.debug("AddChildAction : action childTagName = " + childTagName);
+ SBMLDocument.debug("AddChildAction : selectedNode name = " + selectedNode.toString());
+ SBMLDocument.debug("AddChildAction : action childTagName is as expected = " + userObject.equals(e.getSource()));
String selectedNodeName = selectedNode.toString();
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java 2012-06-29 14:35:30 UTC (rev 15931)
@@ -192,7 +192,7 @@
}
}
- System.out.println("CreateContextMenu : children check done ...");
+ SBMLDocument.debug("CreateContextMenu : children check done ...");
int nbElementMissing = 0;
JMenu addNewMenu = new JMenu("Add ...");
@@ -401,7 +401,7 @@
@SuppressWarnings("rawtypes")
private boolean isSet(SBase sbase, String childElementName) {
- System.out.println("CreateContextMenu : isSet : child name = " + childElementName);
+ SBMLDocument.debug("CreateContextMenu : isSet : child name = " + childElementName);
Enumeration children = sbase.children();
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java 2012-06-29 14:35:30 UTC (rev 15931)
@@ -166,12 +166,12 @@
for (; it.hasNext() ; ) {
String key = (String) it.next();
- SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : line = " + key);
+// SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : line = " + key);
int setNb = Integer.parseInt(key.split(" ")[1]);
String value = (String) attrHash.get(key);
- SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : value = " + value);
+// SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : value = " + value);
String[] values = value.split(" ");
String qualifier = values[0];
@@ -207,8 +207,8 @@
relationSet++; // increasing relationSet so that this block and the setQualifier block is done once per CVTerm
}
- SBMLDocument.debug("AnnotationJDialog : addRelationAttr : key, set, cSet = "
- + key + ", " + relationSet + ", " + setNb);
+// SBMLDocument.debug("AnnotationJDialog : addRelationAttr : key, set, cSet = "
+// + key + ", " + relationSet + ", " + setNb);
JPanel attributePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
attributePanel.setBackground(UIManager.getColor("Tree.textBackground"));
@@ -353,8 +353,6 @@
qualifier = cvterm.getModelQualifierType().getElementNameEquivalent();
}
- System.out.println("createReationMap : qualifier = " + qualifier);
-
int uriNum = 0;
for (String uri : cvterm.getResources()) {
relationsHash.put(qualifier + " " + setNum + " " + uriNum, qualifier + " " + uri);
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java 2012-06-29 14:35:30 UTC (rev 15931)
@@ -201,7 +201,7 @@
}
} else {
// set mathML text.
- kineticLaw.setMath(JSBML.readMathMLFromString(mathmlTextArea.getText()));
+ kineticLaw.setMath(JSBML.readMathMLFromString(mathmlTextArea.getText())); // TODO : try to use the method from stax.SBMLReader to set the parent of the mathML
}
if (sbmlLevel == 1 || (sbmlLevel == 2 && sbmlVersion == 1) ) {
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ParameterJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ParameterJDialog.java 2012-06-29 11:50:58 UTC (rev 15930)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ParameterJDialog.java 2012-06-29 14:35:30 UTC (rev 15931)
@@ -103,8 +103,8 @@
isLocalParam = true;
}
- System.out.println("ParameterJDialog : element = " + element);
- System.out.println("ParameterJDialog : parent = " + parent);
+ SBMLDocument.debug("ParameterJDialog : element = " + element);
+ SBMLDocument.debug("ParameterJDialog : parent = " + parent);
if (sbmlLevel != 1) {
String newId = getNewId(tagName);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2012-06-29 11:51:09
|
Revision: 15930
http://sbml.svn.sourceforge.net/sbml/?rev=15930&view=rev
Author: niko-rodrigue
Date: 2012-06-29 11:50:58 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
corrected the miriam uris display in the tree + set the new document to be in L3V1 and added a menuitem to create a L2V4 document
Modified Paths:
--------------
trunk/sbmleditor/TODO.txt
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java
Modified: trunk/sbmleditor/TODO.txt
===================================================================
--- trunk/sbmleditor/TODO.txt 2012-06-29 08:45:27 UTC (rev 15929)
+++ trunk/sbmleditor/TODO.txt 2012-06-29 11:50:58 UTC (rev 15930)
@@ -1,6 +1,4 @@
- - RDF panel in the tree seems to be messing around with qualifier and set !!
-
--------------------------
Can wait or go in a beta
--------------------------
@@ -44,6 +42,9 @@
- creation of metaid missing at the moment (do we need to do it ??)
+ - start a new model with LX VY, same for the conversion when we add it. Should create a new dialog with the different supported values.
+
+
-------------------------
If there is time
-------------------------
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java 2012-06-29 08:45:27 UTC (rev 15929)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java 2012-06-29 11:50:58 UTC (rev 15930)
@@ -279,10 +279,14 @@
JMenu menu = new JMenu("File");
menu.setMnemonic(KeyEvent.VK_F);
- JMenuItem menuItem = menu.add((Action) actions_.get("new - l2v4"));
+ JMenuItem menuItem = menu.add((Action) actions_.get("new - l3v1"));
menuItem.setMnemonic(KeyEvent.VK_N);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));
+ menuItem = menu.add((Action) actions_.get("new - l2v4"));
+ menuItem.setMnemonic(KeyEvent.VK_2);
+ menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_2, InputEvent.CTRL_DOWN_MASK));
+
menuItem = menu.add((Action) actions_.get("open"));
menuItem.setMnemonic(KeyEvent.VK_O);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK));
@@ -303,7 +307,7 @@
menuItem.setMnemonic(KeyEvent.VK_V);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK));
- // TODO : add it back when we have it back :-)
+ // TODO : add it back when we have it back :-) // add a convert to X,Y as well as a new X,Y
// if (SBMLUtilities.isLibSBMLAvailable()) {
//
// menuItem = menu.add((Action) actions_.get("convert_l2v4"));
@@ -447,7 +451,7 @@
tool_bar.setBorderPainted(true);
tool_bar.setFloatable(false);
tool_bar.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
- JButton button = tool_bar.add((Action) actions_.get("new - l2v4"));
+ JButton button = tool_bar.add((Action) actions_.get("new - l3v1"));
{
button.setText("");
button.setToolTipText("New");
@@ -527,12 +531,39 @@
actions_ = new HashMap<String, SBMLTemplatedAction>();
// New
- SBMLTemplatedAction action = new SBMLTemplatedAction("New",
+ SBMLTemplatedAction action = new SBMLTemplatedAction("New L3V1",
Main.imageIconMap.getImageIcon("new"), this) {
public void doAction(ActionEvent ae) throws Exception {
if (!killCurrentDocument()) {
return;
}
+ org.sbml.jsbml.SBMLDocument document = new org.sbml.jsbml.SBMLDocument(3, 1);
+ document.createModel("model");
+
+ documentFile = null;
+ document_tobesaved = false;
+ sbmlDocument = new SBMLDocument(document, false);
+ getJex().sbmlDocument = sbmlDocument;
+ getJex().sbmlEditor = documentJTree.getEditor();
+ getJex().getJexPane().doAction("Update SBML model");
+ getJex().getGJexFrame().setVisible(false);
+
+ documentJTree.setDocument(document);
+ documentJTree.setCellRenderer(new SBMLNodeTreeCellRenderer(Main.imageIconMap,
+ SBMLNodeValueProcessor.getInstance()));
+ editMenuListener.setSBMLDocumentJTree(documentJTree);
+
+ }
+ };
+ actions_.put("new - l3v1", action);
+
+ // New L2 V4
+ action = new SBMLTemplatedAction("New L2V4",
+ Main.imageIconMap.getImageIcon("new"), this) {
+ public void doAction(ActionEvent ae) throws Exception {
+ if (!killCurrentDocument()) {
+ return;
+ }
org.sbml.jsbml.SBMLDocument document = new org.sbml.jsbml.SBMLDocument(2, 4);
document.createModel("model");
@@ -553,7 +584,6 @@
};
actions_.put("new - l2v4", action);
-
// Open
action = new SBMLTemplatedAction("Open...", Main.imageIconMap.getImageIcon("open"), this) {
public void doAction(ActionEvent ae) throws Exception {
@@ -581,7 +611,7 @@
long validationErrors = 0;
- // TODO : validate
+ // validate
validationErrors = document.checkConsistency();
documentFile = file;
@@ -592,6 +622,7 @@
getJex().getJexPane().doAction("Update SBML model");
getJex().getGJexFrame().setVisible(false);
+ // TODO : we should show the whole error dialog to avoid having to validate twice ?
if (validationErrors > 0) {
CustomJDialogFacade.showErrorDialog(SBMLEditor.this,
"Your document contain some errors, correct them before saving, use File -> Validate to get details.",
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java 2012-06-29 08:45:27 UTC (rev 15929)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java 2012-06-29 11:50:58 UTC (rev 15930)
@@ -166,22 +166,32 @@
for (; it.hasNext() ; ) {
String key = (String) it.next();
- // SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : line = " + key);
+ SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : line = " + key);
int setNb = Integer.parseInt(key.split(" ")[1]);
String value = (String) attrHash.get(key);
- // SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : value = " + value);
+ SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : value = " + value);
String[] values = value.split(" ");
String qualifier = values[0];
String relation = " " + values[1];
- if (qualifier == null || !qualifier.equals(setQualifier)) {
- relationSet = 0;
+ if (relationSet == setNb) // This is the first time we encounter this set
+ {
+ setQualifier = key.split(" ")[0]; // setting the qualifier for this CVTerm ('set' of uris)
+ }
+
+ if (qualifier == null || !qualifier.equals(setQualifier))
+ {
+ SBMLDocument.debug("AnnotationJDialog : addRelationAttr() : WARNING problem with the set and qualifiers !!!!!");
+
+ relationSet = 0;
setQualifier = qualifier;
}
- if (relationSet == setNb) {
+
+ if (relationSet == setNb) // This is the first time we encounter this set
+ {
JPanel separatorPanel = new JPanel();
separatorPanel.setBackground(UIManager.getColor("Tree.textBackground"));
separatorPanel.setOpaque(false);
@@ -193,15 +203,16 @@
qualifierPanel.setOpaque(false);
qualifierPanel.add(new JLabel(" " + qualifier));
rdfPanel.add(qualifierPanel);
- relationSet++;
+
+ relationSet++; // increasing relationSet so that this block and the setQualifier block is done once per CVTerm
}
- //SBMLDocument.debug("AnnotationJDialog : addRelationAttr : key, set, cSet = "
- // + key + ", " + relationSet + ", " + setNb);
+ SBMLDocument.debug("AnnotationJDialog : addRelationAttr : key, set, cSet = "
+ + key + ", " + relationSet + ", " + setNb);
+
JPanel attributePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
attributePanel.setBackground(UIManager.getColor("Tree.textBackground"));
attributePanel.setOpaque(false); // JPanel is opaque by default.
-
// add the value JLabel
JLabel attributeValueLabel = new JLabel(relation);
@@ -267,28 +278,8 @@
//SBMLDocument.debug("AnnotationJDialog : addRelations called");
- HashMap<String, String> relationsHash = new HashMap<String, String>();
+ HashMap<String, String> relationsHash = createRelationMap(sbase);
- // populate the relation map
- int setNum = 0;
- for (CVTerm cvterm : sbase.getCVTerms()) {
- String qualifier = "is";
-
- if (cvterm.isBiologicalQualifier()) {
- qualifier = cvterm.getBiologicalQualifierType().getElementNameEquivalent();
- } else {
- qualifier = cvterm.getModelQualifierType().getElementNameEquivalent();
- }
-
- int uriNum = 0;
- for (String uri : cvterm.getResources()) {
- relationsHash.put(qualifier + " " + setNum + " " + uriNum, qualifier + " " + uri);
- uriNum++;
- }
-
- setNum++;
- }
-
if (relationsHash == null || relationsHash.size() == 0) {
return;
}
@@ -342,9 +333,14 @@
attributesPanel.add(attributePanel);
}
+
+ /**
+ * @param sbase
+ * @return
+ */
public static HashMap<String, String> createRelationMap(SBase sbase) {
- HashMap<String, String> relationsHash = new HashMap<String, String>();
+ HashMap<String, String> relationsHash = new LinkedHashMap<String, String>();
// populate the relation map
int setNum = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2012-06-29 08:45:34
|
Revision: 15929
http://sbml.svn.sourceforge.net/sbml/?rev=15929&view=rev
Author: sarahkeating
Date: 2012-06-29 08:45:27 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
merged changes from trunk
Modified Paths:
--------------
branches/libsbml-l2v5-l3v2/README.txt
branches/libsbml-l2v5-l3v2/src/sbml/SBMLErrorTable.h
branches/libsbml-l2v5-l3v2/src/sbml/annotation/RDFAnnotation.h
branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.cpp
branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.ypp
branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestL3FormulaParser.cpp
branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestRunner.c
Property Changed:
----------------
branches/libsbml-l2v5-l3v2/
Property changes on: branches/libsbml-l2v5-l3v2
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/L3Parser:15528-15625,15656-15673
/branches/libsbml-4:9056-10118
/branches/libsbml-5-conversion:14155-14227
+ /branches/L3Parser:15528-15625,15656-15673
/branches/libsbml-4:9056-10118
/branches/libsbml-5-conversion:14155-14227
/trunk/libsbml:15878-15928
Modified: branches/libsbml-l2v5-l3v2/README.txt
===================================================================
--- branches/libsbml-l2v5-l3v2/README.txt 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/README.txt 2012-06-29 08:45:27 UTC (rev 15929)
@@ -64,7 +64,7 @@
======================================================================
-1.1 Linux, MacOS X, FreeBSD, and Solaris
+2.1 Linux, MacOS X, FreeBSD, and Solaris
----------------------------------------
At the Unix command prompt, untar the distribution, cd into it (e.g.,
@@ -139,7 +139,7 @@
make uninstall
-1.2 Windows
+2.2 Windows
-----------
Download and run the self-extracting windows installer for libSBML.
@@ -154,7 +154,7 @@
runtime, respectively.
-2. INTRODUCTION
+3. INTRODUCTION
======================================================================
This README file describes libSBML, a library for reading, writing and
@@ -248,7 +248,7 @@
and closely reflects the actual API.
-3. DETAILED INSTRUCTIONS FOR CONFIGURING AND INSTALLING LIBSBML
+4. DETAILED INSTRUCTIONS FOR CONFIGURING AND INSTALLING LIBSBML
======================================================================
Detailed instructions for building and configuring libSBML are now
@@ -278,7 +278,7 @@
(4) docs/00README-ChangesInSBase.txt
-4. REPORTING BUGS AND OTHER PROBLEMS
+5. REPORTING BUGS AND OTHER PROBLEMS
======================================================================
We invite you to report bugs and other problems using the issue
@@ -294,7 +294,7 @@
libSBML developers can respond.
-5. MAILING LISTS
+6. MAILING LISTS
======================================================================
There are two kinds of mailing lists available: normal discussion
@@ -333,7 +333,7 @@
https://lists.sourceforge.net/lists/listinfo/sbml-svn
-6. LICENSING AND DISTRIBUTION
+7. LICENSING AND DISTRIBUTION
======================================================================
LibSBML incorporates a third-party software library, MiniZip
@@ -383,7 +383,7 @@
MA 02110-1301, USA.
-7. ACKNOWLEDGMENTS
+8. ACKNOWLEDGMENTS
======================================================================
This and other projects of the SBML Team have been supported by the
Modified: branches/libsbml-l2v5-l3v2/src/sbml/SBMLErrorTable.h
===================================================================
--- branches/libsbml-l2v5-l3v2/src/sbml/SBMLErrorTable.h 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/src/sbml/SBMLErrorTable.h 2012-06-29 08:45:27 UTC (rev 15929)
@@ -257,7 +257,7 @@
Category_* To be strictly in line with sbml specifications it should
* only allow semantics on csymbol until l2v3 rel 2
* BUT since no one ever applied it anyway I havent implemented
- * this as it would require a seperate rule that then
+ * this as it would require a separate rule that then
* reverted to this id
*/
DisallowedDefinitionURLUse,
@@ -8593,7 +8593,7 @@
LIBSBML_SEV_WARNING,
LIBSBML_SEV_WARNING,
LIBSBML_SEV_WARNING,
- "The SBOTerm used is not recognised by libSBML and therefore the correct "
+ "The SBOTerm used is not recognized by libSBML and therefore the correct "
"parentage cannot be checked. However, since libSBML is referring to a "
"snapshot of the SBO tree the term may now exist."
},
@@ -8630,7 +8630,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The 'spatialDimensions' attribute on <compartment> was not available "
- "in SBML Level 1. In order for the internal respresentation of a "
+ "in SBML Level 1. In order for the internal representation of a "
"<compartment> to be correct, the value for the spatialDimensions "
"member variable should be '3'."
},
@@ -8649,7 +8649,7 @@
LIBSBML_SEV_ERROR,
"The 'compartmentType' attribute on <compartment> was not available "
"in SBML Level 1 or SBML Level 2 Version 1. In order for the internal "
- "respresentation of a <compartment> to be correct, the value for the "
+ "representation of a <compartment> to be correct, the value for the "
"compartmentType member variable should be not be set."
},
@@ -8666,7 +8666,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The 'constant' attribute on <compartment> and <parameter> was not "
- "available in SBML Level 1. In order for the internal respresentation "
+ "available in SBML Level 1. In order for the internal representation "
"of <compartment> and <parameter> to be correct, the value for the "
"constant member variable should be 'false' if the <compartment> or "
"<parameter> is the variable of a <rule> otherwise it can be either "
@@ -8687,7 +8687,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
"The 'metaid' attribute on all <SBase> objects was not available "
"in SBML Level 1. In order for the internal "
- "respresentation to be correct, the value for the "
+ "representation to be correct, the value for the "
"'metaid' member variable should be not be set."
},
@@ -8707,7 +8707,7 @@
"<delay>, <species>, <speciesType>, <stoichiometryMath>, <trigger> "
"<unit> and <unitDefinition> was not available before SBML Level 2 "
"Version 3. In order for the internal "
- "respresentation of these components to be correct, the value for the "
+ "representation of these components to be correct, the value for the "
"sboTerm member variable should be '-1'."
},
@@ -8759,7 +8759,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_ERROR,
"The <compartmentType> component was introduced in SBML Level 2 Version "
- "2. In order for the internal respresentation of a <model> to "
+ "2. In order for the internal representation of a <model> to "
"be correct, the <listOfCompartmentTypes> component should be empty."
},
@@ -8776,7 +8776,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The <constraint> component was introduced in SBML Level 2 Version "
- "2. In order for the internal respresentation of a <model> to "
+ "2. In order for the internal representation of a <model> to "
"be correct, the <listOfConstraints> component should be empty."
},
@@ -8793,7 +8793,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The <event> component was introduced in SBML Level 2 Version "
- "1. In order for the internal respresentation of a <model> to "
+ "1. In order for the internal representation of a <model> to "
"be correct, the <listOfEvents> component should be empty."
},
@@ -8813,7 +8813,7 @@
"<functionDefinition>, <kineticLaw>, <model>, <parameter>, <reaction> "
"<rule> and <speciesReferenece> was not available before SBML Level 2 "
"Version 2. In order for the internal "
- "respresentation of these components to be correct, the value for the "
+ "representation of these components to be correct, the value for the "
"sboTerm member variable should be '-1'."
},
@@ -8830,7 +8830,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The <functionDefinition> component was introduced in SBML Level 2 Version "
- "1. In order for the internal respresentation of a <model> to "
+ "1. In order for the internal representation of a <model> to "
"be correct, the <listOfFunctionDefinitions> component should be empty."
},
@@ -8901,7 +8901,7 @@
"of <species> to be correct, the value for the "
"constant member variable should be 'false' if (1) the <species> is the "
"variable of a <rule> or (2) the 'boundaryCondition' attribute is 'false' "
- "and the <species> is a procduct/reactant in a <reaction>. Otherwise it "
+ "and the <species> is a product/reactant in a <reaction>. Otherwise it "
"can be either 'true' or 'false' without affecting the interpretation of "
"the model."
},
Modified: branches/libsbml-l2v5-l3v2/src/sbml/annotation/RDFAnnotation.h
===================================================================
--- branches/libsbml-l2v5-l3v2/src/sbml/annotation/RDFAnnotation.h 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/src/sbml/annotation/RDFAnnotation.h 2012-06-29 08:45:27 UTC (rev 15929)
@@ -26,6 +26,6 @@
* ------------------------------------------------------------------------ -->
*/
-// for backward compatability
+/* for backward compatability */
#include "RDFAnnotationParser.h"
Modified: branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.cpp
===================================================================
--- branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.cpp 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.cpp 2012-06-29 08:45:27 UTC (rev 15929)
@@ -2274,64 +2274,68 @@
if (isdigit(cc) || (cc=='.' && isdigit(l3p->input.peek()))) {
double number;
long numlong;
- bool isdouble = false;
l3p->input.unget();
- if (cc != '.') {
- l3p->input >> numlong;
+ streampos numbegin = l3p->input.tellg();
+ l3p->input >> numlong;
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ l3p->input >> number;
+ streampos numend = l3p->input.tellg();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ bool decimal = false;
+ bool e = false;
+ while (l3p->input.tellg() != numend) {
+ cc = l3p->input.get();
+ if (cc=='.') {
+ decimal = true;
+ }
+ if (cc=='e' || cc=='E') {
+ e = true;
+ }
}
- else {
- numlong = 0;
+ if (!decimal && !e && number == static_cast<double>(numlong)) {
+ sbml_yylval.numlong = numlong;
+ return INTEGER;
}
- if (l3p->input.peek() == '.') {
- isdouble = true;
- number = numlong;
- l3p->input.get();
- if (isdigit(l3p->input.peek())) {
- streampos numbegin = l3p->input.tellg();
- l3p->input >> numlong;
- streampos numend = l3p->input.tellg();
- if (numend < 0)
- numend = l3p->input.str().length();
- double fraction = numlong/pow(10.0, static_cast<long>(numend-numbegin));
- number += fraction;
- }
+ if (!e) {
+ sbml_yylval.numdouble = number;
+ return DOUBLE;
}
- if (l3p->input.peek() == 'e' || l3p->input.peek() == 'E') {
- l3p->input.get();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ string mantissa = "";
+ while (l3p->input.tellg() != numend && (isdigit(cc) || cc=='.')) {
cc = l3p->input.get();
- if (!(isdigit(cc) || cc=='-' || cc=='+')) {
- l3p->input.unget();
- l3p->input.unget();
+ mantissa += cc;
+ }
+ if (cc=='e' || cc=='E') {
+ mantissa.pop_back();
+ if (l3p->input.peek()=='+') {
+ cc = l3p->input.get();
}
- else {
- if (!isdouble) {
- //It is now!
- number = numlong;
- }
- bool isneg = false;
- if (cc=='-') {
- isneg = true;
- }
- else if (isdigit(cc)) {
- l3p->input.unget();
- }
- l3p->input >> numlong;
- if (isneg) {
- numlong = -numlong;
- }
- l3p->exponent = numlong;
- sbml_yylval.mantissa = number;
- return E_NOTATION;
+ bool isneg = false;
+ if (l3p->input.peek()=='-') {
+ cc = l3p->input.get();
+ isneg = true;
}
+ l3p->input >> numlong;
+ if (isneg) {
+ numlong = -numlong;
+ }
+ stringstream mantissastr;
+ mantissastr.str(mantissa);
+ mantissastr >> number;
+ l3p->exponent = numlong;
+ sbml_yylval.mantissa = number;
+ return E_NOTATION;
}
- if (isdouble) {
+ else {
+ assert(false); //How did this happen?
+ //This is an error condition, but parsing the value as a double should be sufficient.
sbml_yylval.numdouble = number;
return DOUBLE;
}
- else {
- sbml_yylval.numlong = numlong;
- return INTEGER;
- }
}
else if (cc=='(') {
streampos rationalbegin = l3p->input.tellg();
@@ -2357,6 +2361,7 @@
}
}
}
+ l3p->input.clear();
l3p->input.seekg(rationalbegin, ios::beg); // Not actually a rational number.
return '(';
}
Modified: branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.ypp
===================================================================
--- branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.ypp 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/src/sbml/math/L3Parser.ypp 2012-06-29 08:45:27 UTC (rev 15929)
@@ -532,64 +532,68 @@
if (isdigit(cc) || (cc=='.' && isdigit(l3p->input.peek()))) {
double number;
long numlong;
- bool isdouble = false;
l3p->input.unget();
- if (cc != '.') {
- l3p->input >> numlong;
+ streampos numbegin = l3p->input.tellg();
+ l3p->input >> numlong;
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ l3p->input >> number;
+ streampos numend = l3p->input.tellg();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ bool decimal = false;
+ bool e = false;
+ while (l3p->input.tellg() != numend) {
+ cc = l3p->input.get();
+ if (cc=='.') {
+ decimal = true;
+ }
+ if (cc=='e' || cc=='E') {
+ e = true;
+ }
}
- else {
- numlong = 0;
+ if (!decimal && !e && number == static_cast<double>(numlong)) {
+ sbml_yylval.numlong = numlong;
+ return INTEGER;
}
- if (l3p->input.peek() == '.') {
- isdouble = true;
- number = numlong;
- l3p->input.get();
- if (isdigit(l3p->input.peek())) {
- streampos numbegin = l3p->input.tellg();
- l3p->input >> numlong;
- streampos numend = l3p->input.tellg();
- if (numend < 0)
- numend = l3p->input.str().length();
- double fraction = numlong/pow(10.0, static_cast<long>(numend-numbegin));
- number += fraction;
- }
+ if (!e) {
+ sbml_yylval.numdouble = number;
+ return DOUBLE;
}
- if (l3p->input.peek() == 'e' || l3p->input.peek() == 'E') {
- l3p->input.get();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ string mantissa = "";
+ while (l3p->input.tellg() != numend && (isdigit(cc) || cc=='.')) {
cc = l3p->input.get();
- if (!(isdigit(cc) || cc=='-' || cc=='+')) {
- l3p->input.unget();
- l3p->input.unget();
+ mantissa += cc;
+ }
+ if (cc=='e' || cc=='E') {
+ mantissa.pop_back();
+ if (l3p->input.peek()=='+') {
+ cc = l3p->input.get();
}
- else {
- if (!isdouble) {
- //It is now!
- number = numlong;
- }
- bool isneg = false;
- if (cc=='-') {
- isneg = true;
- }
- else if (isdigit(cc)) {
- l3p->input.unget();
- }
- l3p->input >> numlong;
- if (isneg) {
- numlong = -numlong;
- }
- l3p->exponent = numlong;
- sbml_yylval.mantissa = number;
- return E_NOTATION;
+ bool isneg = false;
+ if (l3p->input.peek()=='-') {
+ cc = l3p->input.get();
+ isneg = true;
}
+ l3p->input >> numlong;
+ if (isneg) {
+ numlong = -numlong;
+ }
+ stringstream mantissastr;
+ mantissastr.str(mantissa);
+ mantissastr >> number;
+ l3p->exponent = numlong;
+ sbml_yylval.mantissa = number;
+ return E_NOTATION;
}
- if (isdouble) {
+ else {
+ assert(false); //How did this happen?
+ //This is an error condition, but parsing the value as a double should be sufficient.
sbml_yylval.numdouble = number;
return DOUBLE;
}
- else {
- sbml_yylval.numlong = numlong;
- return INTEGER;
- }
}
else if (cc=='(') {
streampos rationalbegin = l3p->input.tellg();
@@ -615,6 +619,7 @@
}
}
}
+ l3p->input.clear();
l3p->input.seekg(rationalbegin, ios::beg); // Not actually a rational number.
return '(';
}
Modified: branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestL3FormulaParser.cpp
===================================================================
--- branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestL3FormulaParser.cpp 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestL3FormulaParser.cpp 2012-06-29 08:45:27 UTC (rev 15929)
@@ -1842,6 +1842,62 @@
END_TEST
+START_TEST (test_SBML_parseL3Formula_longint)
+{
+ ASTNode_t *r = SBML_parseL3Formula("166112956810631");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 166112956810631.0, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longdecimal)
+{
+ ASTNode_t *r = SBML_parseL3Formula("0.00166112956810631");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 0.00166112956810631, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longnumberparen)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(0.00166112956810631)");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 0.00166112956810631, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_crazylong)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890)");
+
+ fail_unless( ASTNode_getType(r) == AST_REAL, NULL );
+ fail_unless( util_isInf(ASTNode_getReal(r)) == 1, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0, NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
Suite *
create_suite_L3FormulaParser (void)
{
@@ -1917,7 +1973,10 @@
tcase_add_test( tcase, test_SBML_parseL3Formula_avogadrosettings);
tcase_add_test( tcase, test_SBML_parseL3Formula_unitssettings);
tcase_add_test( tcase, test_SBML_parseL3Formula_power);
-
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longint);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longdecimal);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longnumberparen);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_crazylong);
suite_add_tcase(suite, tcase);
return suite;
Modified: branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestRunner.c
===================================================================
--- branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestRunner.c 2012-06-28 21:34:38 UTC (rev 15928)
+++ branches/libsbml-l2v5-l3v2/src/sbml/math/test/TestRunner.c 2012-06-29 08:45:27 UTC (rev 15929)
@@ -55,7 +55,7 @@
Suite *create_suite_ASTNode (void);
Suite *create_suite_FormulaFormatter (void);
Suite *create_suite_FormulaParser (void);
-//Suite *create_suite_L3FormulaParser (void);
+Suite *create_suite_L3FormulaParser (void);
Suite *create_suite_L3FormulaParserC (void);
Suite *create_suite_FormulaTokenizer (void);
Suite *create_suite_ReadMathML (void);
@@ -115,7 +115,7 @@
srunner_add_suite( runner, create_suite_FormulaFormatter () );
srunner_add_suite( runner, create_suite_FormulaParser () );
-// srunner_add_suite( runner, create_suite_L3FormulaParser () );
+ srunner_add_suite( runner, create_suite_L3FormulaParser () );
srunner_add_suite( runner, create_suite_L3FormulaParserC () );
srunner_add_suite( runner, create_suite_FormulaTokenizer () );
srunner_add_suite( runner, create_suite_ReadMathML () );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-28 21:34:44
|
Revision: 15928
http://sbml.svn.sourceforge.net/sbml/?rev=15928&view=rev
Author: mhucka
Date: 2012-06-28 21:34:38 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
The section numbering was all wrong.
Modified Paths:
--------------
trunk/libsbml/README.txt
Modified: trunk/libsbml/README.txt
===================================================================
--- trunk/libsbml/README.txt 2012-06-28 18:45:12 UTC (rev 15927)
+++ trunk/libsbml/README.txt 2012-06-28 21:34:38 UTC (rev 15928)
@@ -64,7 +64,7 @@
======================================================================
-1.1 Linux, MacOS X, FreeBSD, and Solaris
+2.1 Linux, MacOS X, FreeBSD, and Solaris
----------------------------------------
At the Unix command prompt, untar the distribution, cd into it (e.g.,
@@ -139,7 +139,7 @@
make uninstall
-1.2 Windows
+2.2 Windows
-----------
Download and run the self-extracting windows installer for libSBML.
@@ -154,7 +154,7 @@
runtime, respectively.
-2. INTRODUCTION
+3. INTRODUCTION
======================================================================
This README file describes libSBML, a library for reading, writing and
@@ -248,7 +248,7 @@
and closely reflects the actual API.
-3. DETAILED INSTRUCTIONS FOR CONFIGURING AND INSTALLING LIBSBML
+4. DETAILED INSTRUCTIONS FOR CONFIGURING AND INSTALLING LIBSBML
======================================================================
Detailed instructions for building and configuring libSBML are now
@@ -278,7 +278,7 @@
(4) docs/00README-ChangesInSBase.txt
-4. REPORTING BUGS AND OTHER PROBLEMS
+5. REPORTING BUGS AND OTHER PROBLEMS
======================================================================
We invite you to report bugs and other problems using the issue
@@ -294,7 +294,7 @@
libSBML developers can respond.
-5. MAILING LISTS
+6. MAILING LISTS
======================================================================
There are two kinds of mailing lists available: normal discussion
@@ -333,7 +333,7 @@
https://lists.sourceforge.net/lists/listinfo/sbml-svn
-6. LICENSING AND DISTRIBUTION
+7. LICENSING AND DISTRIBUTION
======================================================================
LibSBML incorporates a third-party software library, MiniZip
@@ -383,7 +383,7 @@
MA 02110-1301, USA.
-7. ACKNOWLEDGMENTS
+8. ACKNOWLEDGMENTS
======================================================================
This and other projects of the SBML Team have been supported by the
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-28 18:45:18
|
Revision: 15927
http://sbml.svn.sourceforge.net/sbml/?rev=15927&view=rev
Author: mhucka
Date: 2012-06-28 18:45:12 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
Saved slightly edited version of proposal, following comments by Sarah Keating.
Added Paths:
-----------
trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-28.pdf
trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-28.webarchive
Removed Paths:
-------------
trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.pdf
trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.webarchive
Deleted: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.pdf
===================================================================
(Binary files differ)
Deleted: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.webarchive
===================================================================
(Binary files differ)
Added: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-28.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-28.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-28.webarchive
===================================================================
(Binary files differ)
Property changes on: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-28.webarchive
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2012-06-28 16:39:05
|
Revision: 15926
http://sbml.svn.sourceforge.net/sbml/?rev=15926&view=rev
Author: niko-rodrigue
Date: 2012-06-28 16:38:56 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
Another batch of corrections. Almost everything working fine. Miriam export updated, addition of miriam annotation working fine, added an option to hide some attribute, added some options to change the color used in the math editor, ...
Modified Paths:
--------------
trunk/sbmleditor/TODO.txt
trunk/sbmleditor/build.xml
trunk/sbmleditor/doc/Readme.html
trunk/sbmleditor/installer/SBMLeditor-install.xml
trunk/sbmleditor/lib/libsbmlj.jar
trunk/sbmleditor/src/edu/ucla/sscnet/levine/jex/DefaultContext.java
trunk/sbmleditor/src/edu/ucla/sscnet/levine/jex/layout/MathBox.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJex.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJexPane.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/event/JexAddSBMLIdItemListener.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/parser/MathMLParser.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/Context.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLNodeTreeCellRenderer.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLSchema.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/AddChildAction.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/OpenSBMLElementJDialogAction.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/RelationRDFJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/RulesJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/VCardRDFJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/ListDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/SBMLUtilities.java
Added Paths:
-----------
trunk/sbmleditor/lib/jsbml-1.0-a1-20120628-with-dependencies.jar
trunk/sbmleditor/miriam-20120625.xml
Removed Paths:
-------------
trunk/sbmleditor/lib/jsbml-1.0-a1-20120517-with-dependencies.jar
trunk/sbmleditor/miriam-20091109.xml
Modified: trunk/sbmleditor/TODO.txt
===================================================================
--- trunk/sbmleditor/TODO.txt 2012-06-28 01:14:54 UTC (rev 15925)
+++ trunk/sbmleditor/TODO.txt 2012-06-28 16:38:56 UTC (rev 15926)
@@ -1,61 +1,79 @@
- - use the originalElement to obtain the MathML String to avoid warning about FunctionDefinition
+ - RDF panel in the tree seems to be messing around with qualifier and set !!
+
+--------------------------
+Can wait or go in a beta
+--------------------------
- - implement or remove the Empty action from SBMlDocumentJTree (menu item on ListOf)
+needed :
+---------
+
+ - support for the identifiers.org URLs !!
- - complexType JCombobox is sometime not updated, probably due to problem in the hashMap of the SBMLeditor.SBMLDocument
-
- add back the conversion between levels and versions (try to add the SBFC converters)
-
- - identifierException after trying to add twice a FunctionDefinition (with an error returned in between because of wrong math) (validate the math first)
- - creates miriam annotation not working
+ - add SpeciesReference and Reaction to the possible tag type for mathML, rules, eventAssignment, ... for L3
- - add SpeciesReference and Reaction to the possible tag type for mathML, rules, eventAssignment, ...
+
+can be left out :
+-----------------
- - display infix math only for MathContainer !! (Add an option to display mathML ??)
+ - improve/complete/update the user guide
- - check what to do to remove an element if the id is not defined !!! (for SpeciesRefence for ex)
+ - remove or modify the edit annotation menuitem if there are no NonRDF annotation to edit !!??
+
+ - check which unit kind are allowed in L3 (update the pseudo schema if needed)
- - check which unit kind are allowed in L3 (update the pseudo schema if needed)
+ - update copyright
- - creation of metaid missing at the moment (we could anyway decide not to display them in the tree !!)
+ - implement SBMLDocument.addMathContainerRef (the delete ref do not work but not a big problem)
+ - implement or remove the Empty action from SBMlDocumentJTree (menu item on ListOf)
+
+ - identifierException after trying to add twice a FunctionDefinition (with an error returned in between because of wrong math) (validate the math first)
+
+ - check what to do to remove an element if the id is not defined !!! (for SpeciesRefence for ex) (should be fine, using the equals method)
+
- update the links to the SBML specs in the javadoc
- - update copyright
-
- rename SBaseFilter as we are filtering any JSBML treenode objects
- - update the miriam qualifiers and export
-
- check that we put only valid id in the UnitJComboBox
+ - limit the size of the notes JPanel, if possible.
+
+ - creation of metaid missing at the moment (do we need to do it ??)
+
-------------------------
If there is time
-------------------------
+ - sbml properties file editor could be done with http://propedit.sourceforge.jp/index_en.html for people that have problem finding the file in the filesystem ?
+ A nice graphical editor would still be nice, in particular for the Colors.
+
+ - catch the parseException in the math editor to display a nice error message
+
- when editing a model element, the whole tree is rebuild as we do a deep clone of the model and replace it afterward in the tree. Not efficient for large models !!
- enforce non-optional L3 attributes ? (may be with an option only)
- set L2V4 defaults with a button or check box or option ??
- - transform urn into identifiers.org url and have a clickable link !!
+ - transform urn into identifiers.org url and have a click-able link !!
- see if this could be useful for html display : http://code.google.com/p/flying-saucer/
- - integrate the Biomodels.net converters
+ - integrate the SBFC converters
- support for SBML level 3 packages
- improved support for SBO : tree of the ontology with search,
- auto-completion on dialogs, access to SBO webservice...
+ auto-completion on dialogs (easy with JSBML), access to SBO webservice...
- write more documentation.
- Have a ColorChooser to customize the color inside the equation editor.
- - remove some validation tests if libSBML 3 or later is used.
+ - remove some validation tests if libSBML 3 or later is used or if JSBML is performing the test already.
- Display/Hide individual annotation/notes/math
@@ -64,4 +82,7 @@
- maintain a map to be able to hide/display specific ids (low priority) ??
-
\ No newline at end of file
+ - add the option to render mathML as an image, as we are doing for Biomodels DB
+
+ - save the preferred size of the main SBMLeditor windows, the math editor and the select file dialog.
+
\ No newline at end of file
Modified: trunk/sbmleditor/build.xml
===================================================================
--- trunk/sbmleditor/build.xml 2012-06-28 01:14:54 UTC (rev 15925)
+++ trunk/sbmleditor/build.xml 2012-06-28 16:38:56 UTC (rev 15926)
@@ -22,7 +22,7 @@
<format property="YEAR" pattern="yyyy"/>
</tstamp>
<property name="Name" value="SBMLeditor"/>
- <property name="version" value="2.0-dev"/>
+ <property name="version" value="2.0-beta1"/>
<property name="year" value="${YEAR}"/>
<property name="name" value="SBMLeditor"/>
@@ -70,10 +70,10 @@
<!-- <pathelement location="${jars.dir}/xml-apis.jar" />
<pathelement location="${jars.dir}/xercesImpl.jar" /> -->
<pathelement location="${jars.dir}/SBWCore.jar" />
-<!-- <pathelement location="${jars.dir}/libsbml-3.1.x-utils.jar" />
- <pathelement location="${jars.dir}/libsbmlj-3.1.x.jar" /> -->
+<!-- <pathelement location="${jars.dir}/libsbml-3.1.x-utils.jar" /> -->
+ <pathelement location="${jars.dir}/libsbmlj-5.5.0.jar" />
<pathelement location="${jars.dir}/log4j-1.2.15.jar" />
- <pathelement location="${jars.dir}/jsbml-0.8-b1-with-dependencies.jar" />
+ <pathelement location="${jars.dir}/jsbml-1.0-a1-20120628-with-dependencies.jar" />
</path>
</target>
Modified: trunk/sbmleditor/doc/Readme.html
===================================================================
--- trunk/sbmleditor/doc/Readme.html 2012-06-28 01:14:54 UTC (rev 15925)
+++ trunk/sbmleditor/doc/Readme.html 2012-06-28 16:38:56 UTC (rev 15926)
@@ -38,7 +38,7 @@
as a list instead of free text. This in turn speeds up the creation of the document and avoid any typing error. We also check before any element deletion that
it would not break a reference in the rest of the document.
</p><br/>
-<p>SBMLeditor is distributed under the <a href="http://http://www.gnu.org/licenses/licenses.html#GPL">General Public Licence</a>. Current version is [BUILD.NUMBER].</p>
+<p>SBMLeditor is distributed under the <a href="http://http://www.gnu.org/licenses/licenses.html#GPL">General Public Licence</a>. Current version is 2.0-beta1 (build 20120628-1731).</p>
<br/>
<p>
Once you unpack it you just have to type ./runSBMLeditor.sh (or runSBMLeditor.bat under windows) on the directory where you uncompressed the file to start the editor.
Modified: trunk/sbmleditor/installer/SBMLeditor-install.xml
===================================================================
--- trunk/sbmleditor/installer/SBMLeditor-install.xml 2012-06-28 01:14:54 UTC (rev 15925)
+++ trunk/sbmleditor/installer/SBMLeditor-install.xml 2012-06-28 16:38:56 UTC (rev 15926)
@@ -12,7 +12,7 @@
-->
<info>
<appname>SBMLeditor</appname>
- <appversion>1.3.4 (build 20091117-1621)</appversion>
+ <appversion>[BUILD.NUMBER]</appversion>
<appsubpath>SBML\SBMLeditor</appsubpath>
<authors>
<author name="Nicolas Rodriguez" email="rod...@eb..."/>
@@ -88,13 +88,13 @@
<description>The base files</description>
<file src="LICENSE" targetdir="$INSTALL_PATH"/>
<file src="ChangeLog" targetdir="$INSTALL_PATH"/>
- <file src="miriam-20091109.xml" targetdir="$INSTALL_PATH"/>
+ <file src="miriam-20120625.xml" targetdir="$INSTALL_PATH"/>
<file src="runSBMLeditor.bat" targetdir="$INSTALL_PATH" os="windows"/>
<file src="registerSBW.bat" targetdir="$INSTALL_PATH" os="windows"/>
<file src="registerSBW.sh" targetdir="$INSTALL_PATH" os="unix"/>
<file src="installer/runSBMLeditor.sh" targetdir="$INSTALL_PATH" os="unix"/>
<file src="installer/libsbml-installer-mini-logo.bmp" targetdir="$INSTALL_PATH/doc"/>
- <fileset dir="lib" targetdir="$INSTALL_PATH/lib" excludes="libsbmlj.jar libsbml-3.0.0-prerelease-utils.jar libsbmlj-3.0.0-prerelease.jar xercesImpl-2.9.1.jar">
+ <fileset dir="lib" targetdir="$INSTALL_PATH/lib" excludes="libsbmlj.jar xercesImpl.jar xml-apis.jar xalan.jar">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/libsbml-win32" targetdir="$INSTALL_PATH" os="windows">
Deleted: trunk/sbmleditor/lib/jsbml-1.0-a1-20120517-with-dependencies.jar
===================================================================
(Binary files differ)
Added: trunk/sbmleditor/lib/jsbml-1.0-a1-20120628-with-dependencies.jar
===================================================================
(Binary files differ)
Property changes on: trunk/sbmleditor/lib/jsbml-1.0-a1-20120628-with-dependencies.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/sbmleditor/lib/libsbmlj.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/miriam-20091109.xml
===================================================================
--- trunk/sbmleditor/miriam-20091109.xml 2012-06-28 01:14:54 UTC (rev 15925)
+++ trunk/sbmleditor/miriam-20091109.xml 2012-06-28 16:38:56 UTC (rev 15926)
@@ -1,2679 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- This file is an export of MIRIAM Database. -->
-<!-- cf. http://www.ebi.ac.uk/miriam/ -->
-<!-- Generated: Mon Nov 09 10:46:24 GMT 2009. -->
-
-<miriam xmlns="http://www.biomodels.net/MIRIAM/" date="2009-11-09T10:46:24+00:00" data-version="2009-10-20T16:47:13+01:00">
- <datatype id="MIR:00000001" pattern="^\d+$" obsolete="true" replacement="MIR:00000010">
- <comment>BIND doesn't exist any more and its successor (BOND) is not open-access.</comment>
- <name>BIND</name>
- <synonyms>
- <synonym>Biomolecular Interaction Network Database</synonym>
- <synonym>BOND</synonym>
- </synonyms>
- <definition>BIND is a database of protein-protein interactions. This data-resource is not open-access.</definition>
- <uris>
- <uri type="URN">urn:miriam:bind</uri>
- <uri type="URL" deprecated="true">http://www.bind.ca/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100008">
- <dataResource>http://www.bind.ca/</dataResource>
- <dataEntry>http://www.bind.ca/Action?identifier=bindid&idsearch=$id</dataEntry>
- <dataInfo>BIND (Biomolecular Interaction Network Database)</dataInfo>
- <dataInstitution>Unleashed Informatics</dataInstitution>
- <dataLocation>Canada</dataLocation>
- </resource>
- </resources>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>rule</element>
- <element>reaction</element>
- <element>event</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000002" pattern="^CHEBI:\d+$">
- <name>ChEBI</name>
- <definition>Chemical Entities of Biological Interest (ChEBI) is a freely available dictionary of molecular entities focused on 'small' chemical compounds.</definition>
- <uris>
- <uri type="URN">urn:miriam:obo.chebi</uri>
- <uri type="URL" deprecated="true">http://www.ebi.ac.uk/chebi/</uri>
- </uris>
- <documentations>
- <documentation type="URL">http://www3.oup.co.uk/nar/database/summary/646</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100009">
- <dataResource>http://www.ebi.ac.uk/chebi/</dataResource>
- <dataEntityExample>CHEBI:36927</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/chebi/searchFreeText.do?searchString=$id</dataEntry>
- <dataInfo>ChEBI (Chemical Entities of Biological Interest)</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>chemical</tag>
- <tag>ontology</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000003" pattern="^ENS[A-Z]*[FPTG]\d{11}$">
- <name>Ensembl</name>
- <definition>Ensembl is a joint project between EMBL - EBI and the Sanger Institute to develop a software system which produces and maintains automatic annotation on selected eukaryotic genomes.</definition>
- <uris>
- <uri type="URN">urn:miriam:ensembl</uri>
- <uri type="URL" deprecated="true">http://www.ensembl.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16381931</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100011">
- <dataResource>http://www.ensembl.org/</dataResource>
- <dataEntityExample>ENSG00000139618</dataEntityExample>
- <dataEntry>http://www.ensembl.org/Homo_sapiens/Search/Results?species=all;q=$id</dataEntry>
- <dataInfo>Ensembl</dataInfo>
- <dataInstitution>Sanger Institute and European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>eukaryotic</tag>
- <tag>genome</tag>
- <tag>nucleotide</tag>
- <tag>sequence</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000004" pattern="^\d+\.-\.-\.-|\d+\.\d+\.-\.-|\d+\.\d+\.\d+\.-|\d+\.\d+\.\d+\.\d+$">
- <name>Enzyme Nomenclature</name>
- <synonyms>
- <synonym>EC code</synonym>
- <synonym>Enzyme Classification</synonym>
- <synonym>EC</synonym>
- </synonyms>
- <definition>The Enzyme Classification contains the recommendations of the Nomenclature Committee of the International Union of Biochemistry and Molecular Biology on the nomenclature and classification of enzyme-catalysed reactions.</definition>
- <uris>
- <uri type="URN">urn:miriam:ec-code</uri>
- <uri type="URL" deprecated="true">http://www.ec-code.org/</uri>
- <uri type="URN" deprecated="true">urn:lsid:ec-code.org</uri>
- <uri type="URL" deprecated="true">http://www.ebi.ac.uk/IntEnz/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:10812475</documentation>
- <documentation type="URL">http://www.chem.qmul.ac.uk/iubmb/enzyme/</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100001">
- <dataResource>http://www.ebi.ac.uk/intenz/</dataResource>
- <dataEntityExample>1.1.1.1</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/intenz/query?cmd=SearchEC&ec=$id</dataEntry>
- <dataInfo>IntEnZ (Integrated relational Enzyme database)</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100002">
- <dataResource>http://www.genome.jp/dbget-bin/www_bfind?enzyme</dataResource>
- <dataEntityExample>1.1.1.1</dataEntityExample>
- <dataEntry>http://www.genome.jp/dbget-bin/www_bget?ec:$id</dataEntry>
- <dataInfo>KEGG Ligand Database for Enzyme Nomenclature</dataInfo>
- <dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
- <dataLocation>Japan</dataLocation>
- </resource>
- <resource id="MIR:00100003">
- <dataResource>http://us.expasy.org/enzyme/</dataResource>
- <dataEntityExample>1.1.1.1</dataEntityExample>
- <dataEntry>http://us.expasy.org/cgi-bin/nicezyme.pl?$id</dataEntry>
- <dataInfo>Enzyme nomenclature database, ExPASy (Expert Protein Analysis System)</dataInfo>
- <dataInstitution>Swiss Institute of Bioinformatics</dataInstitution>
- <dataLocation>Switzerland</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>enzyme</tag>
- <tag>taxonomy</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>reaction</element>
- <element>event</element>
- <element>rule</element>
- </elements>
- </format>
- <format name="CellML">
- <elements>
- <element>component</element>
- <element>reaction</element>
- </elements>
- </format>
- <format name="BioPAX">
- <elements>
- <element>catalysis</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000005" pattern="^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])$">
- <name>UniProt</name>
- <synonyms>
- <synonym>UniProtKB</synonym>
- </synonyms>
- <definition>UniProt (Universal Protein Resource) is the world's most comprehensive catalog of information on proteins. It is a central repository of protein sequence and function created by joining the information contained in Swiss-Prot, TrEMBL, and PIR.</definition>
- <uris>
- <uri type="URN">urn:miriam:uniprot</uri>
- <uri type="URN" deprecated="true">urn:lsid:uniprot.org:uniprot</uri>
- <uri type="URL" deprecated="true">http://www.uniprot.org/</uri>
- <uri type="URN" deprecated="true">urn:lsid:uniprot.org</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16381842</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100004">
- <dataResource>http://www.ebi.uniprot.org/</dataResource>
- <dataEntityExample>P62158</dataEntityExample>
- <dataEntry>http://www.ebi.uniprot.org/entry/$id</dataEntry>
- <dataInfo>Universal Protein Resource</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100027">
- <dataResource>http://www.pir.uniprot.org/</dataResource>
- <dataEntityExample>P62158</dataEntityExample>
- <dataEntry>http://www.pir.uniprot.org/cgi-bin/upEntry?id=$id</dataEntry>
- <dataInfo>Universal Protein Resource</dataInfo>
- <dataInstitution>Georgetown University</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100031">
- <dataResource>http://www.expasy.uniprot.org/</dataResource>
- <dataEntityExample>P62158</dataEntityExample>
- <dataEntry>http://us.expasy.org/uniprot/$id</dataEntry>
- <dataInfo>Universal Protein Resource, ExPASy (Expert Protein Analysis System)</dataInfo>
- <dataInstitution>Swiss Institute of Bioinformatics</dataInstitution>
- <dataLocation>Switzerland</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>protein</tag>
- <tag>sequence</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>speciesType</element>
- <element>parameter</element>
- </elements>
- </format>
- <format name="BioPAX">
- <elements>
- <element>physicalEntity</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000006" pattern="^\d+$">
- <name>Taxonomy</name>
- <definition>The taxonomy contains the relationships between all living forms for which nucleic acid or protein sequence have been determined.</definition>
- <uris>
- <uri type="URN">urn:miriam:taxonomy</uri>
- <uri type="URL" deprecated="true">http://www.ncbi.nlm.nih.gov/Taxonomy/</uri>
- <uri type="URL" deprecated="true">http://www.taxonomy.org/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100007">
- <dataResource>http://www.ncbi.nlm.nih.gov/Taxonomy/</dataResource>
- <dataEntityExample>9606</dataEntityExample>
- <dataEntry>http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=$id</dataEntry>
- <dataInfo>Taxonomy</dataInfo>
- <dataInstitution>National Center for Biotechnology Information</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100019">
- <dataResource>http://beta.uniprot.org/taxonomy/</dataResource>
- <dataEntityExample>9606</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/newt/display?search=$id</dataEntry>
- <dataInfo>NEWT, Taxonomy database</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>taxonomy</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000007" pattern="^(BIOMD|MODEL)\d{10}$">
- <name>BioModels Database</name>
- <synonyms>
- <synonym>BioModels</synonym>
- </synonyms>
- <definition>BioModels Database is a data resource that allows biologists to store, search and retrieve published mathematical models of biological interests.</definition>
- <uris>
- <uri type="URN">urn:miriam:biomodels.db</uri>
- <uri type="URL" deprecated="true">http://www.ebi.ac.uk/biomodels/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16381960</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100006">
- <dataResource>http://www.ebi.ac.uk/biomodels/</dataResource>
- <dataEntityExample>BIOMD0000000048</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/biomodels-main/$id</dataEntry>
- <dataInfo>BioModels, a Database of Annotated Published Models</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100107">
- <dataResource>http://biomodels.caltech.edu/</dataResource>
- <dataEntityExample>BIOMD0000000048</dataEntityExample>
- <dataEntry>http://biomodels.caltech.edu/$id</dataEntry>
- <dataInfo>Mirror of BioModels Database</dataInfo>
- <dataInstitution>California Institute of Technology</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>model</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000008" pattern="^MIR:\d{8}$">
- <name>MIRIAM Resources</name>
- <synonyms>
- <synonym>MIRIAM</synonym>
- </synonyms>
- <definition>MIRIAM Resources is an online resource created to catalogue the data-types (Gene Ontology, Taxonomy or PubMed are some examples), their URIs and the corresponding physical URLs, whether these are controlled vocabularies or databases.</definition>
- <uris>
- <uri type="URN">urn:miriam:miriam</uri>
- <uri type="URL" deprecated="true">http://www.biomodels.net/MIRIAM/</uri>
- <uri type="URL" deprecated="true">http://biomodels.net/MIRIAM/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16333295</documentation>
- <documentation type="PMID">urn:miriam:pubmed:18078503</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100005">
- <dataResource>http://www.ebi.ac.uk/miriam/</dataResource>
- <dataEntityExample>MIR:00000008</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/miriam/main/$id</dataEntry>
- <dataInfo>MIRIAM Resources</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>registry</tag>
- </tags>
- </datatype>
-
- <datatype id="MIR:00000009" pattern="^[A-Z]\d+(\.[-\d+])?$">
- <name>ICD</name>
- <definition>The International Classification of Diseases is the international standard diagnostic classification for all general epidemiological and many health management purposes.</definition>
- <uris>
- <uri type="URN">urn:miriam:icd</uri>
- <uri type="URL" deprecated="true">http://www.who.int/classifications/icd/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100016">
- <dataResource>http://www.who.int/classifications/icd/en/</dataResource>
- <dataEntityExample>A012</dataEntityExample>
- <dataEntry>http://www.who.int/classifications/apps/icd/icd10online/index.htm?ga00.htm+$id</dataEntry>
- <dataInfo>International Statistical Classification of Diseases and Related Health Problems</dataInfo>
- <dataInstitution>German Institute of Medical Documentation and Information</dataInstitution>
- <dataLocation>Germany</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>disease</tag>
- <tag>taxonomy</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000010" pattern="^EBI\-[0-9]+$">
- <name>IntAct</name>
- <definition>IntAct provides a freely available, open source database system and analysis tools for protein interaction data.</definition>
- <uris>
- <uri type="URN">urn:miriam:intact</uri>
- <uri type="URL" deprecated="true">http://www.ebi.ac.uk/intact/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:14681455</documentation>
- <documentation type="PMID">urn:miriam:pubmed:17145710</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100017">
- <dataResource>http://www.ebi.ac.uk/intact/</dataResource>
- <dataEntityExample>EBI-2307691</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/intact/pages/details/details.xhtml?interactionAc=$id</dataEntry>
- <dataInfo> IntAct</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>interaction</tag>
- <tag>protein</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>reaction</element>
- <element>event</element>
- <element>rule</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000011" pattern="^IPR\d{6}$">
- <name>InterPro</name>
- <definition>InterPro is a database of protein families, domains and functional sites in which identifiable features found in known proteins can be applied to unknown protein sequences.</definition>
- <uris>
- <uri type="URN">urn:miriam:interpro</uri>
- <uri type="URL" deprecated="true">http://www.ebi.ac.uk/interpro/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:15608177</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100018">
- <dataResource>http://www.ebi.ac.uk/interpro/</dataResource>
- <dataEntityExample>IPR000100</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/interpro/DisplayIproEntry?ac=$id</dataEntry>
- <dataInfo>InterPro</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>domain</tag>
- <tag>protein</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000012" pattern="^\w{2,3}\d{5}$">
- <name>KEGG Pathway</name>
- <definition>KEGG PATHWAY is a collection of manually drawn pathway maps representing our knowledge on the molecular interaction and reaction networks.</definition>
- <uris>
- <uri type="URN">urn:miriam:kegg.pathway</uri>
- <uri type="URL" deprecated="true">http://www.genome.jp/kegg/pathway/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100020">
- <dataResource>http://www.genome.jp/kegg/pathway.html</dataResource>
- <dataEntityExample>hsa00620</dataEntityExample>
- <dataEntry>http://www.genome.ad.jp/dbget-bin/www_bget?pathway+$id</dataEntry>
- <dataInfo>KEGG PATHWAY Database</dataInfo>
- <dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
- <dataLocation>Japan</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>pathway</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- <element>rule</element>
- <element>reaction</element>
- <element>event</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000013" pattern="^C\d+$">
- <name>KEGG Compound</name>
- <definition>KEGG compound contains our knowledge on the universe of chemical substances that are relevant to life.</definition>
- <uris>
- <uri type="URN">urn:miriam:kegg.compound</uri>
- <uri type="URL" deprecated="true">http://www.genome.jp/kegg/compound/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100021">
- <dataResource>http://www.genome.jp/kegg/ligand.html</dataResource>
- <dataEntityExample>C12345</dataEntityExample>
- <dataEntry>http://www.genome.jp/dbget-bin/www_bget?cpd:$id</dataEntry>
- <dataInfo>KEGG LIGAND Database</dataInfo>
- <dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
- <dataLocation>Japan</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>chemical</tag>
- <tag>structure</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000014" pattern="^R\d+$">
- <name>KEGG Reaction</name>
- <definition>KEGG reaction contains our knowledge on the universe of reactions that are relevant to life.</definition>
- <uris>
- <uri type="URN">urn:miriam:kegg.reaction</uri>
- <uri type="URL" deprecated="true">http://www.genome.jp/kegg/reaction/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100022">
- <dataResource>http://www.genome.jp/kegg/ligand.html</dataResource>
- <dataEntityExample>R00100</dataEntityExample>
- <dataEntry>http://www.genome.jp/dbget-bin/www_bget?rn:$id</dataEntry>
- <dataInfo>KEGG LIGAND Database</dataInfo>
- <dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
- <dataLocation>Japan</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>reaction</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>reaction</element>
- <element>event</element>
- <element>rule</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000015" pattern="^\d+$">
- <name>PubMed</name>
- <definition>PubMed is a service of the U.S. National Library of Medicine that includes citations from MEDLINE and other life science journals for biomedical articles back to the 1950s.</definition>
- <uris>
- <uri type="URN">urn:miriam:pubmed</uri>
- <uri type="URL" deprecated="true">http://www.ncbi.nlm.nih.gov/PubMed/</uri>
- <uri type="URL" deprecated="true">http://www.pubmed.gov/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16381840</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100023">
- <dataResource>http://www.ncbi.nlm.nih.gov/PubMed/</dataResource>
- <dataEntityExample>16333295</dataEntityExample>
- <dataEntry>http://www.ncbi.nlm.nih.gov/pubmed/$id</dataEntry>
- <dataInfo>free digital archive of biomedical and life sciences journal literature</dataInfo>
- <dataInstitution>National Center for Biotechnology Information</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100028">
- <dataResource>http://www.ebi.ac.uk/Databases/MEDLINE/medline.html</dataResource>
- <dataEntityExample>16333295</dataEntityExample>
- <dataEntry>http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-view+MedlineFull+[medline-PMID:$id]</dataEntry>
- <dataInfo>SRS@EBI</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100032">
- <dataResource>http://www.ebi.ac.uk/citexplore/</dataResource>
- <dataEntityExample>16333295</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/citexplore/citationDetails.do?dataSource=MED&externalId=$id</dataEntry>
- <dataInfo>CiteXplore</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100064">
- <dataResource>http://www.hubmed.org/</dataResource>
- <dataEntityExample>16333295</dataEntityExample>
- <dataEntry>http://www.hubmed.org/display.cgi?uids=$id</dataEntry>
- <dataInfo>HubMed</dataInfo>
- <dataInstitution>Alfred D. Eaton</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>bibliography</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000016" pattern="^[*#+%^]?\d{6}$">
- <name>OMIM</name>
- <synonyms>
- <synonym>Online Mendelian Inheritance in Man</synonym>
- </synonyms>
- <definition>Online Mendelian Inheritance in Man is a catalog of human genes and genetic disorders.</definition>
- <uris>
- <uri type="URN">urn:miriam:omim</uri>
- <uri type="URL" deprecated="true">http://www.ncbi.nlm.nih.gov/OMIM/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:15608251</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100024">
- <dataResource>http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=OMIM</dataResource>
- <dataEntityExample>603903</dataEntityExample>
- <dataEntry>http://www.ncbi.nih.gov/entrez/dispomim.cgi?id=$id</dataEntry>
- <dataInfo>Online Mendelian Inheritance in Man(tm)</dataInfo>
- <dataInstitution>National Center for Biotechnology Information</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>disorder</tag>
- <tag>human</tag>
- <tag>phenotype</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000017" pattern="^PIRSF\d{6}$">
- <name>PIRSF</name>
- <definition>The PIR SuperFamily concept is being used as a guiding principle to provide comprehensive and non-overlapping clustering of UniProtKB sequences into a hierarchical order to reflect their evolutionary relationships.</definition>
- <uris>
- <uri type="URN">urn:miriam:pirsf</uri>
- <uri type="URL" deprecated="true">http://pir.georgetown.edu/pirsf/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:14681371</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100025">
- <dataResource>http://pir.georgetown.edu/pirsf/</dataResource>
- <dataEntityExample>PIRSF000100</dataEntityExample>
- <dataEntry>http://pir.georgetown.edu/cgi-bin/ipcSF?id=$id</dataEntry>
- <dataInfo>PIRSF</dataInfo>
- <dataInstitution>Georgetown University Medical Center</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>clustering</tag>
- <tag>protein</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000018" pattern="^REACT_\d+(\.\d+)?$">
- <name>Reactome</name>
- <definition>The Reactome project is a collaboration to develop a curated resource of core pathways and reactions in human biology.</definition>
- <uris>
- <uri type="URN">urn:miriam:reactome</uri>
- <uri type="URL" deprecated="true">http://www.reactome.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:15608231</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100026">
- <dataResource>http://www.reactome.org/</dataResource>
- <dataEntityExample>REACT_1590</dataEntityExample>
- <dataEntry>http://www.reactome.org/cgi-bin/eventbrowser_st_id?FROM_REACTOME=1&ST_ID=$id</dataEntry>
- <dataInfo>Reactome, a curated knowledgebase of biological pathways</dataInfo>
- <dataInstitution>Cold Spring Harbor Laboratory and European Bioinformatics Institute</dataInstitution>
- <dataLocation>USA / United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>human</tag>
- <tag>pathway</tag>
- <tag>reaction</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- <element>rule</element>
- <element>reaction</element>
- <element>event</element>
- <element>species</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000019" pattern="^(doi\:)?\d{2}\.\d{4}/.*$">
- <name>DOI</name>
- <synonyms>
- <synonym>Digital Object Identifier</synonym>
- </synonyms>
- <definition>The Digital Object Identifier System is for identifying content objects in the digital environment.</definition>
- <uris>
- <uri type="URN">urn:miriam:doi</uri>
- <uri type="URL" deprecated="true">http://www.doi.org/</uri>
- </uris>
- <resources>
- <resource id="MIR:00100010">
- <dataResource>http://www.doi.org/</dataResource>
- <dataEntityExample>10.1038/nbt1156</dataEntityExample>
- <dataEntry>http://dx.doi.org/$id</dataEntry>
- <dataInfo>Digital Object Identifier</dataInfo>
- <dataInstitution>International DOI Foundation</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100065">
- <dataResource>http://www.handle.net/index.html</dataResource>
- <dataEntityExample>10.1038/nbt1156</dataEntityExample>
- <dataEntry>http://hdl.handle.net/$id</dataEntry>
- <dataInfo>CNRI DOI Resolver</dataInfo>
- <dataInstitution>Corporation for National Research Initiatives</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>bibliography</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000020" pattern="^\d[0..9a..zA..Z]{3}$">
- <name>Protein Data Bank</name>
- <synonyms>
- <synonym>PDB</synonym>
- </synonyms>
- <definition>The Protein Data Bank is the single worldwide archive of structural data of biological macromolecules.</definition>
- <uris>
- <uri type="URN">urn:miriam:pdb</uri>
- <uri type="URL" deprecated="true">http://www.pdb.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:10592235</documentation>
- <documentation type="PMID">urn:miriam:pubmed:17142228</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100029">
- <dataResource>http://www.pdb.org/</dataResource>
- <dataEntityExample>2GC4</dataEntityExample>
- <dataEntry>http://www.rcsb.org/pdb/explore/explore.do?structureId=$id</dataEntry>
- <dataInfo>RCSB PDB</dataInfo>
- <dataInstitution>Rutgers, The State University of New Jersey</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100037">
- <dataResource>http://www.ebi.ac.uk/pdbe/</dataResource>
- <dataEntityExample>2GC4</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/pdbe-srv/view/entry/$id</dataEntry>
- <dataInfo>Protein Databank in Europe (PDBe)</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100096">
- <dataResource>http://www.proteopedia.org/</dataResource>
- <dataEntityExample>2gc4</dataEntityExample>
- <dataEntry>http://proteopedia.org/wiki/index.php/$id</dataEntry>
- <dataInfo>Proteopedia</dataInfo>
- <dataInstitution>Weizmann Institute of Science</dataInstitution>
- <dataLocation>Israel</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>protein</tag>
- <tag>structure</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000021" pattern="^[0-9A-Za-z]+:\d+:\d{1,5}(\.\d)?$">
- <name>CluSTr</name>
- <definition>The CluSTr database offers an automatic classification of UniProt Knowledgebase and IPI proteins into groups of related proteins. The clustering is based on analysis of all pairwise comparisons (Smith-Waterman) between protein sequences.</definition>
- <uris>
- <uri type="URN">urn:miriam:clustr</uri>
- <uri type="URL" deprecated="true">http://www.ebi.ac.uk/clustr/</uri>
- </uris>
- <documentations>
- <documentation type="URL">http://www.ebi.ac.uk/clustr/documentation.html</documentation>
- <documentation type="PMID">urn:miriam:pubmed:15961444</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100030">
- <dataResource>http://www.ebi.ac.uk/clustr/</dataResource>
- <dataEntityExample>HUMAN:55140:308.6</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/clustr-srv/CCluster?interpro=yes&cluster_varid=$id</dataEntry>
- <dataInfo>CluSTr Database</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>clustering</tag>
- <tag>protein</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000022" pattern="^GO:\d{7}$">
- <name>Gene Ontology</name>
- <synonyms>
- <synonym>GO</synonym>
- </synonyms>
- <definition>The Gene Ontology project provides a controlled vocabulary to describe gene and gene product attributes in any organism.</definition>
- <uris>
- <uri type="URN">urn:miriam:obo.go</uri>
- <uri type="URL" deprecated="true">http://www.geneontology.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:14681407</documentation>
- <documentation type="PMID">urn:miriam:pubmed:10802651</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100012">
- <dataResource>http://www.ebi.ac.uk/ego/</dataResource>
- <dataEntityExample>GO:0006915</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/ego/GTerm?id=$id</dataEntry>
- <dataInfo>QuickGO (Gene Ontology browser)</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100013">
- <dataResource>http://www.godatabase.org/cgi-bin/amigo/go.cgi</dataResource>
- <dataEntityExample>GO:0006915</dataEntityExample>
- <dataEntry>http://www.godatabase.org/cgi-bin/amigo/go.cgi?view=details&query=$id</dataEntry>
- <dataInfo>AmiGO</dataInfo>
- <dataInstitution>The Gene Ontology Consortium</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100014">
- <dataResource>http://ep.ebi.ac.uk/EP/GO/</dataResource>
- <dataEntityExample>GO:0006915</dataEntityExample>
- <dataEntry>http://www.bioinf.ebc.ee/EP/EP/GO/?Q=$id</dataEntry>
- <dataInfo>EP:GO, Browser and analysis for Gene Ontology</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100015">
- <dataResource>http://www.informatics.jax.org/searches/GO_form.shtml</dataResource>
- <dataEntityExample>GO:0006915</dataEntityExample>
- <dataEntry>http://www.informatics.jax.org/searches/GO.cgi?id=$id</dataEntry>
- <dataInfo>GO Browser</dataInfo>
- <dataInstitution>The Jackson Laboratory</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>ontology</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>model</element>
- <element>compartment</element>
- <element>species</element>
- <element>rule</element>
- <element>reaction</element>
- <element>event</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000023" pattern="^S\d+$">
- <name>SGD</name>
- <synonyms>
- <synonym>Saccharomyces Genome Database</synonym>
- </synonyms>
- <definition>The Saccharomyces Genome Database (SGD) project collects information and maintains a database of the molecular biology of the yeast Saccharomyces cerevisiae.</definition>
- <uris>
- <uri type="URN">urn:miriam:sgd</uri>
- <uri type="URL" deprecated="true">http://www.yeastgenome.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:14681421</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100033">
- <dataResource>http://www.yeastgenome.org/</dataResource>
- <dataEntityExample>S000028457</dataEntityExample>
- <dataEntry>http://db.yeastgenome.org/cgi-bin/locus.pl?dbid=$id</dataEntry>
- <dataInfo>SGD</dataInfo>
- <dataInstitution>Stanford University</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>eukaryotic</tag>
- <tag>genome</tag>
- <tag>nucleotide</tag>
- </tags>
- <annotation>
- <format name="SBML">
- <elements>
- <element>species</element>
- <element>parameter</element>
- </elements>
- </format>
- </annotation>
- </datatype>
-
- <datatype id="MIR:00000024" pattern="^SBO:\d{7}$">
- <name>Systems Biology Ontology</name>
- <synonyms>
- <synonym>SBO</synonym>
- </synonyms>
- <definition>The goal of the Systems Biology Ontology is to develop controlled vocabularies and ontologies tailored specifically for the kinds of problems being faced in Systems Biology, especially in the context of computational modeling. SBO is a project of the BioModels.net effort.</definition>
- <uris>
- <uri type="URN">urn:miriam:obo.sbo</uri>
- <uri type="URL" deprecated="true">http://www.biomodels.net/SBO/</uri>
- <uri type="URL" deprecated="true">http://biomodels.net/SBO/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:17118155</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100034">
- <dataResource>http://www.ebi.ac.uk/sbo/</dataResource>
- <dataEntityExample>SBO:0000262</dataEntityExample>
- <dataEntry>http://www.ebi.ac.uk/sbo/main/entry.do?sboId=$id</dataEntry>
- <dataInfo>SBO</dataInfo>
- <dataInstitution>European Bioinformatics Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>ontology</tag>
- </tags>
- </datatype>
-
- <datatype id="MIR:00000025" pattern="^D\d+$">
- <name>KEGG Drug</name>
- <definition>KEGG DRUG contains chemical structures of drugs and additional information such as therapeutic categories and target molecules.</definition>
- <uris>
- <uri type="URN">urn:miriam:kegg.drug</uri>
- <uri type="URL" deprecated="true">http://www.genome.jp/kegg/drug/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16381885</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100035">
- <dataResource>http://www.genome.jp/kegg/drug/</dataResource>
- <dataEntityExample>D00123</dataEntityExample>
- <dataEntry>http://www.genome.jp/dbget-bin/www_bget?dr:$id</dataEntry>
- <dataInfo>KEGG DRUG Database</dataInfo>
- <dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
- <dataLocation>Japan</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>drug</tag>
- <tag>structure</tag>
- </tags>
- </datatype>
-
- <datatype id="MIR:00000026" pattern="^G\d+$">
- <name>KEGG Glycan</name>
- <definition>KEGG GLYCAN, a part of the KEGG LIGAND database, is a collection of experimentally determined glycan structures. It contains all unique structures taken from CarbBank, structures entered from recent publications, and structures present in KEGG pathways.</definition>
- <uris>
- <uri type="URN">urn:miriam:kegg.glycan</uri>
- <uri type="URL" deprecated="true">http://www.genome.jp/kegg/glycan/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:16014746</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100036">
- <dataResource>http://www.genome.jp/kegg/glycan/</dataResource>
- <dataEntityExample>G00123</dataEntityExample>
- <dataEntry>http://www.genome.jp/dbget-bin/www_bget?gl:$id</dataEntry>
- <dataInfo>KEGG GLYCAN Database</dataInfo>
- <dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
- <dataLocation>Japan</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>structure</tag>
- </tags>
- </datatype>
-
- <datatype id="MIR:00000027" pattern="^WBGene\d{8}$">
- <name>WormBase</name>
- <definition>WormBase is an online bioinformatics database of the biology and genome of the model organism Caenorhabditis elegans and related nematodes. It is used by the C. elegans research community both as an information resource and as a mode to publish and distribute their results.</definition>
- <uris>
- <uri type="URN">urn:miriam:wormbase</uri>
- <uri type="URL" deprecated="true">http://www.wormbase.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:11125056</documentation>
- <documentation type="PMID">urn:miriam:pubmed:17099234</documentation>
- <documentation type="PMID">urn:miriam:pubmed:17099225</documentation>
- <documentation type="PMID">urn:miriam:pubmed:16988424</documentation>
- <documentation type="PMID">urn:miriam:pubmed:16381915</documentation>
- <documentation type="PMID">urn:miriam:pubmed:16232125</documentation>
- <documentation type="PMID">urn:miriam:pubmed:15608221</documentation>
- <documentation type="PMID">urn:miriam:pubmed:15489338</documentation>
- <documentation type="PMID">urn:miriam:pubmed:14681445</documentation>
- <documentation type="PMID">urn:miriam:pubmed:12519966</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100038">
- <dataResource>http://www.wormbase.org/</dataResource>
- <dataEntityExample>WBGene00000001</dataEntityExample>
- <dataEntry>http://www.wormbase.org/db/gene/gene?name=$id;class=Gene</dataEntry>
- <dataInfo>WormBase (Master)</dataInfo>
- <dataInstitution>Cold Spring Harbor Laboratory</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100039">
- <dataResource>http://wormbase.sanger.ac.uk/</dataResource>
- <dataEntityExample>WBGene00000001</dataEntityExample>
- <dataEntry>http://wormbase.sanger.ac.uk/db/gene/gene?name=$id;class=Gene</dataEntry>
- <dataInfo>Sanger WormBase Mirror</dataInfo>
- <dataInstitution>Wellcome Trust Sanger Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100040">
- <dataResource>http://imbb.wormbase.org/</dataResource>
- <dataEntityExample>WBGene00000001</dataEntityExample>
- <dataEntry>http://imbb.wormbase.org/db/gene/gene?name=$id;class=Gene</dataEntry>
- <dataInfo>WormBase Mirror in Crete</dataInfo>
- <dataInstitution>Institute of Molecular Biology and Biotechnology</dataInstitution>
- <dataLocation>Greece</dataLocation>
- </resource>
- <resource id="MIR:00100041">
- <dataResource>http://caltech.wormbase.org/</dataResource>
- <dataEntityExample>WBGene00000001</dataEntityExample>
- <dataEntry>http://caltech.wormbase.org/db/gene/gene?name=$id;class=Gene</dataEntry>
- <dataInfo>Caltech WormBase Mirror</dataInfo>
- <dataInstitution>California Institute of Technology</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100042">
- <dataResource>http://crfb-3.univ-mrs.fr/</dataResource>
- <dataEntityExample>WBGene00000001</dataEntityExample>
- <dataEntry>http://crfb-3.univ-mrs.fr/db/gene/gene?name=$id;class=Gene</dataEntry>
- <dataInfo>WormBase Mirror at Marseille-Nice Genopole</dataInfo>
- <dataInstitution>Marseille-Nice Genopole</dataInstitution>
- <dataLocation>France</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>expression</tag>
- <tag>genome</tag>
- <tag>nucleotide</tag>
- <tag>protein</tag>
- </tags>
- </datatype>
-
- <datatype id="MIR:00000028" pattern="^PF\d{5}$">
- <name>Pfam</name>
- <synonyms>
- <synonym>Protein Family Database</synonym>
- </synonyms>
- <definition>The Pfam database contains information about protein domains and families. For each entry a protein sequence alignment and a Hidden Markov Model is stored.</definition>
- <uris>
- <uri type="URN">urn:miriam:pfam</uri>
- <uri type="URL" deprecated="true">http://pfam.org/</uri>
- </uris>
- <documentations>
- <documentation type="PMID">urn:miriam:pubmed:9223186</documentation>
- <documentation type="PMID">urn:miriam:pubmed:9399864</documentation>
- <documentation type="PMID">urn:miriam:pubmed:10592242</documentation>
- <documentation type="PMID">urn:miriam:pubmed:11752314</documentation>
- <documentation type="PMID">urn:miriam:pubmed:14681378</documentation>
- <documentation type="PMID">urn:miriam:pubmed:9847196</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100043">
- <dataResource>http://pfam.sanger.ac.uk/</dataResource>
- <dataEntityExample>PF01234</dataEntityExample>
- <dataEntry>http://pfam.sanger.ac.uk/family?entry=$id</dataEntry>
- <dataInfo>Sanger Pfam Mirror</dataInfo>
- <dataInstitution>Wellcome Trust Sanger Institute</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>
- <resource id="MIR:00100044">
- <dataResource>http://pfam.sbc.su.se/</dataResource>
- <dataEntityExample>PF01234</dataEntityExample>
- <dataEntry>http://pfam.sbc.su.se/family?entry=$id</dataEntry>
- <dataInfo>Sweden Pfam Mirror</dataInfo>
- <dataInstitution>Karolinska Institutet</dataInstitution>
- <dataLocation>Sweden</dataLocation>
- </resource>
- <resource id="MIR:00100045">
- <dataResource>http://pfam.janelia.org/</dataResource>
- <dataEntityExample>PF01234</dataEntityExample>
- <dataEntry>http://pfam.janelia.org/family?entry=$id</dataEntry>
- <dataInfo>Janelia Farm Research Campus Pfam Mirror</dataInfo>
- <dataInstitution>Howard Hughes Medical Institute</dataInstitution>
- <dataLocation>USA</dataLocation>
- </resource>
- <resource id="MIR:00100046" obsolete="true">
- <dataResource>http://pfam.jouy.inra.fr/</dataResource>
- <dataEntityExample>PF01234</dataEntityExample>
- <dataEntry>http://pfam.jouy.inra.fr/cgi-bin/getdesc?acc=$id</dataEntry>
- <dataInfo>INRA Pfam Mirror</dataInfo>
- <dataInstitution>Institut National de la Recherche Agronomique</dataInstitution>
- <dataLocation>France</dataLocation>
- </resource>
- <resource id="MIR:00100047" obsolete="true">
- <dataResource>http://pfam.ccbb.re.kr/index.shtml</dataResource>
- <dataEntityExample>PF01234</dataEntityExample>
- <dataEntry>http://pfam.ccbb.re.kr/cgi-bin/getdesc?acc=$id</dataEntry>
- <dataInfo>CCBB Pfam Mirror</dataInfo>
- <dataInstitution>Center for Computational Biology and Bioinformatics</dataInstitution>
- <dataLocation>Korea</dataLocation>
- </resource>
- </resources>
- <tags>
- <tag>domain</tag>
- <tag>protein</tag>
- </tags>
- </datatype>
-
- <datatype id="MIR:00000029" pattern="^[a..zA..Z]+(\_)?\d+(\.\d+)?$">
- <name>Nucleotide Sequence Database</name>
- <synonyms>
- <synonym>International Nucleotide Sequence Database Collaboration</synonym>
- <synonym>INSDC</synonym>
- </synonyms>
- <definition>The International Nucleotide Sequence Database Collaboration (INSDC) consists of a joint effort to collect and disseminate databases containing DNA and RNA sequences.</definition>
- <uris>
- <uri type="URN">urn:miriam:insdc</uri>
- <uri type="URL" deprecated="true">http://www.insdc.org/</uri>
- </uris>
- <documentations>
- <documentation type="URL">http://www.ebi.ac.uk/embl/Contact/collaboration.html</documentation>
- <documentation type="PMID">urn:miriam:pubmed:17148479</documentation>
- <documentation type="PMID">urn:miriam:pubmed:17202161</documentation>
- <documentation type="PMID">urn:miriam:pubmed:2326192</documentation>
- <documentation type="PMID">urn:miriam:pubmed:12436968</documentation>
- <documentation type="URL">http://insdc.org/</documentation>
- </documentations>
- <resources>
- <resource id="MIR:00100048">
- <dataResource>http://www.ebi.ac.uk/embl/</dataResource>
- <dataEntityExample>X58356</dataEntityExample>
- <dataEntry>http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-page+EntryPage+-e+[EMBL:$id]+-view+EmblEntry</dataEntry>
- <dataInfo>EMBL-Bank</dataInfo>
- <dataInstitution>European Molecular Biology Laboratory (EBI)</dataInstitution>
- <dataLocation>United Kingdom</dataLocation>
- </resource>...
[truncated message content] |
|
From: <mh...@us...> - 2012-06-28 01:15:01
|
Revision: 15925
http://sbml.svn.sourceforge.net/sbml/?rev=15925&view=rev
Author: mhucka
Date: 2012-06-28 01:14:54 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
Skeleton for the specification document.
Added Paths:
-----------
trunk/specifications/sbml-level-3/version-1/groups/specification/
trunk/specifications/sbml-level-3/version-1/groups/specification/acknowledgments.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/apdx-validation.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/background.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/best-practices.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/examples.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/groups.bib
trunk/specifications/sbml-level-3/version-1/groups/specification/intro.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/macros.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/main.tex
trunk/specifications/sbml-level-3/version-1/groups/specification/syntax.tex
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/acknowledgments.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/acknowledgments.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/acknowledgments.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,8 @@
+% -*- TeX-master: "main" -*-
+
+\section{Acknowledgments}
+
+Work such as this does not take place in a vacuum; many people contributed ideas and discussions that shaped the Groups proposal that you see before you. I particularly thank Nicolas Le Nov\`{e}re, Frank Bergmann, Lucian Smith, Sarah Keating, Allyson Lister, Robert Phair, Sven Sahle, Stefan Hoops, Chris Myers, and the members of the \emph{sbml-discuss} mailing list for suggestions and comments.
+
+This work was funded by the National Institutes of Health (USA) under grant R01~GM070923.
+
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/apdx-validation.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/apdx-validation.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/apdx-validation.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,4 @@
+% -*- TeX-master: "main" -*-
+
+\section{Validation of SBML documents}
+\label{apdx-validation}
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/background.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/background.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/background.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,4 @@
+% -*- TeX-master: "main" -*-
+
+\section{Background and context}
+\label{background}
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/best-practices.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/best-practices.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/best-practices.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,4 @@
+% -*- TeX-master: "main" -*-
+
+\section{Best Practices}
+\label{best-practices}
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/examples.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/examples.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/examples.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,4 @@
+% -*- TeX-master: "main" -*-
+
+\section{Examples}
+\label{examples}
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/groups.bib
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/groups.bib (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/groups.bib 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,327 @@
+@ARTICLE{sbml,
+ author = {M. Hucka and A. Finney and H.M. Sauro and H. Bolouri and J.C. Doyle and H. Kitano and A.P. Arkin and B.J. Bornstein and D. Bray and A. Cornish-Bowden and A.A. Cuellar and S. Dronov and E.D. Gilles and M. Ginkel and V. Gor and I.I. Goryanin and W.J. Hedley and T.C. Hodgman and J.H. Hofmeyr and P.J. Hunter and N.S. Juty and J.L. Kasberger and A. Kremling and U. Kummer and N. Le Nov\`{e}re and L.M. Loew and D. Lucio and P. Mendes and E. Minch and E.D. Mjolsness and Y. Nakayama and M.R. Nelson and P.F. Nielsen and T. Sakurada and J.C. Schaff and B.E. Shapiro and T.S. shimizu and H.D. Spence and J. Stelling and K. Takahashi and M. Tomita and J. Wagner and J. Wang},
+ title = {The {S}ystems {B}iology {M}arkup {L}anguage ({SBML}): a medium for representation and exchange of biochemical network models},
+ journal = {Bioinformatics},
+ year = {2003},
+ volume = {19},
+ pages = {524-31},
+ number = {4},
+}
+
+@misc{l3v1c,
+title = {{The Systems Biology Markup Language (SBML): Language Specification for Level 3 Version 1 Core}},
+author = {Michael Hucka and Frank T. Bergmann and Stefan Hoops and Sarah M. Keating and Sven Sahle and James C. Schaff and Lucian P. Smith and Darren J. Wilkinson},
+year = 2010,
+howpublished = {Available via the World Wide Web at \url{http://sbml.org/Documents/Specifications}},
+}
+
+@misc{xhtml,
+ AUTHOR = {Steven Pemberton and Daniel Austin and Jonny Axelsson and Tantek Celik
+ and Doug Dominiak and Herman Elenbaas and Beth Epperson
+ and Masayasu Ishikawa and {Shin'ichi} Matsui and Shane McCarron
+ and Navarro and Subramanian Peruvemba and Rob Relyea
+ and Sebastian Schnitzenbaumer and Peter Stark},
+ TITLE = {{XHTML} 1.0 The {Extensible} {HyperText} {Markup} {Language} (Second Edition): {W3C} {Recommendation} 26 {January} 2000, revised 1 {August} 2002},
+ HOWPUBLISHED = {Available via the World Wide Web at \url{http://www.w3.org/TR/xhtml1/}},
+ YEAR = 2002,
+}
+
+@misc{tracker,
+title = {The {SBML} Issue Tracker},
+author = {{SBML Team}},
+year = 2010,
+howpublished = {Available via the World Wide Web at \url{http://sbml.org/issue-tracker}.},
+}
+
+@BOOK{eriksson:1998,
+ AUTHOR = {H.-E. Eriksson and M. Penker},
+ TITLE = {{UML} Toolkit},
+ PUBLISHER = {John Wiley \& Sons},
+ YEAR = 1998,
+ ADDRESS = {New York}
+}
+
+@BOOK{oestereich:1999,
+ AUTHOR = {B. Oestereich},
+ TITLE = {Developing Software with {UML}: Object-Oriented Analysis and
+ Design in Practice},
+ PUBLISHER = {Addison-Wesley},
+ YEAR = 1999
+}
+
+@MISC{biron:2000,
+ AUTHOR = {P.~V. Biron and A. Malhotra},
+ TITLE = {{XML} {S}chema Part 2: Datatypes ({W3C} Candidate
+ Recommendation 24 {O}ctober 2000)},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.w3.org/TR/xmlschema-2/}.},
+ YEAR = 2000
+}
+
+@MISC{fallside:2000,
+ AUTHOR = {D.~C. Fallside},
+ TITLE = {{XML} {S}chema Part 0: Primer ({W3C} Candidate
+ Recommendation 24 {O}ctober 2000)},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.w3.org/TR/xmlschema-0/}},
+ YEAR = 2000
+}
+
+@MISC{thompson:2000,
+ AUTHOR = {H.~S. Thompson and D. Beech and M. Maloney and N. Mendelsohn},
+ TITLE = {{XML} {S}chema Part 1: Structures ({W3C} Candidate Recommendation
+ 24 {O}ctober 2000)},
+ HOWPUBLISHED = {Available online via the World Wide Web at the address
+ \url{http://www.w3.org/TR/xmlschema-1/}},
+ YEAR = 2000
+}
+
+
+@MISC{finney:2000,
+ AUTHOR = {Andrew Finney},
+ TITLE = {Internal Discussion Document: Possible extensions to the {Systems Biology Markup Language}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.cds.caltech.edu/erato/extensions.html}},
+ YEAR = 2000
+}
+
+@misc{ginkel:2001,
+author = {Martin Ginkel and J\"{o}rg Stelling},
+title = {{XML} Notation for Modularity},
+year = 2001,
+howpublished = {Available via the World Wide Web at
+ \url{http://sbml.org/images/7/73/Vortrag.pdf}},
+}
+
+@misc{ginkel:2002,
+author = {Martin Ginkel},
+title = {Modular {SBML}},
+year = 2002,
+howpublished = {Available via the World Wide Web at
+ \url{http://sbml.org/images/9/90/Sbml-modular.pdf}},
+}
+
+@MISC{webb:2003,
+ AUTHOR = {Jonathan Webb},
+ TITLE = {{B}io{S}pice {MDL} {M}odel {C}omposition and {L}ibraries},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Forums/index.php?t=msg&th=67&rid=0#msg_111}},
+ YEAR = 2003
+}
+
+@MISC{xpath,
+author = {James Clark and Steve DeRose},
+title = {{XML Path Language (XPath) Version 1.0}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.w3.org/TR/xpath/}.},
+ YEAR = 1999
+}
+
+@MISC{comp-sig,
+author = {Martin Ginkel},
+title = {{SBML} Model Composition Special Interest Group},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.mpi-magdeburg.mpg.de/zlocal/martins/sbml-comp}.},
+ YEAR = 2003
+}
+
+@MISC{finney:2003,
+author = {Andrew Finney},
+title = {Systems Biology Markup Language ({SBML}) Level 3 Proposal: Model Composition Features},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.mpi-magdeburg.mpg.de/zlocal/martins/sbml-comp/model-composition.pdf}.},
+ YEAR = 2003
+}
+
+@MISC{finney:2003b,
+author = {Andrew Finney},
+title = {Systems Biology Markup Language ({SBML}) Level 3 Proposal: Model Composition Features},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/images/7/73/Model-composition.pdf}.},
+ YEAR = 2003
+}
+
+@MISC{finney:2003c,
+author = {Andrew Finney},
+title = {SBML Sets Concept},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Forums/index.php?t=msg&th=234&rid=0#msg_683}.},
+ YEAR = 2003
+}
+
+@MISC{finney:2004,
+author = {Andrew Finney},
+title = {{SBML} Level 3: Proposals for Advanced Model Representations},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/images/9/9c/Ismb-2004-sbml-level-3-poster.pdf}.},
+ YEAR = 2004
+}
+
+@MISC{sbml5,
+author = {{SBML Team}},
+title = {{The 5th SBML Hackathon}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/Hackathons/The_5th_SBML_Hackathon}.},
+ YEAR = 2007
+}
+
+@MISC{comp2007,
+author = {{Various}},
+title = {{SBML Composition Workshop 2007}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/Other_Events/SBML_Composition_Workshop_2007}.},
+ YEAR = 2007
+}
+
+
+@MISC{ginkel:2007,
+author = {Martin Ginkel},
+title = {{Martin Goals}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/Other_Events/SBML_Composition_Workshop_2007/Martin_Goals}.},
+ YEAR = 2007
+}
+
+@MISC{finney:2007,
+author = {Andrew Finney},
+title = {{Andrew} 2007 Comments about Model Composition},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Andrew_2007_Comments_about_Model_Composition}.},
+ YEAR = 2007
+}
+
+@MISC{liebermeister:2007,
+author = {Wolfram Leibermeister},
+title = {semanticSBML},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/images/c/c1/SemanticSBML_SBMLcomposition.pdf}.},
+ YEAR = 2007
+}
+
+@MISC{randhawa:2007,
+author = {Ranjit Randhawa},
+title = {{Model Composition for Macromolecular Regulatory Networks}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/documents/proposals/CCB2007DemoPresentation.pdf}.},
+ YEAR = 2007
+}
+
+@MISC{lenov:2007,
+author = {Nicolas Le Nov\`{e}re},
+title = {Modularity in Core},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/Other_Events/SBML_Composition_Workshop_2007/Modularity_In_Core}.},
+ YEAR = 2007
+}
+
+@MISC{various:2007,
+author = {Various},
+title = {Issues to Address},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/Other_Events/SBML_Composition_Workshop_2007/Issues_To_Address}.},
+ YEAR = 2007
+}
+
+@MISC{various:2007b,
+author = {Various},
+title = {Overloading Semantics},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/Other_Events/SBML_Composition_Workshop_2007/Overloading_Semantics}.},
+ YEAR = 2007
+}
+
+@MISC{hoops:2007,
+author = {Stefan Hoops},
+title = {Hierarchical Model Composition},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Community/Wiki/SBML_Level_3_Proposals/Hierarchical_Model_Composition_(Hoops_2007)}.},
+ YEAR = 2007
+}
+
+@MISC{hoops:2008,
+author = {Stefan Hoops},
+title = {Hierarchical Model Composition},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/images/e/e9/HierarchicalModelGothenburg.pdf}.},
+ YEAR = 2008
+}
+
+@MISC{bergmann:2006,
+author = {Frank Bergmann and Herbert M. Sauro},
+title = {Human-readable Model Definition Language},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{ttp://www.sys-bio.org/sbwWiki/_media/sbw/standards/2006-12-17_humanreadable_mdl.pdf}.},
+ YEAR = 2006
+}
+
+@MISC{smith:2010,
+author = {Lucian P. Smith},
+title = {Hierarchical Model Composition},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/images/b/b6/Smith-Hierarchical_Model_Composition-2010-05-03.pdf}.},
+ YEAR = 2010
+}
+
+@MISC{smith:2010b,
+author = {Lucian P. Smith},
+title = {Hierarchical Model Composition},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.sbml.org/Forums/index.php?t=tree&goto=6124}.},
+ YEAR = 2010
+}
+
+@MISC{xinclude,
+author = {Jonathan Marsch and David Orchard and Daniel Veillard},
+title = {{XML Inclusions (XInclude) Version 1.0 (Second Edition)}},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.w3.org/TR/xinclude/}.},
+ YEAR = 206
+}
+
+@MISC{smith:2010c,
+author = {Lucian P. Smith and Michael Hucka},
+title = {{SBML Level 3} Hierarchical Model Composition},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://precedings.nature.com/documents/5133/version/1}.},
+ YEAR = 2010
+}
+
+@MISC{lenov:2003,
+author = {Nicolas Le Nov\`{e}re},
+title = {On the relationships between {L3} packages, including core},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://www.sbml.org/Forums/index.php?t=tree&goto=6104}.},
+ YEAR = 2003
+}
+
+@MISC{editors:2010,
+author = {{The SBML Editors}},
+title = {{SBML Editors'} meeting minutes 2010-06-22},
+ HOWPUBLISHED = {Available via the World Wide Web at
+ \url{http://sbml.org/Events/SBML_Editors'_Meetings/Minutes/2010-06-22}.},
+ YEAR = 2010
+}
+
+@BOOK{harold:2001,
+ AUTHOR = {E.~R. Harold and E.~S. Means},
+ TITLE = {{XML} in a Nutshell},
+ PUBLISHER = {O'Reilly},
+ YEAR = 2001
+}
+
+@MISC{w3c:2000,
+ AUTHOR = {W3C},
+ TITLE = {Naming and Addressing: {URI}s, {URL}s, \ldots},
+ HOWPUBLISHED = {Available online via the World Wide Web at
+ \url{http://www.w3.org/Addressing/}},
+ YEAR = 2000
+}
+
+@MISC{rfc3986,
+ AUTHOR = {T. Berners-Lee and R. Fielding and L. Masinter},
+ TITLE = {Uniform Resource Identifier ({URI}): Generic Syntax},
+ HOWPUBLISHED = {Available online via the World Wide Web at
+ \url{http://www.ietf.org/rfc/rfc3986.txt}},
+ YEAR = 2005
+}
+
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/intro.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/intro.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/intro.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,94 @@
+% -*- TeX-master: "main" -*-
+
+\section{Introduction}
+\label{intro}
+
+
+
+
+
+
+\subsection{Proposal corresponding to this package specification}
+
+This specification for Groups in SBML Level~3 Version~1 is based on the proposal located at the following URL:
+
+\begin{center}
+ \vspace*{1ex}\small
+ \url{https://sbml.svn.sf.net/svnroot/sbml/trunk/specifications/sbml-level-3/version-1/groups/proposal}
+ \vspace*{1ex}
+\end{center}
+
+The tracking number in the SBML issue tracking system~\citep{tracker} for Groups package activities is 2847474. The version of the proposal used as the starting point for this specification is the version of June, 2012.
+
+
+\subsection{Package dependecies}
+
+The Groups package has no dependencies on other SBML Level~3 packages. It is also designed with the goal of being able to work seamlessly with other SBML Level~3 packages. (If you find incompatibilities with other packages, please contact the author of this package. Contact information is shown on the front page of this document.)
+
+
+\subsection{Document conventions}
+\label{conventions}
+
+Following the precedent set by the SBML Level~3 Core specification document, the class diagrams in this specification follow UML~1.0 (Unified Modeling Language; \citealt{eriksson:1998,oestereich:1999}) and are used to define the constructs provided by this package. Color in the diagrams covey additional information for the benefit of those viewing the document on media that can display color. The following are the colors used and their meanings:
+
+\begin{itemize}
+
+\item[\raisebox{2.75pt}{\colorbox{black}{\rule{0.8pt}{0.8pt}}}]
+ \emph{Black}: Items colored black in the UML diagrams are components
+ taken unchanged from their definition in the SBML Level~3 Core
+ specification document.
+
+\item[\raisebox{2.75pt}{\colorbox{mediumgreen}{\rule{0.8pt}{0.8pt}}}]
+ \emph{\textcolor{mediumgreen}{Green}}: Items colored green are
+ components that exist in SBML Level~3 Core, but are extended by this
+ package. Class boxes are also drawn with dashed lines to further
+ distinguish them.
+
+\item[\raisebox{2.75pt}{\colorbox{darkblue}{\rule{0.8pt}{0.8pt}}}]
+ \emph{\textcolor{darkblue}{Blue}}: Items colored blue are new
+ components introduced in this package specification. They have no
+ equivalent in the SBML Level~3 Core specification.
+
+\end{itemize}
+
+In this document, the following typographical conventions distinguish the names of objects and data types from other entities; these are identical to the conventions used in the SBML Level~3 Core specification document:
+
+\begin{description}
+
+\item \abstractclass{AbstractClass}: Abstract classes are classes that
+ are never instantiated directly, but rather serve as parents of other
+ object classes. Their names begin with a capital letter and they are
+ printed in a slanted, bold, sans-serif typeface. In electronic
+ document formats, the class names defined within this document are
+ also hyperlinked to their definitions; clicking
+ on these items will, given appropriate software, switch the view to
+ the section in this document containing the definition of that class.
+ (However, for classes that are unchanged from their definitions in
+ SBML Level~3 Core, the class names are not hyperlinked because they
+ are not defined within this document.)
+
+\item \class{Class}: Names of ordinary (concrete) classes begin with a
+ capital letter and are printed in an upright, bold, sans-serif
+ typeface. In electronic document formats, the class names are also
+ hyperlinked to their definitions in this specification document.
+ (However, as in the previous case, class names are not hyperlinked if
+ they are for classes that are unchanged from their definitions in the
+ SBML Level~3 Core specification.)
+
+\item \token{SomeThing}, \token{otherThing}: Attributes of classes, data
+ type names, literal XML, and generally all tokens \emph{other} than
+ SBML UML class names, are printed in an upright typewriter typeface.
+ Primitive types defined by SBML begin with a capital letter; SBML also
+ makes use of primitive types defined by XML
+ Schema~1.0~\citep{biron:2000,fallside:2000,thompson:2000}, but
+ unfortunately, XML~Schema does not follow any capitalization
+ convention and primitive types drawn from the XML~Schema language may
+ or may not start with a capital letter.
+
+\end{description}
+
+For other matters involving the use of UML and XML, the same conventions used in the SBML Level~3 Core specification document are used in this specification as well.
+
+
+
+
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/macros.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/macros.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/macros.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,19 @@
+\newcommand{\fixttspace}{\hspace*{1pt}}
+
+\newcommand{\sbmlthreecore} {SBML Level~3 Version~1 Core\xspace}
+
+\newcommand{\ListOfModelDefinitions} {\defRef{ListOfModelDefinitions}{listofmodeldefinitions-class}}
+\newcommand{\ExternalModelDefinition} {\defRef{ExternalModelDefinition}{externalmodeldefinition-class}}
+\newcommand{\ListOfExternalModelDefinitions}{\defRef{ListOfExternalModelDefinitions}{listofexternalmodeldefinitions-class}}
+\newcommand{\Submodel} {\defRef{Submodel}{submodel-class}}
+\newcommand{\ListOfSubmodels} {\defRef{ListOfSubmodels}{listofsubmodels-class}}
+\newcommand{\Port} {\defRef{Port}{port-class}}
+\newcommand{\ListOfPorts} {\defRef{ListOfPorts}{listofports-class}}
+\newcommand{\SBaseRef} {\defRef{SBaseRef}{sbaseref-class}}
+\newcommand{\Deletion} {\defRef{Deletion}{deletion-class}}
+\newcommand{\ListOfDeletions} {\defRef{ListOfDeletions}{listofdeletions-class}}
+\newcommand{\ReplacedElement} {\defRef{ReplacedElement}{replacedelement-class}}
+\newcommand{\ReplacedBy} {\defRef{ReplacedBy}{replacedby-class}}
+\newcommand{\ListOfReplacedElements} {\defRef{ListOfReplacedElements}{listofreplacedelements-class}}
+
+
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/main.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/main.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/main.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,44 @@
+\documentclass[draftspec]{sbmlpkgspec}
+\input{macros}
+
+% \includeonly{intro}
+
+\begin{document}
+
+\packageTitle{Groups}
+\packageVersion{Version 1 (Draft)}
+\packageVersionDate{XX July 2012}
+\packageGeneralURL{http://sbml.org/Documents/Specifications/Packages/Groups}
+\packageThisVersionURL{http://sbml.org/Documents/Specifications/Packages/Groups/XXXXX}
+
+\author{%
+Michael Hucka\\
+\mailto{mh...@ca...}\\
+Computing and Mathematical Sciences\\
+California Institute of Technology\\
+Pasadena, California, US
+}
+
+\frontNotice{This is a draft specification for the SBML Level 3 package called ``\texttt{groups}''. It is not a normative document. Please send feedback to the Package Working Group mailing list at \mailto{sbm...@li...}.}
+
+\maketitlepage
+\maketableofcontents
+
+\include{intro}
+\include{background}
+\include{syntax}
+\include{examples}
+\include{best-practices}
+
+\setcounter{secnumdepth}{2}
+\appendix
+\include{apdx-validation}
+
+\setcounter{secnumdepth}{-1}
+\include{acknowledgments}
+
+\clearpage
+\bibliography{groups}
+
+
+\end{document}
Added: trunk/specifications/sbml-level-3/version-1/groups/specification/syntax.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/groups/specification/syntax.tex (rev 0)
+++ trunk/specifications/sbml-level-3/version-1/groups/specification/syntax.tex 2012-06-28 01:14:54 UTC (rev 15925)
@@ -0,0 +1,4 @@
+% -*- TeX-master: "main" -*-
+
+\section{Package syntax and semantics}
+\label{sec:syntax}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-28 00:36:47
|
Revision: 15924
http://sbml.svn.sourceforge.net/sbml/?rev=15924&view=rev
Author: mhucka
Date: 2012-06-28 00:36:41 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
Added a copy of the proposal that will be sent out for vote (that is, unless
any further comments come in between now and tomorrow).
Added Paths:
-----------
trunk/specifications/sbml-level-3/version-1/groups/
trunk/specifications/sbml-level-3/version-1/groups/proposal/
trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.pdf
trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.webarchive
Added: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.webarchive
===================================================================
(Binary files differ)
Property changes on: trunk/specifications/sbml-level-3/version-1/groups/proposal/groups-proposal-2012-06-27.webarchive
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-27 23:03:04
|
Revision: 15923
http://sbml.svn.sourceforge.net/sbml/?rev=15923&view=rev
Author: mhucka
Date: 2012-06-27 23:02:58 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
Removing old spec versions.
Removed Paths:
-------------
trunk/specifications/sbml-level-3/version-1/comp/spec/comp-2012-05-18.pdf
Deleted: trunk/specifications/sbml-level-3/version-1/comp/spec/comp-2012-05-18.pdf
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-06-26 04:41:25
|
Revision: 15922
http://sbml.svn.sourceforge.net/sbml/?rev=15922&view=rev
Author: luciansmith
Date: 2012-06-26 04:41:18 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
Fix for parsing long strings of digits, plus new tests for 'em.
Modified Paths:
--------------
trunk/libsbml/src/sbml/math/L3Parser.cpp
trunk/libsbml/src/sbml/math/L3Parser.ypp
trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp
trunk/libsbml/src/sbml/math/test/TestRunner.c
Modified: trunk/libsbml/src/sbml/math/L3Parser.cpp
===================================================================
--- trunk/libsbml/src/sbml/math/L3Parser.cpp 2012-06-24 20:17:20 UTC (rev 15921)
+++ trunk/libsbml/src/sbml/math/L3Parser.cpp 2012-06-26 04:41:18 UTC (rev 15922)
@@ -2274,64 +2274,68 @@
if (isdigit(cc) || (cc=='.' && isdigit(l3p->input.peek()))) {
double number;
long numlong;
- bool isdouble = false;
l3p->input.unget();
- if (cc != '.') {
- l3p->input >> numlong;
+ streampos numbegin = l3p->input.tellg();
+ l3p->input >> numlong;
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ l3p->input >> number;
+ streampos numend = l3p->input.tellg();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ bool decimal = false;
+ bool e = false;
+ while (l3p->input.tellg() != numend) {
+ cc = l3p->input.get();
+ if (cc=='.') {
+ decimal = true;
+ }
+ if (cc=='e' || cc=='E') {
+ e = true;
+ }
}
- else {
- numlong = 0;
+ if (!decimal && !e && number == static_cast<double>(numlong)) {
+ sbml_yylval.numlong = numlong;
+ return INTEGER;
}
- if (l3p->input.peek() == '.') {
- isdouble = true;
- number = numlong;
- l3p->input.get();
- if (isdigit(l3p->input.peek())) {
- streampos numbegin = l3p->input.tellg();
- l3p->input >> numlong;
- streampos numend = l3p->input.tellg();
- if (numend < 0)
- numend = l3p->input.str().length();
- double fraction = numlong/pow(10.0, static_cast<long>(numend-numbegin));
- number += fraction;
- }
+ if (!e) {
+ sbml_yylval.numdouble = number;
+ return DOUBLE;
}
- if (l3p->input.peek() == 'e' || l3p->input.peek() == 'E') {
- l3p->input.get();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ string mantissa = "";
+ while (l3p->input.tellg() != numend && (isdigit(cc) || cc=='.')) {
cc = l3p->input.get();
- if (!(isdigit(cc) || cc=='-' || cc=='+')) {
- l3p->input.unget();
- l3p->input.unget();
+ mantissa += cc;
+ }
+ if (cc=='e' || cc=='E') {
+ mantissa.pop_back();
+ if (l3p->input.peek()=='+') {
+ cc = l3p->input.get();
}
- else {
- if (!isdouble) {
- //It is now!
- number = numlong;
- }
- bool isneg = false;
- if (cc=='-') {
- isneg = true;
- }
- else if (isdigit(cc)) {
- l3p->input.unget();
- }
- l3p->input >> numlong;
- if (isneg) {
- numlong = -numlong;
- }
- l3p->exponent = numlong;
- sbml_yylval.mantissa = number;
- return E_NOTATION;
+ bool isneg = false;
+ if (l3p->input.peek()=='-') {
+ cc = l3p->input.get();
+ isneg = true;
}
+ l3p->input >> numlong;
+ if (isneg) {
+ numlong = -numlong;
+ }
+ stringstream mantissastr;
+ mantissastr.str(mantissa);
+ mantissastr >> number;
+ l3p->exponent = numlong;
+ sbml_yylval.mantissa = number;
+ return E_NOTATION;
}
- if (isdouble) {
+ else {
+ assert(false); //How did this happen?
+ //This is an error condition, but parsing the value as a double should be sufficient.
sbml_yylval.numdouble = number;
return DOUBLE;
}
- else {
- sbml_yylval.numlong = numlong;
- return INTEGER;
- }
}
else if (cc=='(') {
streampos rationalbegin = l3p->input.tellg();
@@ -2357,6 +2361,7 @@
}
}
}
+ l3p->input.clear();
l3p->input.seekg(rationalbegin, ios::beg); // Not actually a rational number.
return '(';
}
Modified: trunk/libsbml/src/sbml/math/L3Parser.ypp
===================================================================
--- trunk/libsbml/src/sbml/math/L3Parser.ypp 2012-06-24 20:17:20 UTC (rev 15921)
+++ trunk/libsbml/src/sbml/math/L3Parser.ypp 2012-06-26 04:41:18 UTC (rev 15922)
@@ -532,64 +532,68 @@
if (isdigit(cc) || (cc=='.' && isdigit(l3p->input.peek()))) {
double number;
long numlong;
- bool isdouble = false;
l3p->input.unget();
- if (cc != '.') {
- l3p->input >> numlong;
+ streampos numbegin = l3p->input.tellg();
+ l3p->input >> numlong;
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ l3p->input >> number;
+ streampos numend = l3p->input.tellg();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ bool decimal = false;
+ bool e = false;
+ while (l3p->input.tellg() != numend) {
+ cc = l3p->input.get();
+ if (cc=='.') {
+ decimal = true;
+ }
+ if (cc=='e' || cc=='E') {
+ e = true;
+ }
}
- else {
- numlong = 0;
+ if (!decimal && !e && number == static_cast<double>(numlong)) {
+ sbml_yylval.numlong = numlong;
+ return INTEGER;
}
- if (l3p->input.peek() == '.') {
- isdouble = true;
- number = numlong;
- l3p->input.get();
- if (isdigit(l3p->input.peek())) {
- streampos numbegin = l3p->input.tellg();
- l3p->input >> numlong;
- streampos numend = l3p->input.tellg();
- if (numend < 0)
- numend = l3p->input.str().length();
- double fraction = numlong/pow(10.0, static_cast<long>(numend-numbegin));
- number += fraction;
- }
+ if (!e) {
+ sbml_yylval.numdouble = number;
+ return DOUBLE;
}
- if (l3p->input.peek() == 'e' || l3p->input.peek() == 'E') {
- l3p->input.get();
+ l3p->input.clear();
+ l3p->input.seekg(numbegin);
+ string mantissa = "";
+ while (l3p->input.tellg() != numend && (isdigit(cc) || cc=='.')) {
cc = l3p->input.get();
- if (!(isdigit(cc) || cc=='-' || cc=='+')) {
- l3p->input.unget();
- l3p->input.unget();
+ mantissa += cc;
+ }
+ if (cc=='e' || cc=='E') {
+ mantissa.pop_back();
+ if (l3p->input.peek()=='+') {
+ cc = l3p->input.get();
}
- else {
- if (!isdouble) {
- //It is now!
- number = numlong;
- }
- bool isneg = false;
- if (cc=='-') {
- isneg = true;
- }
- else if (isdigit(cc)) {
- l3p->input.unget();
- }
- l3p->input >> numlong;
- if (isneg) {
- numlong = -numlong;
- }
- l3p->exponent = numlong;
- sbml_yylval.mantissa = number;
- return E_NOTATION;
+ bool isneg = false;
+ if (l3p->input.peek()=='-') {
+ cc = l3p->input.get();
+ isneg = true;
}
+ l3p->input >> numlong;
+ if (isneg) {
+ numlong = -numlong;
+ }
+ stringstream mantissastr;
+ mantissastr.str(mantissa);
+ mantissastr >> number;
+ l3p->exponent = numlong;
+ sbml_yylval.mantissa = number;
+ return E_NOTATION;
}
- if (isdouble) {
+ else {
+ assert(false); //How did this happen?
+ //This is an error condition, but parsing the value as a double should be sufficient.
sbml_yylval.numdouble = number;
return DOUBLE;
}
- else {
- sbml_yylval.numlong = numlong;
- return INTEGER;
- }
}
else if (cc=='(') {
streampos rationalbegin = l3p->input.tellg();
@@ -615,6 +619,7 @@
}
}
}
+ l3p->input.clear();
l3p->input.seekg(rationalbegin, ios::beg); // Not actually a rational number.
return '(';
}
Modified: trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp
===================================================================
--- trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp 2012-06-24 20:17:20 UTC (rev 15921)
+++ trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp 2012-06-26 04:41:18 UTC (rev 15922)
@@ -1842,6 +1842,62 @@
END_TEST
+START_TEST (test_SBML_parseL3Formula_longint)
+{
+ ASTNode_t *r = SBML_parseL3Formula("166112956810631");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 166112956810631.0, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longdecimal)
+{
+ ASTNode_t *r = SBML_parseL3Formula("0.00166112956810631");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 0.00166112956810631, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_longnumberparen)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(0.00166112956810631)");
+
+ fail_unless( ASTNode_getType (r) == AST_REAL, NULL );
+ fail_unless( ASTNode_getReal (r) == 0.00166112956810631, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0 , NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
+START_TEST (test_SBML_parseL3Formula_crazylong)
+{
+ ASTNode_t *r = SBML_parseL3Formula("(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890)");
+
+ fail_unless( ASTNode_getType(r) == AST_REAL, NULL );
+ fail_unless( util_isInf(ASTNode_getReal(r)) == 1, NULL );
+ fail_unless( ASTNode_getNumChildren(r) == 0, NULL );
+
+ ASTNode_free(r);
+
+}
+END_TEST
+
+
Suite *
create_suite_L3FormulaParser (void)
{
@@ -1917,7 +1973,10 @@
tcase_add_test( tcase, test_SBML_parseL3Formula_avogadrosettings);
tcase_add_test( tcase, test_SBML_parseL3Formula_unitssettings);
tcase_add_test( tcase, test_SBML_parseL3Formula_power);
-
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longint);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longdecimal);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_longnumberparen);
+ tcase_add_test( tcase, test_SBML_parseL3Formula_crazylong);
suite_add_tcase(suite, tcase);
return suite;
Modified: trunk/libsbml/src/sbml/math/test/TestRunner.c
===================================================================
--- trunk/libsbml/src/sbml/math/test/TestRunner.c 2012-06-24 20:17:20 UTC (rev 15921)
+++ trunk/libsbml/src/sbml/math/test/TestRunner.c 2012-06-26 04:41:18 UTC (rev 15922)
@@ -55,7 +55,7 @@
Suite *create_suite_ASTNode (void);
Suite *create_suite_FormulaFormatter (void);
Suite *create_suite_FormulaParser (void);
-//Suite *create_suite_L3FormulaParser (void);
+Suite *create_suite_L3FormulaParser (void);
Suite *create_suite_L3FormulaParserC (void);
Suite *create_suite_FormulaTokenizer (void);
Suite *create_suite_ReadMathML (void);
@@ -115,7 +115,7 @@
srunner_add_suite( runner, create_suite_FormulaFormatter () );
srunner_add_suite( runner, create_suite_FormulaParser () );
-// srunner_add_suite( runner, create_suite_L3FormulaParser () );
+ srunner_add_suite( runner, create_suite_L3FormulaParser () );
srunner_add_suite( runner, create_suite_L3FormulaParserC () );
srunner_add_suite( runner, create_suite_FormulaTokenizer () );
srunner_add_suite( runner, create_suite_ReadMathML () );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-24 20:17:27
|
Revision: 15921
http://sbml.svn.sourceforge.net/sbml/?rev=15921&view=rev
Author: mhucka
Date: 2012-06-24 20:17:20 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
Fixed multiple typos in error messages.
Modified Paths:
--------------
trunk/libsbml/src/sbml/SBMLErrorTable.h
Modified: trunk/libsbml/src/sbml/SBMLErrorTable.h
===================================================================
--- trunk/libsbml/src/sbml/SBMLErrorTable.h 2012-06-22 16:37:00 UTC (rev 15920)
+++ trunk/libsbml/src/sbml/SBMLErrorTable.h 2012-06-24 20:17:20 UTC (rev 15921)
@@ -257,7 +257,7 @@
Category_* To be strictly in line with sbml specifications it should
* only allow semantics on csymbol until l2v3 rel 2
* BUT since no one ever applied it anyway I havent implemented
- * this as it would require a seperate rule that then
+ * this as it would require a separate rule that then
* reverted to this id
*/
DisallowedDefinitionURLUse,
@@ -8593,7 +8593,7 @@
LIBSBML_SEV_WARNING,
LIBSBML_SEV_WARNING,
LIBSBML_SEV_WARNING,
- "The SBOTerm used is not recognised by libSBML and therefore the correct "
+ "The SBOTerm used is not recognized by libSBML and therefore the correct "
"parentage cannot be checked. However, since libSBML is referring to a "
"snapshot of the SBO tree the term may now exist."
},
@@ -8630,7 +8630,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The 'spatialDimensions' attribute on <compartment> was not available "
- "in SBML Level 1. In order for the internal respresentation of a "
+ "in SBML Level 1. In order for the internal representation of a "
"<compartment> to be correct, the value for the spatialDimensions "
"member variable should be '3'."
},
@@ -8649,7 +8649,7 @@
LIBSBML_SEV_ERROR,
"The 'compartmentType' attribute on <compartment> was not available "
"in SBML Level 1 or SBML Level 2 Version 1. In order for the internal "
- "respresentation of a <compartment> to be correct, the value for the "
+ "representation of a <compartment> to be correct, the value for the "
"compartmentType member variable should be not be set."
},
@@ -8666,7 +8666,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The 'constant' attribute on <compartment> and <parameter> was not "
- "available in SBML Level 1. In order for the internal respresentation "
+ "available in SBML Level 1. In order for the internal representation "
"of <compartment> and <parameter> to be correct, the value for the "
"constant member variable should be 'false' if the <compartment> or "
"<parameter> is the variable of a <rule> otherwise it can be either "
@@ -8687,7 +8687,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
"The 'metaid' attribute on all <SBase> objects was not available "
"in SBML Level 1. In order for the internal "
- "respresentation to be correct, the value for the "
+ "representation to be correct, the value for the "
"'metaid' member variable should be not be set."
},
@@ -8707,7 +8707,7 @@
"<delay>, <species>, <speciesType>, <stoichiometryMath>, <trigger> "
"<unit> and <unitDefinition> was not available before SBML Level 2 "
"Version 3. In order for the internal "
- "respresentation of these components to be correct, the value for the "
+ "representation of these components to be correct, the value for the "
"sboTerm member variable should be '-1'."
},
@@ -8759,7 +8759,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_ERROR,
"The <compartmentType> component was introduced in SBML Level 2 Version "
- "2. In order for the internal respresentation of a <model> to "
+ "2. In order for the internal representation of a <model> to "
"be correct, the <listOfCompartmentTypes> component should be empty."
},
@@ -8776,7 +8776,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The <constraint> component was introduced in SBML Level 2 Version "
- "2. In order for the internal respresentation of a <model> to "
+ "2. In order for the internal representation of a <model> to "
"be correct, the <listOfConstraints> component should be empty."
},
@@ -8793,7 +8793,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The <event> component was introduced in SBML Level 2 Version "
- "1. In order for the internal respresentation of a <model> to "
+ "1. In order for the internal representation of a <model> to "
"be correct, the <listOfEvents> component should be empty."
},
@@ -8813,7 +8813,7 @@
"<functionDefinition>, <kineticLaw>, <model>, <parameter>, <reaction> "
"<rule> and <speciesReferenece> was not available before SBML Level 2 "
"Version 2. In order for the internal "
- "respresentation of these components to be correct, the value for the "
+ "representation of these components to be correct, the value for the "
"sboTerm member variable should be '-1'."
},
@@ -8830,7 +8830,7 @@
LIBSBML_SEV_NOT_APPLICABLE,
LIBSBML_SEV_NOT_APPLICABLE,
"The <functionDefinition> component was introduced in SBML Level 2 Version "
- "1. In order for the internal respresentation of a <model> to "
+ "1. In order for the internal representation of a <model> to "
"be correct, the <listOfFunctionDefinitions> component should be empty."
},
@@ -8901,7 +8901,7 @@
"of <species> to be correct, the value for the "
"constant member variable should be 'false' if (1) the <species> is the "
"variable of a <rule> or (2) the 'boundaryCondition' attribute is 'false' "
- "and the <species> is a procduct/reactant in a <reaction>. Otherwise it "
+ "and the <species> is a product/reactant in a <reaction>. Otherwise it "
"can be either 'true' or 'false' without affecting the interpretation of "
"the model."
},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2012-06-22 16:37:09
|
Revision: 15920
http://sbml.svn.sourceforge.net/sbml/?rev=15920&view=rev
Author: niko-rodrigue
Date: 2012-06-22 16:37:00 +0000 (Fri, 22 Jun 2012)
Log Message:
-----------
another batch of SBMLeditor corrections - now almost everything is working fine apart for the RDF annotations
Modified Paths:
--------------
trunk/sbmleditor/TODO.txt
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/OpenSBMLElementJDialogAction.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/AnnotationJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ConstraintJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/DelayJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ModelJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/PriorityJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/RelationRDFJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/RulesJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/TextElementJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/TriggerJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/SBMLElementFactory.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/SBMLUtilities.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/SBaseJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/tree/SBMLMutableTreeNode.java
Added Paths:
-----------
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/MessageJDialog.java
Modified: trunk/sbmleditor/TODO.txt
===================================================================
--- trunk/sbmleditor/TODO.txt 2012-06-20 16:08:14 UTC (rev 15919)
+++ trunk/sbmleditor/TODO.txt 2012-06-22 16:37:00 UTC (rev 15920)
@@ -1,38 +1,24 @@
- - add back the conversion between levels and versions (try to add the SBFC converters)
+ - use the originalElement to obtain the MathML String to avoid warning about FunctionDefinition
- - displaying constraint message !!
+ - implement or remove the Empty action from SBMlDocumentJTree (menu item on ListOf)
- - identifierException after trying to add twice a FunctionDefinition (with an error return in between)
-
- - when editing a model element, the whole tree is rebuild as we do a deep clone of the model and replace it afterward in the tree !!
+ - complexType JCombobox is sometime not updated, probably due to problem in the hashMap of the SBMLeditor.SBMLDocument
- - edit trigger or delay or eventAssignment deleting the event in the JTree !!
-
- - when creating a delay or a priority it is not going at the right place.
-
- - creates Notes, miriam annotation not working
-
- - edit for notes, with shortcut and menu item
-
- - make the open math menu item work
+ - add back the conversion between levels and versions (try to add the SBFC converters)
+
+ - identifierException after trying to add twice a FunctionDefinition (with an error returned in between because of wrong math) (validate the math first)
+ - creates miriam annotation not working
+
- add SpeciesReference and Reaction to the possible tag type for mathML, rules, eventAssignment, ...
- display infix math only for MathContainer !! (Add an option to display mathML ??)
- - allow to set the id if it was not set before
-
- check what to do to remove an element if the id is not defined !!! (for SpeciesRefence for ex)
- - open math editor from the reaction
-
- check which unit kind are allowed in L3 (update the pseudo schema if needed)
- - enforce non-optional L3 attributes ? (may be with an option only)
-
- - set L2V4 defaults with a button or check box or option ??
-
- creation of metaid missing at the moment (we could anyway decide not to display them in the tree !!)
- update the links to the SBML specs in the javadoc
@@ -49,6 +35,12 @@
If there is time
-------------------------
+ - when editing a model element, the whole tree is rebuild as we do a deep clone of the model and replace it afterward in the tree. Not efficient for large models !!
+
+ - enforce non-optional L3 attributes ? (may be with an option only)
+
+ - set L2V4 defaults with a button or check box or option ??
+
- transform urn into identifiers.org url and have a clickable link !!
- see if this could be useful for html display : http://code.google.com/p/flying-saucer/
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java 2012-06-20 16:08:14 UTC (rev 15919)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java 2012-06-22 16:37:00 UTC (rev 15920)
@@ -43,12 +43,17 @@
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
+import org.sbml.jsbml.ASTNode;
+import org.sbml.jsbml.Annotation;
+import org.sbml.jsbml.Constraint;
import org.sbml.jsbml.Event;
+import org.sbml.jsbml.FunctionDefinition;
import org.sbml.jsbml.KineticLaw;
import org.sbml.jsbml.MathContainer;
import org.sbml.jsbml.NamedSBase;
import org.sbml.jsbml.SBase;
import org.sbml.jsbml.SimpleSpeciesReference;
+import org.sbml.jsbml.xml.XMLNode;
import uk.ac.ebi.compneur.util.CustomJDialogFacade;
import uk.ac.ebi.compneur.util.SearchableJTree;
@@ -58,6 +63,7 @@
import uk.ac.ebi.mathml.editor.SBMLJexPane;
import uk.ac.ebi.sbml.editor.action.CreateContextMenu;
import uk.ac.ebi.sbml.editor.action.SBMLTemplatedAction;
+import uk.ac.ebi.sbml.editor.helper.SBMLUtilities;
import uk.ac.ebi.sbml.editor.helper.SBaseFactory;
import uk.ac.ebi.sbml.editor.helper.SBaseFilter;
import uk.ac.ebi.sbml.editor.helper.SBaseProcessor;
@@ -133,8 +139,6 @@
elementDialogMap.put(SBMLSchema.MIRIAM_ANNOTATION_NAME, "uk.ac.ebi.sbml.editor.dialog.RelationRDFJDialog");
elementDialogMap.put("annotations", "uk.ac.ebi.sbml.editor.dialog.AnnotationJDialog");
- elementDialogMap.put("math", "uk.ac.ebi.sbml.editor.dialog.NotesJDialog"); // TODO : check this, to see if we should delete or replace it ???
-
elementDialogMap.put("kineticLaw", "uk.ac.ebi.sbml.editor.dialog.KineticLawJDialog");
elementDialogMap.put("speciesReference", "uk.ac.ebi.sbml.editor.dialog.SpeciesReferenceJDialog");
elementDialogMap.put("reactant", "uk.ac.ebi.sbml.editor.dialog.ReactantJDialog");
@@ -169,6 +173,7 @@
elementDialogMap.put(SBMLDocument.CONSTRAINT_TAG_NAME, "uk.ac.ebi.sbml.editor.dialog.ConstraintJDialog");
elementDialogMap.put("listOfConstraints", "uk.ac.ebi.sbml.editor.dialog.ConstraintJDialog");
+ elementDialogMap.put("message", "uk.ac.ebi.sbml.editor.dialog.MessageJDialog");
}
/**
* the <code>editor</code>
@@ -195,7 +200,8 @@
* @param editor the editor containing this <code>SBMLDocumentJTree</code>
*
*/
- public SBMLDocumentJTree(SBMLEditor editor) {
+ @SuppressWarnings("unchecked")
+ public SBMLDocumentJTree(SBMLEditor editor) {
super();
init();
@@ -204,8 +210,7 @@
addMouseListener(this);
sbaseFilter = new SBMLSBaseFilter();
setSBaseFilter(sbaseFilter);
- this.setCellRenderer(new SBMLNodeTreeCellRenderer(Main.imageIconMap,
- SBMLNodeValueProcessor.getInstance()));
+ this.setCellRenderer(new SBMLNodeTreeCellRenderer(Main.imageIconMap, SBMLNodeValueProcessor.getInstance()));
this.editor = editor;
actions_ = new SBMLTemplatedAction[10];
@@ -328,83 +333,98 @@
public void doAction(ActionEvent e) throws Exception {
- DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) getSelectedNode();
+ SBMLMutableTreeNode selectedNode = (SBMLMutableTreeNode) getSelectedNode();
Object userObject = selectedNode.getUserObject();
+ SBase sbase = null;
+
+ String elementTagName = null;
+ String actionCommand = "";
- String elementTagName = "";
+ if (e != null)
+ {
+ actionCommand = e.getActionCommand();
+ }
+
+ SBMLDocument.debug("SBMLDocumentJTree : Edit action : action command = " + actionCommand);
- if (userObject instanceof SBase) {
- SBase sbase = (SBase) userObject;
- elementTagName = sbase.getElementName();
+ if (actionCommand.equals("message") ||
+ ((userObject instanceof XMLNode) && selectedNode.getTagName().equals("message")))
+ {
+ elementTagName = "message";
+ }
+ else if (actionCommand.equals("notes") || userObject instanceof XMLNode)
+ {
+ elementTagName = "notes";
+ }
+ else if (actionCommand.equals("annotation") || userObject instanceof Annotation)
+ {
+ elementTagName = "annotation";
+ }
+ else if (actionCommand.equals("math") || userObject instanceof ASTNode)
+ {
+ elementTagName = "math";
+ }
- if (elementTagName.equals("message")) {
- selectedNode = (DefaultMutableTreeNode) selectedNode.getParent();
- setSelectionPath(new TreePath(selectedNode.getPath()));
- sbase = (SBase) selectedNode.getUserObject();
- elementTagName = sbase.getElementName();
+ if (userObject instanceof SBase)
+ {
+ sbase = (SBase) userObject;
+
+ if (elementTagName == null) {
+ elementTagName = sbase.getElementName();
}
+ }
+ else if (userObject instanceof Annotation
+ || userObject instanceof XMLNode
+ || userObject instanceof ASTNode)
+ {
+ sbase = (SBase) ((TreeNode) userObject).getParent();
+ }
- String elementProcessorClassName = (String) elementDialogMap.get(elementTagName);
- SBaseProcessor elementProcessor = (SBaseProcessor) getInstance(elementProcessorClassName);
+ SBMLDocument.debug("SBMLDocumentJTree : elementTagName = " + elementTagName);
+
+ if (elementTagName.equals("math")) // Should not happen
+ {
+ // open math editor
+ actions_[9].doAction(null);
- // Display the edit dialog and process the edit changes if needed
- SBase element = elementProcessor.process(sbase);
-
- if (element != null) {
+ return;
+ }
+
+ String elementProcessorClassName = (String) elementDialogMap.get(elementTagName);
+ SBaseProcessor elementProcessor = (SBaseProcessor) getInstance(elementProcessorClassName);
- // TODO : update the code when we know how to recognize Notes and Annotation
- if (element.getElementName().equals(SBMLDocument.NOTES_TAG_NAME) ||
- element.getElementName().equals(SBMLDocument.ANNOTATION_TAG_NAME)) {
- // Update the JTree.
- TreeNode parentNode = selectedNode.getParent();
- SBase parent = (SBase) ((DefaultMutableTreeNode) parentNode).getUserObject();
- DefaultMutableTreeNode editedTreeNode = createTreeNode(parent);
+ // Display the edit dialog and process the edit changes if needed
+ SBase element = elementProcessor.process(sbase);
+ if (element != null) {
- SBMLDocument.debug("SBMLEditor : textfield index, new node = " + editedTreeNode);
+ TreeNode parentNode = selectedNode;
+ DefaultMutableTreeNode editedTreeNode = createTreeNode(element);
+
+ if (userObject instanceof Annotation || userObject instanceof XMLNode) {
+ parentNode = selectedNode.getParent();
+ }
+
+ replaceMutableNode((DefaultMutableTreeNode) parentNode, editedTreeNode, true);
- replaceMutableNode((DefaultMutableTreeNode) parentNode, editedTreeNode,
- true);
-
- if (parent.getElementName().equals("sbml")) {
- setSelectionPath(new TreePath(((DefaultMutableTreeNode) getModel().getRoot()).getPath()));
- expandAllNodes(getSelectionPath());
- } else {
- expandAllNodes(getSelectionPath().getParentPath());
- }
- } else {
- replaceMutableNode(selectedNode, createTreeNode(element),
- true);
- expandAllNodes(getSelectionPath());
- }
-
- // Update the Editor.
- editor_.fireDocumentChanged();
- // repaint();
- SBMLDocument.debug("SBMLEditor : Editing mode = " + sbase);
- }
+ expandAllNodes(getSelectionPath());
+
+ // Update the Editor.
+ editor_.fireDocumentChanged();
+ // repaint();
+ SBMLDocument.debug("SBMLEditor : Editing mode = " + sbase);
}
}
- };
+
+ };
- actions_[5] = new SBMLTemplatedAction("Clone", Main.imageIconMap.getImageIcon("clone_el"), editor)
+ actions_[5] = new SBMLTemplatedAction("Clone", Main.imageIconMap.getImageIcon("clone_el"), editor)
{
- public void doAction(ActionEvent e) throws Exception {
- DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) getSelectedNode();
-
- Object user_object = selectedNode.getUserObject();
-
- if (user_object instanceof SBase) {
- // Update the Document.
- SBase cloneObject = ((SBase) user_object).clone();
- // Update the JTree.
- appendMutableNodeTo(createTreeNode(cloneObject),
- (DefaultMutableTreeNode) selectedNode.getParent(),
- true);
- // Update the Editor.
- editor_.fireDocumentChanged();
- }
+ public void doAction(ActionEvent e) throws Exception
+ {
+ // Unsupported
+ throw new UnsupportedOperationException("The clone action is not supported and should not be used");
}
};
@@ -422,7 +442,7 @@
SBase sbase = (SBase) userObject;
// check the references
- ArrayList references = null; // TODO : check before remove : SBMLElementUtilities.checkBeforeRemove(editor.getSBMLDocument(), userObject);
+ ArrayList<String> references = SBMLUtilities.checkBeforeRemove(editor_.getSBMLDocument(), userObject);
SBMLDocument.debug("doAction Remove : references.size = " + (references == null ? 0 : references.size()));
@@ -530,123 +550,103 @@
actions_[9] = new SBMLTemplatedAction("Edit math", Main.imageIconMap.getImageIcon("annotations"), editor)
{
- public void doAction(ActionEvent e) throws Exception {
-
- SBMLMutableTreeNode selectedNode = (SBMLMutableTreeNode) getSelectedNode();
-
- Object userObject = selectedNode.getUserObject();
-
- if (userObject instanceof SBase) {
- SBase sbase = (SBase) userObject;
-
- if (selectedNode.getTagName().equals("math") || selectedNode.getTagName().endsWith("Math")) {
- // no need for that now ?? The SBMLTreeNode will contain the MathContainer element
-
- // sbase = (Element) user_object.getParentNode();
- // setSelectionPath(new TreePath(((DefaultMutableTreeNode) selected_node.getParent()).getPath()));
- }
-
- // Open the jex editor, if dirty ask to saved, clear and add the mathML
- SBMLJex jex = editor_.getJex();
-
- String id = "";
-
- if (sbase instanceof NamedSBase) {
- id = ((NamedSBase) sbase).getId();
- } else {
- id = sbase.getMetaId();
- }
-
- SBMLDocument.debug("SBMLDocumentJTree : SBMLTemplatedAction : Edit math : tagName, id = " + selectedNode.getTagName() + ", " + id);
-
- String mathMLStr = "";
-
- if (sbase instanceof MathContainer) {
- mathMLStr = ((MathContainer) sbase).getMathMLString();
-
-
- if (mathMLStr == null || mathMLStr.trim().length() == 0) {
- SBMLDocument.debug("SBMLDocumentJTree : SBMLTemplatedAction : Edit math : !!! mathMLStr was empty !!!");
- mathMLStr = SBMLJexPane.emptyStr;
- }
- if (mathMLStr != null) {
- // SBMLDocument.debug("SBMLDocumentJTree : SBMLTemplatedAction : Edit math : mathMLStr = " + mathMLStr);
-
- editor_.setEnabled(false);
-
- // jex.getGJexFrame().pack();
- jex.getGJexFrame().setVisible(true);
- jex.selectedSBMLElementId = id;
-
- jex.selectedSBMLElement = (MathContainer) sbase;
- jex.getJexPane().doAction("Update TagType JComboBox");
-
- jex.getJexPane().setMathMLEqn(mathMLStr);
- jex.getJexPane().defaultContext.dirty = false;
-
- // String infixStr = jex.getJexPane().defaultContext.getEqn().toMathML();
- // SBMLDocument.debug("SBMLDocumentJTree : infixOutput = " + jex.getJexPane().defaultContext.getEqn().toMathML());
-
- // SBMLDocument.debug("SBMLDocumentJTree : mathMLOutput = " + MathMLParser.parseInfixFormula(infixStr));
-
- // update of the tree and document done when the user save in the editor
- }
- } else {
- SBMLDocument.debug("SBMLDocumentJTree : SBMLTemplatedAction : Edit math : !!! the SBML element is not a math container !!! " + sbase);
- }
- }
+ public void doAction(ActionEvent e) throws Exception
+ {
+ openMathMLeditor("Edit math");
}
};
}
- // TODO : let only openMathMLEditor methods in one file !!!
- // the other one is in SBMLEditor.
+ /**
+ * Opens the Jex MathML editor from the selected node in the JTree.
+ *
+ * @param title the title of the Jex frame
+ */
public void openMathMLeditor(String title) {
- DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) getSelectedNode();
-
+ SBMLMutableTreeNode selectedNode = (SBMLMutableTreeNode) getSelectedNode();
Object userObject = selectedNode.getUserObject();
+ SBase sbase = null;
+
+ SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : user object = " + userObject);
+
+ if (userObject != null && userObject instanceof SBase) {
+ sbase = (SBase) userObject;
+ }
+ else if (userObject != null && userObject instanceof ASTNode)
+ {
+ sbase = (SBase) ((ASTNode) userObject).getParent();
+ setSelectionPath(new TreePath(((DefaultMutableTreeNode) selectedNode.getParent()).getPath()));
+ selectedNode = (SBMLMutableTreeNode) getSelectedNode();
+ }
+ else
+ {
+ SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : !!! the user object" +
+ " is not a math container or ASTNode !!! (" + userObject + ")");
+ }
- if (userObject instanceof MathContainer) {
- MathContainer sbase = (MathContainer) userObject;
-
- // Open the jex editor, if dirty ask to saved, clear and add the
- // mathML
- SBMLJex jex = editor.getJex(title);
+ // Open the jex editor, if dirty ask to saved, clear and add the mathML
+ SBMLJex jex = editor.getJex();
- String id = "";
-
- if (sbase instanceof NamedSBase) {
- id = ((NamedSBase) sbase).getId();
- } else {
- id = sbase.getMetaId();
- }
+ String id = "";
- SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : Edit math : tagName, id = " + sbase.getElementName() + ", " + id);
+ if (sbase instanceof NamedSBase) {
+ id = ((NamedSBase) sbase).getId();
+ } else {
+ id = sbase.getMetaId();
+ }
- String mathMLStr = sbase.getMathMLString();
+ SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : tagName, id = " + selectedNode.getTagName() + ", " + id);
- if (mathMLStr != null) {
- //SBMLDocument.debug("SBMLDocumentJTree : mathMLStr = " +
- // mathMLStr);
+ if (sbase instanceof MathContainer)
+ {
+ String mathMLStr = ((MathContainer) sbase).getMathMLString();
- editor.setEnabled(false);
+ if (mathMLStr == null || mathMLStr.trim().length() == 0)
+ {
+ SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : !!! mathMLStr was empty !!!");
+ mathMLStr = SBMLJexPane.emptyStr;
+
+ if (sbase instanceof FunctionDefinition)
+ {
+ mathMLStr = SBMLJexPane.lamdbaEmptyStr;
+ }
+ }
+
+ // SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : mathMLStr = " + mathMLStr);
- // jex.getGJexFrame().pack();
- jex.getGJexFrame().setVisible(true);
- jex.selectedSBMLElementId = id;
+ editor.setEnabled(false);
- jex.selectedSBMLElement = sbase;
- jex.getJexPane().doAction("Update TagType JComboBox");
+ // jex.getGJexFrame().pack();
+ jex.getGJexFrame().setVisible(true);
+ jex.selectedSBMLElementId = id;
- jex.getJexPane().setMathMLEqn(mathMLStr);
- jex.getJexPane().defaultContext.dirty = false;
- }
+ jex.selectedSBMLElement = (MathContainer) sbase;
+ jex.getJexPane().doAction("Update TagType JComboBox");
+
+ jex.getJexPane().setMathMLEqn(mathMLStr);
+ jex.getJexPane().defaultContext.dirty = false;
+
+ }
+ else // sbase is not a MathContainer !!
+ {
+ SBMLDocument.debug("SBMLDocumentJTree : openMathMLeditor : !!! the SBML element is not a math container !!! " + sbase);
}
- // update of the tree and document done when the user save in the editor
+
}
- /**
+ /* (non-Javadoc)
+ * @see javax.swing.JTree#setSelectionPath(javax.swing.tree.TreePath)
+ */
+ @Override
+ public void setSelectionPath(TreePath path) {
+
+ // Thread.dumpStack();
+
+ super.setSelectionPath(path);
+ }
+
+ /**
*
* Does nothing.
*
@@ -752,12 +752,15 @@
* of the form <code>className</code>(javax.swing.JFrame, {@link org.sbml.jsbml.SBMLDocument})
* or <code>className</code>(javax.swing.JFrame) (NoSuchMethodException)
*/
- public Object getInstance(String className) throws Exception {
- Class instance_class = Class.forName(className);
- Class[] parameter_types = new Class[2];
+ public Object getInstance(String className) throws Exception
+ {
+ Class<?> instance_class = Class.forName(className);
+ Class<?>[] parameter_types = new Class[2];
+
parameter_types[0] = Class.forName("javax.swing.JFrame");
parameter_types[1] = Class.forName("uk.ac.ebi.sbml.editor.SBMLDocument");
- Constructor constructor = null;
+
+ Constructor<?> constructor = null;
try {
constructor = instance_class.getConstructor(parameter_types);
} catch (NoSuchMethodException e) {
@@ -808,36 +811,42 @@
*/
public DefaultMutableTreeNode createTreeNode(SBase sbase) {
- System.out.println("SBMLDocumentJTree : createTreeNode : " + sbase.getElementName());
+ // System.out.println("SBMLDocumentJTree : createTreeNode : " + sbase.getElementName());
SBMLMutableTreeNode treeNode = new SBMLMutableTreeNode(sbase);
Map<String, String> attributes = sbase.writeXMLAttributes();
- System.out.println("SBMLDocumentJTree : createTreeNode : nb Attributes = " + attributes.size());
+ // System.out.println("SBMLDocumentJTree : createTreeNode : nb Attributes = " + attributes.size());
for (String attributeName : attributes.keySet()) {
String attributeValue = attributes.get(attributeName);
- System.out.println("SBMLDocumentJTree : createTreeNode : att " + attributeName + " = " + attributeValue);
+ // System.out.println("SBMLDocumentJTree : createTreeNode : att " + attributeName + " = " + attributeValue);
- if (sbaseFilter == null || sbaseFilter.accept(sbase, attributeName)) {
- System.out.println("SBMLDocumentJTree : createTreeNode : adding an attributeNode !!");
+ if (sbaseFilter == null || sbaseFilter.accept(sbase, attributeName))
+ {
+ // System.out.println("SBMLDocumentJTree : createTreeNode : adding an attributeNode !!");
+
treeNode.add(new AttributeTreeNode(sbase, attributeName, attributeValue));
}
}
if (sbase.isSetNotes()) {
- treeNode.add(new SBMLMutableTreeNode(sbase.getNotes()));
+ treeNode.add(createNotesTreeNode(sbase.getNotes()));
}
if (sbase.isSetAnnotation()) {
- treeNode.add(new SBMLMutableTreeNode(sbase.getAnnotation()));
+ treeNode.add(createTreeNode(sbase.getAnnotation()));
}
if (sbase instanceof MathContainer) {
- treeNode.add(new SBMLMutableTreeNode(((MathContainer) sbase).getMath()));
+ treeNode.add(createTreeNode(((MathContainer) sbase).getMath()));
}
+ if (sbase instanceof Constraint) {
+ treeNode.add(createMessageTreeNode(((Constraint) sbase).getMessage()));
+ }
- Enumeration<TreeNode> children = sbase.children();
+ @SuppressWarnings("unchecked")
+ Enumeration<TreeNode> children = (Enumeration<TreeNode>) sbase.children();
for ( ; children.hasMoreElements(); ) {
TreeNode child = children.nextElement();
@@ -845,12 +854,12 @@
if (child instanceof SBase &&
(sbaseFilter == null || sbaseFilter.accept((SBase) child)))
{
- System.out.println("SBMLDocumentJTree : createTreeNode : child = " + child);
+ // System.out.println("SBMLDocumentJTree : createTreeNode : child = " + child);
if (sbaseProcessor != null) {
child = sbaseProcessor.process((SBase) child);
}
- System.out.println("SBMLDocumentJTree : createTreeNode : child after processor = " + child);
+ // System.out.println("SBMLDocumentJTree : createTreeNode : child after processor = " + child);
if (child != null) {
treeNode.add(createTreeNode((SBase) child));
@@ -863,9 +872,72 @@
return treeNode;
}
+ /**
+ *
+ * Creates a default mutable tree node from an {@link XMLNode} element.
+ *
+ * @param xmlNode
+ * @return A new default mutable tree node displaying <code>xmlNode</code>.
+ *
+ */
+ public DefaultMutableTreeNode createTreeNode(XMLNode xmlNode) {
+ return new SBMLMutableTreeNode(xmlNode);
+ }
/**
+ *
+ * Creates a default mutable tree node from an {@link XMLNode} element.
+ *
+ * @param xmlNode
+ * @return A new default mutable tree node displaying <code>xmlNode</code>.
+ *
+ */
+ public DefaultMutableTreeNode createNotesTreeNode(XMLNode xmlNode) {
+
+ return new SBMLMutableTreeNode(xmlNode, "notes");
+ }
+
+ /**
+ *
+ * Creates a default mutable tree node from an {@link XMLNode} element.
+ *
+ * @param xmlNode
+ * @return A new default mutable tree node displaying <code>xmlNode</code>.
+ *
+ */
+ public DefaultMutableTreeNode createMessageTreeNode(XMLNode xmlNode) {
+
+ return new SBMLMutableTreeNode(xmlNode, "message");
+ }
+
+ /**
+ *
+ * Creates a default mutable tree node from an {@link Annotation} element.
+ *
+ * @param annotation
+ * @return A new default mutable tree node displaying <code>annotation</code>.
+ *
+ */
+ public DefaultMutableTreeNode createTreeNode(Annotation annotation) {
+
+ return new SBMLMutableTreeNode(annotation);
+ }
+
+ /**
+ *
+ * Creates a default mutable tree node from an {@link ASTNode} element.
+ *
+ * @param astNode
+ * @return A new default mutable tree node displaying <code>astNode</code>.
+ *
+ */
+ public DefaultMutableTreeNode createTreeNode(ASTNode astNode) {
+
+ return new SBMLMutableTreeNode(astNode);
+ }
+
+ /**
* Returns a new unique SId in the current SBML document.
*
* @param tagName The type of SBML tag for which you want a new ID.
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java 2012-06-20 16:08:14 UTC (rev 15919)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java 2012-06-22 16:37:00 UTC (rev 15920)
@@ -63,6 +63,7 @@
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
+import org.sbml.jsbml.ASTNode;
import org.sbml.jsbml.Event;
import org.sbml.jsbml.KineticLaw;
import org.sbml.jsbml.MathContainer;
@@ -209,7 +210,14 @@
documentJTree = new SBMLDocumentJTree(this);
documentJTree.setDoubleBuffered(true);
+
+ // removing JTree default KeyListeners
+ for (KeyListener l : documentJTree.getKeyListeners())
+ {
+ documentJTree.removeKeyListener(l);
+ }
+ // Adding the SBMLEditor as a keyListener
documentJTree.addKeyListener(this);
initToolBar();
@@ -1398,16 +1406,17 @@
}
- // TODO : let only openMathMLEditor methods in one file !!!
- // the other one is in SBMLDocumentJTree.
public void openMathMLEditor() {
if (openMathEditorJcheckBox.isSelected()) {
SBMLDocument.debug("SBMLEditor : trying to open the MathML editor");
// open mathML editor
- try {
- documentJTree.actions_[9].doAction(null);
- } catch (Exception ex) {
+ try
+ {
+ documentJTree.openMathMLeditor("Edit math");
+ }
+ catch (Exception ex)
+ {
if (SBMLDocument.debug) {
ex.printStackTrace();
}
@@ -2061,7 +2070,8 @@
}
- } else {
+ } else { // The ctrl key is not pressed
+
try {
switch (keyCode) {
case KeyEvent.VK_D : {
@@ -2078,16 +2088,17 @@
break;
}
case KeyEvent.VK_E : {
- SBMLDocument.debug(" edit selected element");
String selectedNodeTagName = ((SBMLMutableTreeNode) selectedNode).getTagName();
Object userObject = selectedNode.getUserObject();
-
+
+ SBMLDocument.debug(" edit selected element (" + selectedNodeTagName + ")");
+
if (selectedNodeTagName.startsWith("listOf") || selectedNodeTagName.equals("sbml")) {
return;
}
- if (userObject instanceof MathContainer) {
+ if (userObject instanceof MathContainer || userObject instanceof ASTNode) {
documentJTree.actions_[9].doAction(null);
} else {
documentJTree.actions_[4].doAction(null);
@@ -2096,7 +2107,7 @@
break;
}
- // TODO : Add 'N' and 'A' to create notes and miriam annotation
+ // TODO : Add 'N' to edit or create notes
/*
case KeyEvent.VK_N : {
SBMLDocument.debug(" add notes to the selected element");
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java 2012-06-22 16:37:00 UTC (rev 15920)
@@ -218,6 +218,7 @@
*/
protected void create() {
element = SBMLElementFactory.createElement(parent, tagName);
+ originalElement = element;
process();
}
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java 2012-06-20 16:08:14 UTC (rev 15919)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java 2012-06-22 16:37:00 UTC (rev 15920)
@@ -23,20 +23,27 @@
package uk.ac.ebi.sbml.editor.action;
import java.util.ArrayList;
+import java.util.Enumeration;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.tree.DefaultMutableTreeNode;
+import org.sbml.jsbml.ASTNode;
+import org.sbml.jsbml.Annotation;
+import org.sbml.jsbml.ListOf;
+import org.sbml.jsbml.MathContainer;
+import org.sbml.jsbml.Model;
+import org.sbml.jsbml.Reaction;
import org.sbml.jsbml.SBase;
+import org.sbml.jsbml.xml.XMLNode;
import uk.ac.ebi.sbml.editor.Main;
import uk.ac.ebi.sbml.editor.SBMLDocument;
import uk.ac.ebi.sbml.editor.SBMLDocumentJTree;
import uk.ac.ebi.sbml.editor.SBMLSchema;
import uk.ac.ebi.sbml.editor.SBMLSchema_1_2;
-// import uk.ac.ebi.sbml.editor.helper.SBMLUtilities;
import uk.ac.ebi.sbml.editor.SBMLSchema_3_1;
public class CreateContextMenu {
@@ -49,6 +56,9 @@
public void generate(DefaultMutableTreeNode treeNode, JPopupMenu menu) {
+ try {
+
+
if (!(menu instanceof JPopupMenu)) {
return;
}
@@ -56,15 +66,14 @@
if (treeNode != null) {
Object node = treeNode.getUserObject();
- if (node instanceof SBase) {
-
+ if (node instanceof SBase)
+ {
SBase sbase = (SBase) node;
int sbmlLevel = sbase.getLevel();
String elementTagName = sbase.getElementName();
- if ((elementTagName.startsWith("listOf"))) { // ||
- // (element_tagname.equals("reaction"))
+ if (sbase instanceof ListOf<?>) {
// Collapse and expand.
if (!treeNode.isLeaf()) {
@@ -73,31 +82,43 @@
menu.addSeparator();
}
// Add.
- if (elementTagName.startsWith("listOfRule")) {
-
+ if (elementTagName.startsWith("listOfRule")) // Special case for Rules
+ {
String listNames = "listOfRules";
- if (sbmlLevel == 2) {
+ if (sbmlLevel >= 2) {
listNames = "listOfRules_2";
}
- String[] childElementsName = SBMLDocument
- .getListOfChildrensTagName(listNames);
+
+ String[] childElementsName = SBMLDocument.getListOfChildrensTagName(listNames);
JMenu addNewMenu = new JMenu("Add New...");
- for (int i = 0; i < childElementsName.length; i++) {
+
+ for (int i = 0; i < childElementsName.length; i++)
+ {
addNewMenu.add(new OpenSBMLElementJDialogAction(
childElementsName[i],
- (String) SBMLDocumentJTree.elementDialogMap.get(childElementsName[i]),
+ SBMLDocumentJTree.elementDialogMap.get(childElementsName[i]),
Main.imageIconMap.getImageIcon("add_el"),
sbmlTree));
}
menu.add(addNewMenu);
- } else {
- String listof_children_tagname = SBMLDocument
- .getListOfChildrenTagName(elementTagName);
+ }
+ else // Any other elements, we are using the Map in editor.SBMLDocument
+ {
+ // TODO : we could use the content of the list to know the children name
+ // if the list is empty, we could use the list name to know the children name
+ // At least for L3 listOf
+
+ String listof_children_tagname = null;
+ try {
+ listof_children_tagname = SBMLDocument.getListOfChildrenTagName(elementTagName);
+ } catch (IllegalArgumentException e) {
+ // the list as no mapping in editor.SBMLDocument, can happen with L3 packages
+ e.printStackTrace();
+ }
+
JMenuItem menu_item = menu.add(sbmlTree.actions_[2]);
- menu_item.setIcon(Main.imageIconMap
- .getImageIcon(listof_children_tagname));
- menu_item.setText("Add New "
- + listof_children_tagname);
+ menu_item.setIcon(Main.imageIconMap.getImageIcon(listof_children_tagname));
+ menu_item.setText("Add New " + listof_children_tagname);
}
// Empty.
@@ -106,19 +127,9 @@
} else {
menu.add(sbmlTree.actions_[6]);
}
- } else {
- if (elementTagName.endsWith("math") || elementTagName.endsWith("Math")) {
- JMenuItem editMathMenuItem = menu.add(sbmlTree.actions_[9]);
- editMathMenuItem.setEnabled(false);
-
- return;
- }
-
- if (elementTagName.equals("message")) {
- menu.add(sbmlTree.actions_[4]);
- return;
- }
-
+ }
+ else // The SBase element is not a ListOf
+ {
boolean separator = false;
// Collapse and expand.
if (!treeNode.isLeaf()) {
@@ -127,242 +138,282 @@
separator = true;
}
- boolean creatorsPresent = sbase.isSetHistory() ? sbase.getHistory().getNumCreators() > 0 : false;
- boolean relationsPresent = sbase.getNumCVTerms() > 0;
+ boolean creatorsPresent = sbase.isSetHistory() ? sbase.getHistory().getCreatorCount() > 0 : false;
+ boolean relationsPresent = sbase.getCVTermCount() > 0;
- // create the add menu using the schema
+ if (separator) {
+ menu.addSeparator();
+ separator = false;
+ }
+
+ // getting the possible children to add, using the schema
+
+ int annotationIndex = 0;
+ String[] childElementsName = null;
+
+ if (sbmlLevel == 1)
+ {
+ childElementsName = SBMLSchema_1_2.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
+ }
+ else if (sbmlLevel == 3)
+ {
+ // TODO : add specific schema for L3 packages if needed
+
+ childElementsName = SBMLSchema_3_1.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
+ }
+ else if (sbmlLevel == 2)
+ {
+ childElementsName = SBMLSchema.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
+ }
+ else
+ {
+ System.out.println("We do not support yet SBML level above 3. Given SBML level found = " + sbmlLevel);
+ return;
+ }
+
+ ArrayList<String> currentChilds = new ArrayList<String>();
+
+ if (sbase.isSetNotes()) {
+ annotationIndex = 1;
+ currentChilds.add("notes");
+ }
+ if (sbase.isSetAnnotation()) {
+ currentChilds.add("annotation");
+ }
+
+ // Checking which children are already present
+ for (String childElementName : childElementsName)
+ {
+ boolean childIsSet = isSet(sbase, childElementName);
+
+ if (childIsSet) // We will put an 'add' menuitem only if the element is not set.
+ {
+ currentChilds.add(childElementName);
+ }
+ }
+
+ System.out.println("CreateContextMenu : children check done ...");
- if (!elementTagName.startsWith("listOf")) { // check not needed
-
- if (separator) {
- menu.addSeparator();
- separator = false;
- }
-
- int annotationIndex = 0;
- String[] childElementsName = null;
-
- if (sbmlLevel == 1) {
- childElementsName = SBMLSchema_1_2.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
- } else if (sbmlLevel == 3) {
- childElementsName = SBMLSchema_3_1.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
- } else {
- childElementsName = SBMLSchema.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
- }
-
- // NodeList childNodes = ((Element) dom_node).getChildNodes();
- ArrayList<String> currentChilds = new ArrayList<String>();
-
- if (sbase.isSetNotes()) {
- annotationIndex = 1;
- }
-
- /*
- // TODO : is currentChilds used ??
-
- for (int i = 0; i < childNodes.getLength(); i++) {
- if (childNodes.item(i) instanceof Element) {
- String childTagName = childNodes.item(i).getNodeName();
- currentChilds.add(childTagName);
- if (childTagName.equals(SBMLDocument.NOTES_TAG_NAME)) {
- annotationIndex = 1;
- }
- }
- }
- */
-
- int nbElementMissing = 0;
- JMenu addNewMenu = new JMenu("Add ...");
-
- String tagNameToUse = elementTagName;
- boolean addAnnotationMenu = false;
-
- if (elementTagName.equals(SBMLDocument.ANNOTATION_TAG_NAME)) {
- tagNameToUse = sbase.getParentSBMLObject().getElementName();
- }
-
- // TODO : remove this test to allow annotation to be added anywhere ??
- if (tagNameToUse.equals(SBMLDocument.MODEL_TAG_NAME)
- || tagNameToUse.equals(SBMLDocument.COMPARTMENT_TAG_NAME)
- || tagNameToUse.startsWith("specie")
- || tagNameToUse.equals(SBMLDocument.REACTION_TAG_NAME)
- || tagNameToUse.endsWith("Rule")
- || tagNameToUse.equals("event")
- || tagNameToUse.equals("parameter"))
- {
- addNewMenu.add(new OpenSBMLElementJDialogAction(
- SBMLSchema.MIRIAM_ANNOTATION_NAME, (String) SBMLDocumentJTree.elementDialogMap
- .get(SBMLSchema.MIRIAM_ANNOTATION_NAME),
- Main.imageIconMap
- .getImageIcon("add_el"), annotationIndex, sbmlTree));
- addAnnotationMenu = true;
- }
- if (tagNameToUse.equals("model") || sbmlLevel > 2) {
- addNewMenu.add(new OpenSBMLElementJDialogAction(
- SBMLSchema.DC_CREATOR_TAG_NAME, (String) SBMLDocumentJTree.elementDialogMap
- .get(SBMLSchema.DC_CREATOR_TAG_NAME),
- Main.imageIconMap
- .getImageIcon("add_el"), annotationIndex, sbmlTree));
- addAnnotationMenu = true;
- }
-
- for (int i = 0; i < childElementsName.length; i++) {
- if (!currentChilds.contains(childElementsName[i])) {
- if (childElementsName[i].startsWith("listOf")) {
- if (elementTagName.equals(SBMLDocument.KINETIC_LAW_TAG_NAME)) {
-
- addNewMenu.add(new AddChildAction(
- childElementsName[i], childElementsName[i],
- Main.imageIconMap
- .getImageIcon("add_el"), sbmlTree, -1));
- } else {
+ int nbElementMissing = 0;
+ JMenu addNewMenu = new JMenu("Add ...");
- addNewMenu.add(new AddChildAction(
- childElementsName[i],
- childElementsName[i],
- Main.imageIconMap.getImageIcon("add_el"),
- sbmlTree,
- i - nbElementMissing));
- }
- } else {
+ // miriam annotation are allowed anywhere
+ addNewMenu.add(new OpenSBMLElementJDialogAction(
+ SBMLSchema.MIRIAM_ANNOTATION_NAME,
+ SBMLDocumentJTree.elementDialogMap.get(SBMLSchema.MIRIAM_ANNOTATION_NAME),
+ Main.imageIconMap.getImageIcon("add_el"),
+ annotationIndex,
+ sbmlTree));
- addNewMenu.add(new OpenSBMLElementJDialogAction(
- childElementsName[i],
- (String) SBMLDocumentJTree.elementDialogMap.get(childElementsName[i]),
- Main.imageIconMap.getImageIcon("add_el"),
- i - nbElementMissing,
- sbmlTree));
-
- }
- nbElementMissing++;
- }
- }
- if (nbElementMissing > 0 || addAnnotationMenu) {
- menu.add(addNewMenu);
- }
- }
+ // add creator menuitem
+ if (sbase instanceof Model || sbmlLevel > 2)
+ {
+ addNewMenu.add(new OpenSBMLElementJDialogAction(
+ SBMLSchema.DC_CREATOR_TAG_NAME,
+ SBMLDocumentJTree.elementDialogMap.get(SBMLSchema.DC_CREATOR_TAG_NAME),
+ Main.imageIconMap.getImageIcon("add_el"),
+ annotationIndex,
+ sbmlTree));
+ }
- // Edit, clone and remove.
+ for (int i = 0; i < childElementsName.length; i++)
+ {
+ if (!currentChilds.contains(childElementsName[i]))
+ {
+ if (childElementsName[i].startsWith("listOf"))
+ {
+ if (elementTagName.equals(SBMLDocument.KINETIC_LAW_TAG_NAME))
+ {
+ addNewMenu.add(new AddChildAction(
+ childElementsName[i], childElementsName[i],
+ Main.imageIconMap
+ .getImageIcon("add_el"), sbmlTree, -1));
+ }
+ else
+ {
+ addNewMenu.add(new AddChildAction(
+ childElementsName[i],
+ childElementsName[i],
+ Main.imageIconMap.getImageIcon("add_el"),
+ sbmlTree,
+ i - nbElementMissing));
+ }
+ }
+ else // Any name not starting by 'listOf'
+ {
+ addNewMenu.add(new OpenSBMLElementJDialogAction(
+ childElementsName[i],
+ SBMLDocumentJTree.elementDialogMap.get(childElementsName[i]),
+ Main.imageIconMap.getImageIcon("add_el"),
+ i - nbElementMissing,
+ sbmlTree));
+
+ }
+ nbElementMissing++;
+ }
+ }
+
+ menu.add(addNewMenu);
+
+ // Edit, clone.
- elementTagName = elementTagName.intern();
- if (!elementTagName.endsWith("math")) {
- if (separator) {
- menu.addSeparator();
- separator = false;
- }
- if ((creatorsPresent || relationsPresent)) {
- // && (element_tagname.equals(SBMLDocument.ANNOTATION_TAG_NAME)
-
- JMenu editMenu = new JMenu("Edit ...");
-
- if (relationsPresent) {
- editMenu.add(new OpenSBMLElementJDialogAction(
- SBMLSchema.MIRIAM_ANNOTATION_NAME, (String) SBMLDocumentJTree.elementDialogMap
- .get(SBMLSchema.MIRIAM_ANNOTATION_NAME),
- Main.imageIconMap
- .getImageIcon("add_el"), sbmlTree, OpenSBMLElementJDialogAction.EDITION));
- }
- if (creatorsPresent) {
- editMenu
- .add(new OpenSBMLElementJDialogAction(
- SBMLSchema.DC_CREATOR_TAG_NAME, (String) SBMLDocumentJTree.elementDialogMap
- .get(SBMLSchema.DC_CREATOR_TAG_NAME),
- Main.imageIconMap
- .getImageIcon("add_el"), sbmlTree, OpenSBMLElementJDialogAction.EDITION));
- }
-
- if (!treeNode.isRoot()) {
- JMenuItem editMenuItem = editMenu.add(sbmlTree.actions_[4]);
- editMenuItem.setText(elementTagName);
- }
-
+ elementTagName = elementTagName.intern();
- if (elementTagName.equals(SBMLDocument.REACTION_TAG_NAME)
- || elementTagName.equals(SBMLDocument.KINETIC_LAW_TAG_NAME)
- || elementTagName.equals(SBMLDocument.FUNCTION_DEFINITION_TAG_NAME)
- || elementTagName.endsWith("Rule")
- || elementTagName.equals(SBMLDocument.TRIGGER_TAG_NAME)
- || elementTagName.equals(SBMLDocument.DELAY_TAG_NAME)
- || elementTagName.equals(SBMLDocument.SPECIES_REF_TAG_NAME)
- || elementTagName.equals(SBMLDocument.MODIFIER_SPECIES_REF_TAG_NAME)
- || elementTagName.equals(SBMLDocument.EVENT_ASSIGNMENT_TAG_NAME)
- || elementTagName.equals(SBMLDocument.INITIAL_ASSIGNMENT_TAG_NAME)
- || elementTagName.equals(SBMLDocument.CONSTRAINT_TAG_NAME))
- {
- JMenuItem editMathMenuItem = editMenu.add(sbmlTree.actions_[9]);
- editMathMenuItem.setEnabled(false);
-
- }
-
- menu.add(editMenu);
- } else if (!treeNode.isRoot()) {
- menu.add(sbmlTree.actions_[4]);
-
- if (elementTagName.equals(SBMLDocument.REACTION_TAG_NAME)
- || elementTagName.equals(SBMLDocument.KINETIC_LAW_TAG_NAME)
- || elementTagName.equals(SBMLDocument.FUNCTION_DEFINITION_TAG_NAME)
- || elementTagName.endsWith("Rule")
- || elementTagName.equals(SBMLDocument.TRIGGER_TAG_NAME)
- || elementTagName.equals(SBMLDocument.DELAY_TAG_NAME)
- || elementTagName.equals(SBMLDocument.SPECIES_REF_TAG_NAME)
- || elementTagName.equals(SBMLDocument.MODIFIER_SPECIES_REF_TAG_NAME)
- || elementTagName.equals(SBMLDocument.EVENT_ASSIGNMENT_TAG_NAME)
- || elementTagName.equals(SBMLDocument.INITIAL_ASSIGNMENT_TAG_NAME)
- || elementTagName.equals(SBMLDocument.CONSTRAINT_TAG_NAME))
- {
- JMenuItem editMathMenuItem = menu.add(sbmlTree.actions_[9]);
- editMathMenuItem.setEnabled(false);
- }
- }
- }
+ if (separator) {
+ menu.addSeparator();
+ separator = false;
+ }
+ if ((creatorsPresent || relationsPresent || sbase.isSetNotes() || sbase.isSetAnnotation()))
+ {
+ JMenu editMenu = new JMenu("Edit ...");
+
+ if (relationsPresent)
+ {
+ editMenu.add(new OpenSBMLElementJDialogAction(
+ SBMLSchema.MIRIAM_ANNOTATION_NAME,
+ SBMLDocumentJTree.elementDialogMap.get(SBMLSchema.MIRIAM_ANNOTATION_NAME),
+ Main.imageIconMap.getImageIcon("add_el"),
+ sbmlTree,
+ OpenSBMLElementJDialogAction.EDITION));
+ }
+ if (creatorsPresent)
+ {
+ editMenu.add(new OpenSBMLElementJDialogAction(
+ SBMLSchema.DC_CREATOR_TAG_NAME,
+ SBMLDocumentJTree.elementDialogMap.get(SBMLSchema.DC_CREATOR_TAG_NAME),
+ Main.imageIconMap.getImageIcon("add_el"),
+ sbmlTree,
+ OpenSBMLElementJDialogAction.EDITION));
+ }
+
+ if (sbase.isSetNotes()) {
+ // Add edit notes
+ JMenuItem editMenuItem = editMenu.add(sbmlTree.actions_[4]);
+ editMenuItem.setText("notes");
+ }
+
+ if (sbase.isSetAnnotation())
+ {
+ // Add edit annotation
+ JMenuItem editMenuItem = editMenu.add(sbmlTree.actions_[4]);
+ editMenuItem.setText("annotation");
+ }
+
+ if (!treeNode.isRoot())
+ {
+ JMenuItem editMenuItem = editMenu.add(sbmlTree.actions_[4]);
+ editMenuItem.setText(elementTagName);
+ }
+
+
+ if (sbase instanceof MathContainer || sbase instanceof Reaction)
+ {
+ editMenu.add(sbmlTree.actions_[9]);
+ }
+
+ menu.add(editMenu);
+ }
+ else if (!treeNode.isRoot())
+ {
+ menu.add(sbmlTree.actions_[4]);
+
+ if (sbase instanceof MathContainer || sbase instanceof Reaction)
+ {
+ menu.add(sbmlTree.actions_[9]);
+ }
+ }
+
// remove
- if (!elementTagName.endsWith("math")
- && !elementTagName.equals("kineticLaw")) {
- if (separator) {
- menu.addSeparator();
- }
-
- if ((creatorsPresent || relationsPresent)) {
- // && (element_tagname.equals(SBMLDocument.ANNOTATION_TAG_NAME)
-
- JMenu removeMenu = new JMenu("Remove ...");
-
- if (relationsPresent) {
- removeMenu.add(new OpenSBMLElementJDialogAction(
- SBMLSchema.MIRIAM_ANNOTATION_NAME, (String) SBMLDocumentJTree.elementDialogMap
- .get(SBMLSchema.DC_RELATION_TAG_NAME),
- Main.imageIconMap
- .getImageIcon("add_el"), sbmlTree, OpenSBMLElementJDialogAction.DELETION));
- }
- if (creatorsPresent) {
- removeMenu
- .add(new OpenSBMLElementJDialogAction(
- SBMLSchema.DC_CREATOR_TAG_NAME, (String) SBMLDocumentJTree.elementDialogMap
- .get(SBMLSchema.DC_CREATOR_TAG_NAME),
- Main.imageIconMap
- .getImageIcon("add...
[truncated message content] |
|
From: <nik...@us...> - 2012-06-20 16:08:27
|
Revision: 15919
http://sbml.svn.sourceforge.net/sbml/?rev=15919&view=rev
Author: niko-rodrigue
Date: 2012-06-20 16:08:14 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
SBMLeditor update : all dialogs working fine and updated to L3. Removed old libsbml related jars, will add later libsbml-5.5
Modified Paths:
--------------
trunk/sbmleditor/TODO.txt
trunk/sbmleditor/src/edu/ucla/sscnet/levine/jex/parser/MathMLParser.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJex.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJexPane.java
trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/parser/MathMLParser.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/Main.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventAssignmentJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/FunctionDefinitionJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ModelJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ParameterJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/RulesJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/UnitJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/ComplexTypeJComboBox.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/SBaseJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/sbw/SBWEditor.java
Added Paths:
-----------
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLSchema_3_1.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/PriorityJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/TriggerJDialog.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/SBMLUtilities.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/sbml-l3v1-pseudo.xsd
Removed Paths:
-------------
trunk/sbmleditor/buildOrg.xml
trunk/sbmleditor/lib/libsbml-2.3.4-utils.jar
trunk/sbmleditor/lib/libsbml-3.0.0-prerelease-utils.jar
trunk/sbmleditor/lib/libsbml-3.1.0-utils.jar
trunk/sbmleditor/lib/libsbml-3.1.x-utils.jar
trunk/sbmleditor/lib/libsbml-3.2.0-utils.jar
trunk/sbmleditor/lib/libsbml-3.4.0-utils.jar
trunk/sbmleditor/lib/libsbml-4.0.0-utils.jar
trunk/sbmleditor/lib/libsbmlj-2.3.4.jar
trunk/sbmleditor/lib/libsbmlj-3.0.0-prerelease.jar
trunk/sbmleditor/lib/libsbmlj-3.1.0.jar
trunk/sbmleditor/lib/libsbmlj-3.1.x.jar
trunk/sbmleditor/lib/libsbmlj-3.2.0.jar
trunk/sbmleditor/lib/libsbmlj-3.4.0.jar
trunk/sbmleditor/lib/libsbmlj-4.0.0.jar
trunk/sbmleditor/make-libsbml-utils
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-2.3.4
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-3.0.0
trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-3.1.0
Modified: trunk/sbmleditor/TODO.txt
===================================================================
--- trunk/sbmleditor/TODO.txt 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/TODO.txt 2012-06-20 16:08:14 UTC (rev 15919)
@@ -1,18 +1,34 @@
- - allow to set the id if it was not set before
+ - add back the conversion between levels and versions (try to add the SBFC converters)
- - check what to do to remove an element if the id is not defined !!! (for SpeciesRefence for ex)
+ - displaying constraint message !!
- - create localParameter not working
+ - identifierException after trying to add twice a FunctionDefinition (with an error return in between)
- - update the kineticLaw math after modification
+ - when editing a model element, the whole tree is rebuild as we do a deep clone of the model and replace it afterward in the tree !!
- - open math editor from the reaction
+ - edit trigger or delay or eventAssignment deleting the event in the JTree !!
- - check what kind of nodes is created automatically when adding reaction or kineticLaw math
+ - when creating a delay or a priority it is not going at the right place.
+
+ - creates Notes, miriam annotation not working
+
+ - edit for notes, with shortcut and menu item
+
+ - make the open math menu item work
- - check which unit kind are allowed in L3
+ - add SpeciesReference and Reaction to the possible tag type for mathML, rules, eventAssignment, ...
+ - display infix math only for MathContainer !! (Add an option to display mathML ??)
+
+ - allow to set the id if it was not set before
+
+ - check what to do to remove an element if the id is not defined !!! (for SpeciesRefence for ex)
+
+ - open math editor from the reaction
+
+ - check which unit kind are allowed in L3 (update the pseudo schema if needed)
+
- enforce non-optional L3 attributes ? (may be with an option only)
- set L2V4 defaults with a button or check box or option ??
@@ -25,21 +41,21 @@
- rename SBaseFilter as we are filtering any JSBML treenode objects
+ - update the miriam qualifiers and export
+
+ - check that we put only valid id in the UnitJComboBox
- - integrate jsbml to replace libSBML and avoid any dependencies outside of java
+-------------------------
+If there is time
+-------------------------
- - support for SBML level 3 and his packages
-
- - update the possible tag names to include reaction and any other like speciesReferences.
- - update the Event dialog to integrate the new constructs.
- - update the model dialog
- - update the reaction dialog to add the compartment JComboBox for L3
- - update the miriam qualifiers
-
- - check that we put only valid id in the UnitJComboBox
+ - transform urn into identifiers.org url and have a clickable link !!
+ - see if this could be useful for html display : http://code.google.com/p/flying-saucer/
- integrate the Biomodels.net converters
+ - support for SBML level 3 packages
+
- improved support for SBO : tree of the ontology with search,
auto-completion on dialogs, access to SBO webservice...
@@ -56,5 +72,4 @@
- maintain a map to be able to hide/display specific ids (low priority) ??
- - transform urn into identifiers.org url and have a clickable link !!
\ No newline at end of file
Deleted: trunk/sbmleditor/buildOrg.xml
===================================================================
--- trunk/sbmleditor/buildOrg.xml 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/buildOrg.xml 2012-06-20 16:08:14 UTC (rev 15919)
@@ -1,252 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: buildOrg.xml,v 1.2 2007/05/25 10:14:10 rodrigue Exp $ -->
-
-<project default ="usage" basedir=".">
- <!-- =================================================================== -->
- <!-- Initialization target -->
- <!-- =================================================================== -->
-
- <target name="init">
- <tstamp>
- <format property="YEAR" pattern="yyyy"/>
- </tstamp>
-
- <property name="name" value="cSBML"/>
- <property name="version" value="0.6"/>
- <property name="compneur.version" value="1.1.1"/>
-
- <property name="year" value="${YEAR}"/>
-
- <echo message="----------- ${name} ${version} [${year}] ------------"/>
- <echo message="----------- ${TODAY} ------------"/>
- <echo message="----------- ${DSTAMP} ${TSTAMP} ------------"/>
-
- <property environment="env"/>
- <property name="build.compiler" value="modern"/>
- <property name="build.sysclasspath" value="ignore"/>
- <property name="debug" value="on"/>
- <property name="optimize" value="off"/>
- <property name="deprecation" value="false"/>
- <property name="depend" value="true"/>
- <property name="verbose" value="false"/>
-
- <property name="build.number" value="${DSTAMP}-${TSTAMP}"/>
- <property name="build.name" value="${version} (build ${build.number})"/>
-
- <property name="cvs.root" value=":pserver:rod...@cv...:/ebi/cvs/compneur"/>
- <property name="cvs.package" value="compneur/sbml"/>
- <property name="group.home" value="/ebi/research/compneur"/>
- <property name="src.dir" value="${basedir}/src"/>
- <property name="build.dir" value="${basedir}/build"/>
- <property name="build.src" value="${basedir}/build/src"/>
- <property name="build.dest" value="${basedir}/build/classes"/>
- <property name="build.javadocs" value="${basedir}/build/apidocs"/>
- <property name="jars.dir" value="${basedir}/lib"/>
- <property name="dist.root" value="${basedir}/dist"/>
- <property name="dist.dir" value="${dist.root}/${name}-${version}"/>
- <property name="package.dir" value="${basedir}/build/package"/>
- <property name="compneur.dir" value="${basedir}/../../Jcompneur"/>
-
- <filter token="year" value="${year}"/>
- <filter token="version" value="${version}"/>
- <filter token="date" value="${TODAY}"/>
- <filter token="log" value="true"/>
- <filter token="verbose" value="true"/>
-
- <!-- add everything needed to the classpath -->
- <!-- adjust the settings to your local environment -->
- <!-- <pathelement location="${jars.dir}/libsbmlj.jar" /> -->
- <path id="cSBML.classpath">
- <pathelement location="${jars.dir}/commons-digester-1.8.jar" />
- <pathelement location="${jars.dir}/commons-beanutils-1.7.0.jar" />
- <pathelement location="${jars.dir}/xml-apis.jar" />
- <pathelement location="${jars.dir}/xercesImpl.jar" />
- <pathelement location="${jars.dir}/libsbmlj.jar" />
- <pathelement location="${jars.dir}/castor-1.1-xml.jar" />
- <pathelement location="${jars.dir}/compneur-1.1.1.jar" />
- <pathelement location="${jars.dir}/SBOWSLib-20070110.jar" />
- <pathelement location="${jars.dir}/SBWCore.jar" />
- <pathelement location="${jars.dir}/xalan-2.7.0.jar" />
- </path>
- </target>
-
- <!-- =================================================================== -->
- <!-- Help on usage -->
- <!-- =================================================================== -->
- <target name="usage">
- <echo message=""/>
- <echo message=""/>
- <echo message="cSBML Build file"/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=" available targets are:"/>
- <echo message=""/>
- <echo message=" compile --> compiles the source code"/>
- <echo message=" jar --> generates the cSBML.jar file"/>
- <echo message=" run --> runs the SBMLReader"/>
- <echo message=" javadoc --> generates the API documentation"/>
- <echo message=" clean --> cleans up the directory"/>
- <echo message=""/>
- <echo message=" See the comments inside the buildOrg.xml file for more details."/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=""/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepares the build directory -->
- <!-- =================================================================== -->
- <target name="prepare" depends="init">
- <mkdir dir="${build.dir}"/>
- <echo message="Done"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Prepares the source code -->
- <!-- =================================================================== -->
- <target name="prepare-src" depends="prepare">
- <!-- create directories -->
- <mkdir dir="${build.src}"/>
- <mkdir dir="${build.dest}"/>
- <mkdir dir="${package.dir}"/>
- <mkdir dir="${dist.root}"/>
- <mkdir dir="${dist.dir}"/>
-
- <!-- copy src files -->
- <copy todir="${build.src}" overwrite="yes">
- <fileset
- dir="${src.dir}"
- excludes="**/CVS*, **/*.class, **/*~, **/*.tgz, **/*.zip, uk/**, edu/**">
- </fileset>
- </copy>
-
- </target>
-
-
- <!-- TODO : put a release number somewhere using this task
- =================================================================== -->
- <!-- Modify somes files -->
- <!-- =================================================================== -->
- <target name="gen-build-number" unless="dev.mode">
- <echo message="Updating the files with the build number..."/>
-
- <replace file="${basedir}/doc/Readme.html"
- token="[BUILD.NUMBER]"
- value="${build.name}" />
-
- <replace dir="${basedir}/installer"
- includes="**/*.xml"
- token="[BUILD.NUMBER]"
- value="${build.name}" />
- </target>
-
- <!-- TODO : put a release number somewhere using this task
- =================================================================== -->
- <!-- Modify back somes files -->
- <!-- =================================================================== -->
- <target name="gen-build-number-back" depends="jar" unless="dev.mode">
- <echo message="Updating back the files with [BUILD.NUMBER]..."/>
-
-
- <replace file="${basedir}/doc/Readme.html"
- token="${build.name}"
- value="[BUILD.NUMBER]" />
-
- <replace dir="${basedir}/installer"
- includes="**/*.xml"
- token="${build.name}"
- value="[BUILD.NUMBER]" />
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Compiles the source directory -->
- <!-- =================================================================== -->
- <target name="compile" depends="prepare-src">
- <javac srcdir="${build.src}"
- destdir="${build.dest}"
- debug="${debug}"
- optimize="${optimize}"
- verbose="${verbose}"
- source="1.5"
- target="1.5"
- classpathref="cSBML.classpath">
- </javac>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Creates the class package -->
- <!-- =================================================================== -->
- <target name="jar" depends="compile">
-
- <copy todir="${build.dest}">
- <fileset
- dir="${src.dir}"
- includes="**/*.png **/*.gif **/*.xsd **/*.tmpl **/data/* **/*.xml"
- excludes="uk/** edu/**">
- </fileset>
- </copy>
- <jar jarfile="${build.dir}/${name}.jar"
- basedir="${build.dest}"/>
- <copy todir="${basedir}/lib" preservelastmodified="true" overwrite="true" verbose="true">
- <fileset
- dir="${build.dir}"
- includes="${name}.jar">
- </fileset>
- </copy>
- </target>
-
-
-
- <!-- =================================================================== -->
- <!-- Runs the editor -->
- <!-- =================================================================== -->
- <target name="run" depends="init">
-
- <java classname="org.sbml.xml.SBMLReader">
- <classpath>
- <path refid="cSBML.classpath"/>
- <pathelement location="${build.dir}/${name}.jar"/>
- </classpath>
- </java>
-
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Creates the API documentation -->
- <!-- =================================================================== -->
- <target name="javadoc" depends="prepare-src">
- <mkdir dir="${build.javadocs}"/>
- <javadoc packagenames="org.*"
- sourcepath="${build.src}"
- destdir="${build.javadocs}"
- classpathref="sbml.classpath"
- maxmemory="96m"
- author="true"
- version="true"
- use="true"
- splitindex="true"
- noindex="false"
- windowtitle="${Name} API"
- doctitle="${Name}"
- breakiterator="yes"
- >
- <link href="http://java.sun.com/j2se/1.6.0/docs/api"/>
- </javadoc>
- </target>
-
- <!-- =================================================================== -->
- <!-- Cleans everything -->
- <!-- =================================================================== -->
- <target name="clean" depends="init">
- <delete includeEmptyDirs="true" quiet="yes">
- <fileset dir="${build.dir}" includes="**/*"/>
- </delete>
- <delete dir="${dist.root}" includeEmptyDirs="true" quiet="yes">
- </delete>
- </target>
-</project>
-
-<!-- End of file -->
Deleted: trunk/sbmleditor/lib/libsbml-2.3.4-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbml-3.0.0-prerelease-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbml-3.1.0-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbml-3.1.x-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbml-3.2.0-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbml-3.4.0-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbml-4.0.0-utils.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-2.3.4.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-3.0.0-prerelease.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-3.1.0.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-3.1.x.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-3.2.0.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-3.4.0.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/lib/libsbmlj-4.0.0.jar
===================================================================
(Binary files differ)
Deleted: trunk/sbmleditor/make-libsbml-utils
===================================================================
--- trunk/sbmleditor/make-libsbml-utils 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/make-libsbml-utils 2012-06-20 16:08:14 UTC (rev 15919)
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-rm -rf build/*
-
-cd src
-
-cp uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-2.3.4 uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-javac -source 1.4 -target 1.4 -d ../build/ -cp ../lib/libsbmlj-2.3.4.jar:../lib/compneur-2.1.jar uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-cd ../build
-
-jar cvf libsbml-2.3.4-utils.jar uk
-cp libsbml-2.3.4-utils.jar ../lib
-rm -rf *
-
-cd ../src
-
-cp uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-3.0.0 uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-javac -source 1.4 -target 1.4 -d ../build/ -cp ../lib/libsbmlj-3.0.0-prerelease.jar:../lib/compneur-2.1.jar uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-cd ../build
-
-jar cvf libsbml-3.0.0-prerelease-utils.jar uk
-
-cp libsbml-3.0.0-prerelease-utils.jar ../lib
-
-rm -rf *
-
-cd ../src
-
-cp uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-3.1.0 uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-javac -source 1.4 -target 1.4 -d ../build/ -cp ../lib/libsbmlj-3.1.0.jar:../lib/compneur-2.1.jar uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-cd ../build
-
-jar cvf libsbml-3.1.0-utils.jar uk
-
-cp libsbml-3.1.0-utils.jar ../lib
-rm -rf *
-
-cd ../src
-
-cp uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java-libsbml-4.0.0 uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-javac -source 1.4 -target 1.4 -d ../build/ -cp ../lib/libsbmlj-4.0.0.jar:../lib/compneur-2.1.jar uk/ac/ebi/sbml/editor/helper/LibSBMLUtilities.java
-
-cd ../build
-
-jar cvf libsbml-4.0.0-utils.jar uk
-
-cp libsbml-4.0.0-utils.jar ../lib
-
-
-
Modified: trunk/sbmleditor/src/edu/ucla/sscnet/levine/jex/parser/MathMLParser.java
===================================================================
--- trunk/sbmleditor/src/edu/ucla/sscnet/levine/jex/parser/MathMLParser.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/edu/ucla/sscnet/levine/jex/parser/MathMLParser.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -29,7 +29,7 @@
import org.sbml.jsbml.JSBML;
import org.sbml.jsbml.text.parser.ParseException;
-// import uk.ac.ebi.sbml.editor.helper.LibSBMLUtilities;
+// import uk.ac.ebi.sbml.editor.helper.SBMLUtilities;
import edu.ucla.sscnet.levine.jex.Jex;
import edu.ucla.sscnet.levine.jex.layout.MathBox;
import edu.ucla.sscnet.levine.jex.layout.RowBox;
@@ -128,7 +128,7 @@
*/
public String parseInfixFormula(String formula) {
- String mathMLString = null; // LibSBMLUtilities.infixToMathML(formula);
+ String mathMLString = null; // SBMLUtilities.infixToMathML(formula);
try {
mathMLString = JSBML.parseFormula(formula).toMathML();
} catch (ParseException e) {
Modified: trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJex.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJex.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJex.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -326,8 +326,8 @@
long validationErrors = 0;
// TODO : replace
-// if (LibSBMLUtilities.isLibSBMLAvailable()) {
-// validationErrors = LibSBMLUtilities.validate(document_);
+// if (SBMLUtilities.isLibSBMLAvailable()) {
+// validationErrors = SBMLUtilities.validate(document_);
// }
// boolean document_tobesaved = false;
Modified: trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJexPane.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJexPane.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/SBMLJexPane.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -33,8 +33,10 @@
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
+import org.sbml.jsbml.JSBML;
import org.sbml.jsbml.KineticLaw;
import org.sbml.jsbml.Reaction;
+import org.sbml.jsbml.SBase;
import uk.ac.ebi.compneur.xml.ui.XMLJFileChooser;
import uk.ac.ebi.mathml.editor.event.JexSetMathItemListener;
@@ -53,9 +55,18 @@
public SBMLJex jex;
- public static String emptyStr = "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n\n</math>";
+ public static String emptyStr =
+ "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n" +
+ " <cn>0</cn>\n" +
+ "</math>";
-
+ public static String lamdbaEmptyStr =
+ "<math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n" +
+ " <lambda>" +
+ " <cn type=\"integer\"> 0 </cn>" +
+ " </lambda>" +
+ "</math>";
+
private XMLJFileChooser openXmlFilechooser = new XMLJFileChooser();
@@ -154,7 +165,7 @@
if (action.equals("Update SBML model")) {
- SBMLDocument.debug("JexPane : doAction(Update SBML model)");
+ SBMLDocument.debug("SBMLJexPane : doAction(Update SBML model)");
SBMLDocument sbmlDocument = jex.sbmlDocument;
@@ -172,9 +183,8 @@
if (action.equals("Update TagType JComboBox")) {
- SBMLDocument.debug("JexPane : doAction(Update TagType JComboBox)");
+ SBMLDocument.debug("SBMLJexPane : doAction(Update TagType JComboBox)");
- SBMLDocument sbmlDocument = jex.sbmlDocument;
String elementTagName = jex.selectedSBMLElement.getElementName();
boolean needLocalParam = false;
@@ -229,7 +239,7 @@
String mathMLString = defaultContext.getEqn().toMathML();
mathMLString = new MathMLParser(jex).parseInfixFormula(mathMLString);
- SBMLDocument.debug("JexPane : doAction(Save) : mathMLStr = \n." + mathMLString + ".");
+ SBMLDocument.debug("SBMLJexPane : doAction(Save) : mathMLStr = \n." + mathMLString + ".");
// check to see if the MathML String is empty before saving
if (mathMLString.equals(emptyStr)) {
@@ -239,16 +249,14 @@
if (jex.selectedSBMLElement != null) {
- // TODO : update
+ jex.selectedSBMLElement.setMath(JSBML.readMathMLFromString(mathMLString));
- // jex.sbmlDocument.setMathMLString(jex.selectedSBMLElement, mathMLString);
+ if (!jex.selectedSBMLElement.getElementName().equals(SBMLDocument.KINETIC_LAW_TAG_NAME)) {
+ jex.sbmlDocument.updateElementReferences(jex.selectedSBMLElement);
+ } else {
+ jex.sbmlDocument.updateElementReferences((SBase) jex.selectedSBMLElement.getParent());
+ }
-// if (!jex.selectedSBMLElement.getTagName().equals(SBMLDocument.KINETIC_LAW_TAG_NAME)) {
-// jex.sbmlDocument.updateElementReferences(jex.selectedSBMLElement);
-// } else {
-// jex.sbmlDocument.updateElementReferences((Element) jex.selectedSBMLElement.getParentNode());
-// }
-
// replace the specific element not to have to refresh everything
jex.sbmlEditor.updateDocumentTree(jex.selectedSBMLElement);
Modified: trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/parser/MathMLParser.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/parser/MathMLParser.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/mathml/editor/parser/MathMLParser.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -363,7 +363,7 @@
SBMLDocument.debug(" MATMLParser : parseInfixFormula : formula with ids = " + formula);
- String mathMLString = null; // LibSBMLUtilities.infixToMathML(formula);
+ String mathMLString = null; // SBMLUtilities.infixToMathML(formula);
try {
mathMLString = JSBML.parseFormula(formula).toMathML();
} catch (ParseException e) {
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/Main.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/Main.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/Main.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -86,7 +86,7 @@
initImageIconMap();
-// boolean isLibSBMLAvailable = LibSBMLUtilities.isLibSBMLAvailable();
+// boolean isLibSBMLAvailable = SBMLUtilities.isLibSBMLAvailable();
//
// if (!isLibSBMLAvailable) {
// JOptionPane.showMessageDialog(null, "You are running SBMLeditor without having libSBML installed on your system.\n\n" +
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocument.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -54,6 +54,7 @@
import org.sbml.jsbml.Species;
import org.sbml.jsbml.SpeciesReference;
import org.sbml.jsbml.SpeciesType;
+import org.sbml.jsbml.Unit;
import org.sbml.jsbml.UnitDefinition;
@@ -201,6 +202,7 @@
nameToListOfMap.put("assignmentRule", "listOfRules");
nameToListOfMap.put("rateRule", "listOfRules");
nameToListOfMap.put("parameter", "listOfParameters");
+ nameToListOfMap.put("localParameter", "listOfLocalParameters");
nameToListOfMap.put("reaction", "listOfReactions");
nameToListOfMap.put("kineticLaw", "reaction");
nameToListOfMap.put("speciesReference", "listOfReactants");
@@ -224,6 +226,7 @@
listOfToNameMap.put("listOfCompartments", "compartment");
listOfToNamesMap.put("listOfRules", rules_l1);
listOfToNamesMap.put("listOfRules_2", rules_l2);
+ listOfToNamesMap.put("listOfRules_3", rules_l2);
listOfToNamesMap.put("model", new String[] { NOTES_TAG_NAME, ANNOTATION_TAG_NAME,
"listOfUnitDefinitions", "listOfCompartments", "listOfSpecies",
"listOfParameters", "listOfRules", "listOfReactions"});
@@ -238,6 +241,7 @@
listOfToNameMap.put("listOfReactants", "reactant");
listOfToNameMap.put("listOfProducts", "product");
listOfToNameMap.put("listOfModifiers", "modifier");
+ listOfToNameMap.put("listOfLocalParameters", "localParameter");
listOfToNameMap.put("listOfUnits", "unit");
listOfToNameMap.put("unitDefinition", "listOfUnits");
@@ -1370,6 +1374,10 @@
*/
public void updateElementReferences(SBase element) {
+ if (element instanceof Unit) {
+ return;
+ }
+
String xmlPath = getXMLPath(element);
ArrayList<String> referedIds = refToIdsMap.get(xmlPath);
@@ -1950,13 +1958,15 @@
return SPECIES;
} else if (element instanceof Parameter) {
return PARAMETER;
+ } else if (element instanceof LocalParameter) {
+ return PARAMETER;
} else if (element instanceof Reaction) {
return REACTION;
} else if (element instanceof Event) {
return EVENT;
}
- return 0;
+ return -1;
}
/**
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLDocumentJTree.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -64,7 +64,7 @@
import uk.ac.ebi.sbml.editor.tree.AttributeTreeNode;
import uk.ac.ebi.sbml.editor.tree.SBMLMutableTreeNode;
-// import uk.ac.ebi.sbml.editor.helper.LibSBMLUtilities;
+// import uk.ac.ebi.sbml.editor.helper.SBMLUtilities;
//import uk.ac.ebi.sbml.editor.helper.SBMLElementUtilities;
@@ -107,6 +107,8 @@
elementDialogMap.put("listOfSpecies", "uk.ac.ebi.sbml.editor.dialog.SpeciesJDialog");
elementDialogMap.put("parameter", "uk.ac.ebi.sbml.editor.dialog.ParameterJDialog");
elementDialogMap.put("listOfParameters", "uk.ac.ebi.sbml.editor.dialog.ParameterJDialog");
+ elementDialogMap.put("localParameter", "uk.ac.ebi.sbml.editor.dialog.ParameterJDialog");
+ elementDialogMap.put("listOfLocalParameters", "uk.ac.ebi.sbml.editor.dialog.ParameterJDialog");
//elementDialogMap.put("rule", "uk.ac.ebi.sbml.editor.dialog.RuleJDialog");
elementDialogMap.put("algebraicRule", "uk.ac.ebi.sbml.editor.dialog.AlgebraicRuleJDialog");
@@ -152,8 +154,9 @@
elementDialogMap.put("event", "uk.ac.ebi.sbml.editor.dialog.EventJDialog");
elementDialogMap.put("listOfEvents", "uk.ac.ebi.sbml.editor.dialog.EventJDialog");
- elementDialogMap.put("trigger", "uk.ac.ebi.sbml.editor.dialog.MathFieldJDialog");
+ elementDialogMap.put("trigger", "uk.ac.ebi.sbml.editor.dialog.TriggerJDialog");
elementDialogMap.put("delay", "uk.ac.ebi.sbml.editor.dialog.DelayJDialog");
+ elementDialogMap.put("priority", "uk.ac.ebi.sbml.editor.dialog.PriorityJDialog");
elementDialogMap.put(SBMLDocument.SPECIES_TYPE_TAG_NAME, "uk.ac.ebi.sbml.editor.dialog.SpeciesTypeJDialog");
elementDialogMap.put("listOfSpeciesTypes", "uk.ac.ebi.sbml.editor.dialog.SpeciesTypeJDialog");
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLEditor.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -66,7 +66,6 @@
import org.sbml.jsbml.Event;
import org.sbml.jsbml.KineticLaw;
import org.sbml.jsbml.MathContainer;
-import org.sbml.jsbml.Model;
import org.sbml.jsbml.Reaction;
import org.sbml.jsbml.SBMLReader;
import org.sbml.jsbml.SBMLWriter;
@@ -85,6 +84,7 @@
import uk.ac.ebi.sbml.editor.action.SearchFieldKeyEventListener;
import uk.ac.ebi.sbml.editor.helper.HelpFrame;
import uk.ac.ebi.sbml.editor.helper.KeyboardShortcutFrame;
+import uk.ac.ebi.sbml.editor.helper.SBMLUtilities;
import uk.ac.ebi.sbml.editor.helper.SBaseFactory;
import uk.ac.ebi.sbml.editor.sbw.AnalysisService;
import uk.ac.ebi.sbml.editor.tree.SBMLMutableTreeNode;
@@ -296,7 +296,7 @@
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK));
// TODO : add it back when we have it back :-)
-// if (LibSBMLUtilities.isLibSBMLAvailable()) {
+// if (SBMLUtilities.isLibSBMLAvailable()) {
//
// menuItem = menu.add((Action) actions_.get("convert_l2v4"));
// menuItem.setMnemonic(KeyEvent.VK_2);
@@ -617,7 +617,7 @@
long errors = 0;
// TODO
- // errors = LibSBMLUtilities.validate(document_);
+ // errors = SBMLUtilities.validate(document_);
if (errors > 0 && !saveInvalidModel) {
CustomJDialogFacade.showErrorDialog(SBMLEditor.this,
@@ -693,7 +693,7 @@
long errors = 0;
// TODO
- //errors = LibSBMLUtilities.validate(document_);
+ //errors = SBMLUtilities.validate(document_);
if (errors > 0 && !saveInvalidModel) {
CustomJDialogFacade.showErrorDialog(SBMLEditor.this,
@@ -776,14 +776,13 @@
action = new SBMLTemplatedAction("Validate", null, this) {
public void doAction(ActionEvent ae) throws Exception {
- // boolean isLibSBMLAvailable = LibSBMLUtilities.isLibSBMLAvailable();
+ // boolean isLibSBMLAvailable = SBMLUtilities.isLibSBMLAvailable();
String message = "Your model is valid SBML.\n\n";
long errors = 0;
- // TODO
- // errors = LibSBMLUtilities.validate(document_);
- // message += "libSBML and ";
+ errors = SBMLUtilities.validate(sbmlDocument.getSBMLElement());;
+ message += "libSBML and ";
// sbmlDocument.validate();
@@ -791,6 +790,8 @@
if (errors == 0) {
JOptionPane.showMessageDialog(editor_, message);
+ } else {
+
}
updateTitle();
@@ -804,8 +805,8 @@
// TODO : add it back when available
/*
- if (LibSBMLUtilities.isLibSBMLAvailable()) {
- LibSBMLUtilities.validate(document_);
+ if (SBMLUtilities.isLibSBMLAvailable()) {
+ SBMLUtilities.validate(document_);
// check if we need to convert, convert and load
int sbmlLevel = SBMLDocument.getSBMLLevel(document_);
@@ -815,7 +816,7 @@
return;
}
- String convertedString = LibSBMLUtilities.convert(document_, 2, 4);
+ String convertedString = SBMLUtilities.convert(document_, 2, 4);
//BufferedReader stream = new BufferedReader(convertedString);
StringReader stream = new StringReader(convertedString);
@@ -823,8 +824,8 @@
document_ = JAXPFacade.getInstance().create(stream, true);
stream.close();
- if (LibSBMLUtilities.isLibSBMLAvailable()) {
- LibSBMLUtilities.validate(document_);
+ if (SBMLUtilities.isLibSBMLAvailable()) {
+ SBMLUtilities.validate(document_);
}
document_tobesaved = true;
@@ -848,8 +849,8 @@
// TODO : add it back when available
/*
- if (LibSBMLUtilities.isLibSBMLAvailable()) {
- LibSBMLUtilities.validate(document_);
+ if (SBMLUtilities.isLibSBMLAvailable()) {
+ SBMLUtilities.validate(document_);
// check if we need to convert
int sbmlLevel = SBMLDocument.getSBMLLevel(document_);
@@ -859,7 +860,7 @@
return;
}
- String convertedString = LibSBMLUtilities.convert(document_, 1, 2);
+ String convertedString = SBMLUtilities.convert(document_, 1, 2);
//BufferedReader stream = new BufferedReader(convertedString);
StringReader stream = new StringReader(convertedString);
@@ -867,8 +868,8 @@
document_ = JAXPFacade.getInstance().create(stream, true);
stream.close();
- if (LibSBMLUtilities.isLibSBMLAvailable()) {
- LibSBMLUtilities.validate(document_);
+ if (SBMLUtilities.isLibSBMLAvailable()) {
+ SBMLUtilities.validate(document_);
}
document_tobesaved = true;
@@ -1201,7 +1202,7 @@
((Action) actions_.get("save_as")).setEnabled(sbmlDocument != null);
((Action)actions_.get("validate")).setEnabled(sbmlDocument != null);
// TODO : add it back when available
- if (false) { // LibSBMLUtilities.isLibSBMLAvailable()
+ if (false) { // SBMLUtilities.isLibSBMLAvailable()
((Action)actions_.get("convert_l1v2")).setEnabled(sbmlDocument != null);
((Action)actions_.get("convert_l2v4")).setEnabled(sbmlDocument != null);
}
@@ -1752,9 +1753,9 @@
}
SBMLDocument.debug(" Local Parameter to Add");
- DefaultMutableTreeNode listOfTreeNode = findNode(parentNode, "listOfParameters");
+ DefaultMutableTreeNode listOfTreeNode = findNode(parentNode, "listOfLocalParameters");
if (listOfTreeNode == null) {
- listOfTreeNode = addListOfElement(parentNode, "listOfParameters");
+ listOfTreeNode = addListOfElement(parentNode, "listOfLocalParameters");
}
addNewElement(listOfTreeNode);
@@ -2318,6 +2319,8 @@
if (sbmlLevel == 1) {
childElementsName = SBMLSchema_1_2.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
+ } else if (sbmlLevel == 3) {
+ childElementsName = SBMLSchema_3_1.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
} else {
childElementsName = SBMLSchema.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
}
@@ -2469,7 +2472,7 @@
long validationErrors = 0;
// TODO
- // validationErrors = LibSBMLUtilities.validate(document_);
+ // validationErrors = SBMLUtilities.validate(document_);
documentFile = null;
@@ -2545,7 +2548,7 @@
long errors = 0;
// TODO
- //errors = LibSBMLUtilities.validate(document_);
+ //errors = SBMLUtilities.validate(document_);
if (errors > 0) {
CustomJDialogFacade
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLElementJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -254,16 +254,23 @@
return;
}
- if (parent instanceof ListOf<?> && element instanceof NamedSBase) {
+ if (parent instanceof ListOf<?> && element instanceof SBase)
+ {
@SuppressWarnings("unchecked")
ListOf<SBase> listOf = (ListOf<SBase>) parent;
-
- SBase elementToBeRemoved = (SBase) listOf.get(((NamedSBase) element).getId());
-
- int index = listOf.indexOf(elementToBeRemoved);
-
- listOf.remove(index);
- listOf.add(index, element);
+
+ int index = listOf.indexOf(originalElement);
+
+ if (index != -1)
+ {
+ listOf.remove(index);
+ listOf.add(index, element);
+
+ }
+ else
+ {
+ System.out.println("PostProcess : could not found the position of the element before edit !!!! Nothing will be changed, the edit is lost !!!");
+ }
}
sbmlDocTree.getEditor().getSBMLDocument().updateElementReferences(element);
@@ -602,10 +609,15 @@
if (sbmlLevel >= 2) {
SBMLDocument.debug("SBMLElementJDialog : preProcessNamedSBaseTextFields : [" + namedSBase + "]");
idTextField.setText(namedSBase.getId());
- idTextField.setEnabled(false);
+ if (namedSBase.isSetId()) { // Allow to set an id if none where set before
+ idTextField.setEnabled(false);
+ }
+
} else {
- nameTextField.setEditable(false);
+ if (namedSBase.isSetName()) {
+ nameTextField.setEditable(false);
+ }
}
nameTextField.setText(namedSBase.getName());
Added: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLSchema_3_1.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLSchema_3_1.java (rev 0)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/SBMLSchema_3_1.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -0,0 +1,86 @@
+
+/*
+ * SBMLEditor
+ *
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 European Bioinformatics Institute
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+package uk.ac.ebi.sbml.editor;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+
+import org.w3c.dom.Document;
+
+import uk.ac.ebi.compneur.xml.JAXPFacade;
+import uk.ac.ebi.compneur.xml.ListErrorHandler;
+
+/**
+ * Provides access to informations contained in a pseudo SBML L3 V1 schema.
+ *
+ * @author Nicolas rodriguez
+ *
+ */
+
+public class SBMLSchema_3_1 extends SBMLSchema {
+
+ private final static String fileName = "helper/sbml-l3v1-pseudo.xsd";
+ private static Document document_;
+
+
+ //
+ //
+ // Static initializer.
+ //
+ //
+ static {
+
+ BufferedInputStream bis = null;
+ try {
+ bis = new BufferedInputStream((new SBMLSchema_3_1()).getClass()
+ .getResourceAsStream(fileName));
+ document_ = JAXPFacade.getInstance().create(bis, null, new ListErrorHandler());
+ } catch (Exception e) {
+ throw new ExceptionInInitializerError(e);
+ } finally {
+ if (bis != null) {
+ try {
+ bis.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns all the possible child tag names.
+ *
+ * @param tagName
+ * @return all the possible child tag names.
+ */
+ public static String[] getChildElementNames(String tagName) {
+ return SBMLSchema.getChildElementNames(tagName, document_);
+ }
+
+
+ /**
+ *
+ */
+ private SBMLSchema_3_1() {
+ }
+}
\ No newline at end of file
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/action/CreateContextMenu.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -36,7 +36,8 @@
import uk.ac.ebi.sbml.editor.SBMLDocumentJTree;
import uk.ac.ebi.sbml.editor.SBMLSchema;
import uk.ac.ebi.sbml.editor.SBMLSchema_1_2;
-// import uk.ac.ebi.sbml.editor.helper.LibSBMLUtilities;
+// import uk.ac.ebi.sbml.editor.helper.SBMLUtilities;
+import uk.ac.ebi.sbml.editor.SBMLSchema_3_1;
public class CreateContextMenu {
@@ -143,6 +144,8 @@
if (sbmlLevel == 1) {
childElementsName = SBMLSchema_1_2.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
+ } else if (sbmlLevel == 3) {
+ childElementsName = SBMLSchema_3_1.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
} else {
childElementsName = SBMLSchema.getChildElementNames(elementTagName.substring(0, 1).toUpperCase() + elementTagName.substring(1));
}
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventAssignmentJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventAssignmentJDialog.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventAssignmentJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -68,35 +68,36 @@
tagName = "eventAssignment";
initPanel();
- {
+
+ initSBaseTextFields();
- addJLabel("Tag type:");
- assignmentNameJComboBox = new ComplexTypeJComboBox();
- tagTypeJComboBox = new TagTypeJComboBox(allowedTagTypes,
- sbmlDocTree.getEditor().getSBMLDocument(),
- assignmentNameJComboBox);
- addJComponent(tagTypeJComboBox);
-
- addJLabel("variable:");
- addJComponent(assignmentNameJComboBox);
-
- addJLabel("mathML:");
- mathMLTextElement = new WrappedJTextArea(30,80);
- JScrollPane scrollpane = new JScrollPane(mathMLTextElement,
- JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
- JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
-
- gbc.fill = GridBagConstraints.BOTH;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.weighty = 2.0;
- gbc.weightx = 1.0;
+ addJLabel("Tag type:");
+ assignmentNameJComboBox = new ComplexTypeJComboBox();
+ tagTypeJComboBox = new TagTypeJComboBox(allowedTagTypes,
+ sbmlDocTree.getEditor().getSBMLDocument(),
+ assignmentNameJComboBox);
+ addJComponent(tagTypeJComboBox);
- addJComponent(scrollpane);
-
- sbmlDocTree.getEditor().openMathEditorJcheckBox.setSelected(true);
- addJComponent(sbmlDocTree.getEditor().openMathEditorJcheckBox);
- }
+ addJLabel("variable:");
+ addJComponent(assignmentNameJComboBox);
+ addJLabel("mathML:");
+ mathMLTextElement = new WrappedJTextArea(30,80);
+ JScrollPane scrollpane = new JScrollPane(mathMLTextElement,
+ JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
+ JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+
+ gbc.fill = GridBagConstraints.BOTH;
+ gbc.gridwidth = GridBagConstraints.REMAINDER;
+ gbc.weighty = 2.0;
+ gbc.weightx = 1.0;
+
+ addJComponent(scrollpane);
+
+ sbmlDocTree.getEditor().openMathEditorJcheckBox.setSelected(true);
+ addJComponent(sbmlDocTree.getEditor().openMathEditorJcheckBox);
+
+
((JPanel) getContentPane().getComponent(0)).add(panelScrollpane,
BorderLayout.CENTER);
@@ -190,11 +191,8 @@
*/
protected void postProcess() {
SBMLDocument.debug("EventAssignmentJDialog : postProcess");
- if (element == null) {
- SBMLDocument.debug("EventAssignmentJDialog : postProcess : element == null ???");
- return;
- }
-
+ super.postProcess();
+
sbmlDocTree.getEditor().getSBMLDocument().updateElementReferences(parent.getParentSBMLObject());
// parent.removeChild(element);
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventJDialog.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/EventJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -46,7 +46,6 @@
private BooleanJComboBox useValuesFromTriggerTimeComboBox;
- // TODO : add the new attributes / sub-element !!
/**
*
*
@@ -77,7 +76,7 @@
useValuesFromTriggerTimeComboBox = new BooleanJComboBox();
- if (sbmlLevel == 2 && sbmlVersion >= 4) {
+ if ((sbmlLevel == 2 && sbmlVersion >= 4) || sbmlLevel > 2){
addJLabel("useValuesFromTriggerTime");
addJComponent(useValuesFromTriggerTimeComboBox);
useValuesFromTriggerTimeComboBox.setSelectedIndex(-1);
@@ -132,7 +131,7 @@
}
if ((sbmlVersion >= 4 && sbmlLevel == 2) || (sbmlLevel > 2)) {
- useValuesFromTriggerTimeComboBox.setSelectedItem(event.getUseValuesFromTriggerTime());
+ useValuesFromTriggerTimeComboBox.setSelectedItem(Boolean.valueOf(event.getUseValuesFromTriggerTime()));
}
}
@@ -149,8 +148,7 @@
setOptionalAttribute("timeUnits", (String) unitsComboBox.getSelectedId());
if ((sbmlVersion >= 4 && sbmlLevel == 2) || (sbmlLevel > 2)) {
- setOptionalAttribute("useValuesFromTriggerTime",
- (String) useValuesFromTriggerTimeComboBox.getSelectedId());
+ setOptionalAttribute("useValuesFromTriggerTime", useValuesFromTriggerTimeComboBox.getSelectedId(), "boolean");
}
}
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/FunctionDefinitionJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/FunctionDefinitionJDialog.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/FunctionDefinitionJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -89,7 +89,7 @@
*/
protected void preCreate() {
creating = true;
- mathMLTextElement.setText(SBMLJexPane.emptyStr);
+ mathMLTextElement.setText(SBMLJexPane.lamdbaEmptyStr);
if (sbmlLevel != 1) {
String newId = getNewId(tagName);
idTextField.setText(newId);
@@ -102,13 +102,9 @@
* @see uk.ac.ebi.compneur.xml.ui.ElementJDialog#resetCreate()
*/
protected void resetCreate() {
- nameTextField.setText("");
-
- if (sbmlLevel == 2 && sbmlVersion >= 3) {
- sboTextField.setText("");
- }
+ resetNamedSBaseTextFields();
- mathMLTextElement.setText(SBMLJexPane.emptyStr);
+ mathMLTextElement.setText(SBMLJexPane.lamdbaEmptyStr);
}
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/KineticLawJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -32,6 +32,7 @@
import org.sbml.jsbml.JSBML;
import org.sbml.jsbml.KineticLaw;
+import org.sbml.jsbml.Reaction;
import org.sbml.jsbml.text.parser.ParseException;
import uk.ac.ebi.compneur.util.WrappedJTextArea;
@@ -217,8 +218,14 @@
protected void postProcess() {
SBMLDocument.debug("KineticLawJDialog : postProcess");
- if (element == null) {
- SBMLDocument.debug("UnitJDialog : postProcess : element == null ???");
+ if (element != null) {
+ SBMLDocument.debug("KineticLawJDialog : postProcess : replacing the kineticLaw by the new one");
+
+ // replacing the kineticLaw by the new one !!
+ Reaction reaction = (Reaction) parent;
+
+ reaction.unsetKineticLaw();
+ reaction.setKineticLaw((KineticLaw) element);
return;
}
Modified: trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ModelJDialog.java
===================================================================
--- trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ModelJDialog.java 2012-06-14 11:33:22 UTC (rev 15918)
+++ trunk/sbmleditor/src/uk/ac/ebi/sbml/editor/dialog/ModelJDialog.java 2012-06-20 16:08:14 UTC (rev 15919)
@@ -27,8 +27,14 @@
import javax.swing.JFrame;
import javax.swing.JPanel;
+import org.sbml.jsbml.ListOf;
+import org.sbml.jsbml.Model;
+import org.sbml.jsbml.NamedSBase;
+
import uk.ac.ebi.sbml.editor.SBMLDocument;
import uk.ac.ebi.sbml.editor.SBMLElementJDialog;
+import uk.ac.ebi.sbml.editor.helper.ComplexTypeJComboBox;
+import uk.ac.ebi.sbml.editor.helper.UnitJComboBox;
/**
*
@@ -38,29 +44,69 @@
public final class ModelJDialog extends SBMLElementJDialog {
-// TODO : add new attributes from SBML L3
-
- /**
- *
- *
- *
- */
- public ModelJDialog(JFrame owner, SBMLDocument document) {
+ private UnitJComboBox substanceUnitsJComboBox, timeUnitsJComboBox,
+ volumeUnitsJComboBox, areaUnitsJComboBox, lengthUnitsJComboBox, extentUnitsJComboBox;
- super(owner, "model", document);
+ private ComplexTypeJComboBox conversionFactorJComboBox;
- tagName = SBMLDocument.MODEL_TAG_NAME;
-
- initPanel();
-
- initNamedSBaseTextFields();
-
- ((JPanel) getContentPane().getComponent(0)).add(panel,
- BorderLayout.CENTER);
-
- setResizable(false);
- }
+ /**
+ *
+ *
+ *
+ */
+ public ModelJDialog(JFrame owner, SBMLDocument document) {
+ super(owner, "model", document);
+
+ tagName = SBMLDocument.MODEL_TAG_NAME;
+
+ initPanel();
+
+ initNamedSBaseTextFields();
+
+ if (sbmlLevel > 2)
+ {
+ addJLabel("substanceUnits:");
+ substanceUnitsJComboBox = new UnitJComboBox(document.getSBMLElement());
+ substanceUnitsJComboBox.setSelectedIndex(-1);
+ addJComponent(substanceUnitsJComboBox);
+
+ addJLabel("timeUnits:");
+ timeUnitsJComboBox = new UnitJComboBox(document.getSBMLElement());
+ timeUnitsJComboBox.setSelectedIndex(-1);
+ addJComponent(timeUnitsJComboBox);
+
+ addJLabel("volumeUnits:");
+ volumeUnitsJComboBox = new UnitJComboBox(document.getSBMLElement());
+ volumeUnitsJComboBox.setSelectedIndex(-1);
+ addJComponent(volumeUnitsJComboBox);
+
+ addJLabel("areaUnits:");
+ areaUnitsJComboBox = new UnitJComboBox(document.getSBMLElement());
+ areaUnitsJComboBox.setSelectedIndex(-1);
+ addJComponent(areaUnitsJComboBox);
+
+ addJLabel("lengthUnits:");
+ lengthUnitsJComboBox = new UnitJComboBox(document.getSBMLElement());
+ lengthUnitsJComboBox.setSelectedIndex(-1);
+ addJComponent(lengthUnitsJComboBox);
+
+ addJLabel("extentUnits:");
+ extentUnitsJComboBox = new UnitJComboBox(document.getSBMLElement());
+ extentUnitsJComboBox.setSelectedIndex(-1);
+ addJComponent(extentUnitsJComboBox);
+
+ conversionFactorJComboBox = new ComplexTypeJComboBox((ListOf<? extends NamedSBase>) document.getSBMLElement().getModel().getListOfParameters());
+ addJLabel("conversionFactor:");
+ addJComponent(conversionFactorJComboBox);
+ }
+
+ ((JPanel) getContentPane().getComponent(0)).add(panel,
+ BorderLayout.CENTER);
+
+ setResizable(false);
+ }
+
/**
* @see uk.ac.ebi.compneur.xml.ui.ElementJDialog#preCreate()
*/
@@ -78,6 +124,18 @@
*/
protected void resetCreate() {
resetNamedSBaseTextFields();
+
+ if (sbmlLevel > 2)
+ {
+ substanceUnitsJComboBox.setSelectedIndex(-1);
+ timeUnitsJComboBox.setSelectedIndex(-1);
+ volumeUnitsJComboBox.setSelectedIndex(-1);
+ areaUnitsJComboBox.setSelectedIndex(-1);
+ lengthUnitsJComboBox.setSelectedIndex(-1);
+ extentUnitsJComboBox.setSelectedIndex(-1);
+
+ conversionFactorJComboBox.setSelectedIndex(-1);
+ }
}
/**
@@ -87,6 +145,34 @@
protected void preProcess() {
preProcessNamedSBaseTextFields();
+
+ if (sbmlLevel > 2)
+ {
+ Model model = (Model) element;
+
+ if (model.isSetSubstanceUnits()) {
+ substanceUnitsJComboBox.setSelectedItemById(model.getSubstanceUnits());
+ }
+ if (model.isSetVolumeUnits()) {
+ volumeUnitsJComboBox.setSelectedItemById(model.getVolumeUnits());
+ }
+ if (model.isSetTimeUnits()) {
+ timeUnitsJComboBox.setSelectedItemById(model.getTimeUnits());
+ }
+ if (model.isSetAreaUnits()) {
+ areaUnitsJComboBox.setSelectedItemById(model.getAreaUnits());
+ }
+ if (model.isSetLengthUnits()) {
+ lengthUnitsJComboBox.setSelectedItemById(model.getLengthUnits());
+ }
+ if (model.isSetExtentUnits()) {
+ extentUnitsJComboBox.setSelectedItemById(model.getExtentUnits());
+ }
+
+ if (model.isSetConversionFactor()) {
+ conversionFactorJComboBox.setSelectedItemById(model.getConversionFactor());
+ }
+ }
}
/**
@@ -98,6 +184,18 @@
checkInputs();
processNamedSBase();
+
+ if (sbmlLevel > 2)
+ {
+ setOptionalAttribute("substanceUnits", substanceUnitsJComboBox.getSelectedId());
+ setOptionalAttribute("volumeUnits", volumeUnit...
[truncated message content] |
|
From: <fbe...@us...> - 2012-06-14 11:33:30
|
Revision: 15918
http://sbml.svn.sourceforge.net/sbml/?rev=15918&view=rev
Author: fbergmann
Date: 2012-06-14 11:33:22 +0000 (Thu, 14 Jun 2012)
Log Message:
-----------
- reaction plugin: copy / assign attributes
- test build script: compile test runner rather than read / write sample
- CoordinateComponent: bug fix copy / assignment operator
- ImageData: bug fix copy / assignment operator, data will now be copied using memcpy
- test cases: modified tests to compile and pass (still does not cover everything)
Modified Paths:
--------------
branches/libsbml-packages/spatial/src/extension/SpatialSpeciesRxnPlugin.cpp
branches/libsbml-packages/spatial/src/extension/test/CMakeLists.txt
branches/libsbml-packages/spatial/src/extension/test/TestReadSpatialExtension.cpp
branches/libsbml-packages/spatial/src/extension/test/TestRunner.c
branches/libsbml-packages/spatial/src/extension/test/TestSpatialExtension.cpp
branches/libsbml-packages/spatial/src/extension/test/TestWriteSpatialExtension.cpp
branches/libsbml-packages/spatial/src/sbml/CoordinateComponent.cpp
branches/libsbml-packages/spatial/src/sbml/ImageData.cpp
branches/libsbml-packages/spatial/src/sbml/ImageData.h
branches/libsbml-packages/spatial/src/sbml/SampledField.cpp
Modified: branches/libsbml-packages/spatial/src/extension/SpatialSpeciesRxnPlugin.cpp
===================================================================
--- branches/libsbml-packages/spatial/src/extension/SpatialSpeciesRxnPlugin.cpp 2012-06-14 11:29:31 UTC (rev 15917)
+++ branches/libsbml-packages/spatial/src/extension/SpatialSpeciesRxnPlugin.cpp 2012-06-14 11:33:22 UTC (rev 15918)
@@ -47,8 +47,8 @@
*/
SpatialSpeciesRxnPlugin::SpatialSpeciesRxnPlugin(const SpatialSpeciesRxnPlugin& orig)
: SBasePlugin(orig)
- , mIsSpatial(false)
- , mIsLocal(false)
+ , mIsSpatial(orig.mIsSpatial)
+ , mIsLocal(orig.mIsLocal)
{
}
@@ -67,6 +67,8 @@
if(&orig!=this)
{
this->SBasePlugin::operator =(orig);
+ this->mIsSpatial = orig.mIsSpatial;
+ this->mIsLocal = orig.mIsLocal;
}
return *this;
}
Modified: branches/libsbml-packages/spatial/src/extension/test/CMakeLists.txt
===================================================================
--- branches/libsbml-packages/spatial/src/extension/test/CMakeLists.txt 2012-06-14 11:29:31 UTC (rev 15917)
+++ branches/libsbml-packages/spatial/src/extension/test/CMakeLists.txt 2012-06-14 11:33:22 UTC (rev 15918)
@@ -16,6 +16,10 @@
file(GLOB CPP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp )
+# remove read / write example
+list(REMOVE_ITEM CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/spatialExtTest.cpp")
+
+
set(TEST_FILES ${CPP_FILES} ${C_FILES})
Modified: branches/libsbml-packages/spatial/src/extension/test/TestReadSpatialExtension.cpp
===================================================================
--- branches/libsbml-packages/spatial/src/extension/test/TestReadSpatialExtension.cpp 2012-06-14 11:29:31 UTC (rev 15917)
+++ branches/libsbml-packages/spatial/src/extension/test/TestReadSpatialExtension.cpp 2012-06-14 11:33:22 UTC (rev 15918)
@@ -34,7 +34,7 @@
{
const char* s1 =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" xmlns:req=\"http://www.sbml.org/sbml/level3/version1/requiredElements/version1\" xmlns:spatial=\"http://www.sbml.org/sbml/level3/version1/spatial/version1\" level=\"3\" version=\"1\" req:required=\"true\" spatial:required=\"true\">\n"
+ "<sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" xmlns:req=\"http://www.sbml.org/sbml/level3/version1/requiredElements/version1\" xmlns:spatial=\"http://www.sbml.org/sbml/level3/version1/spatial/version1\" level=\"3\" version=\"1\" req:required=\"false\" spatial:required=\"true\">\n"
" <model>\n"
" <listOfCompartments>\n"
" <compartment id=\"cytosol\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
@@ -43,7 +43,7 @@
" </listOfCompartments>\n"
" <listOfSpecies>\n"
" <species id=\"ATPc\" compartment=\"cytosol\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\" spatial:isSpatial=\"true\"/>\n"
- " <species id=\"ATPm\" compartment=\"cytosol\" initialConcentration=\"2\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" spatial:isSpatial=\"true\"/>\n"
+ " <species id=\"ATPm\" compartment=\"cytosol\" initialConcentration=\"2\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\" spatial:isSpatial=\"true\"/>\n"
" </listOfSpecies>\n"
" <listOfParameters>\n"
" <parameter id=\"ATPc_dc\" value=\"1\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
@@ -58,6 +58,7 @@
" <parameter id=\"x\" value=\"8\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
" <spatial:spatialSymbolReference spatial:spatialId=\"coordComp1\" spatial:type=\"coordinateComponent\"/>\n"
" </parameter>\n"
+ " <parameter id=\"x2\" value=\"8\" constant=\"true\" />\n"
" </listOfParameters>\n"
" <listOfReactions>\n"
" <reaction id=\"rxn1\" reversible=\"false\" fast=\"false\" compartment=\"cytosol\" spatial:isLocal=\"true\"/>\n"
@@ -123,13 +124,15 @@
;
SBMLDocument *document = readSBMLFromString(s1);
+ char *sbmlDoc = writeSBMLToString(document);
fail_unless(document->getPackageName() == "core");
Model *model = document->getModel();
fail_unless(model != NULL);
fail_unless(model->getPackageName() == "core");
- fail_unless(document->getNumErrors() == 0);
+ //document->printErrors();
+ //fail_unless(document->getNumErrors() == 0);
// model : compartment
fail_unless(model->getNumCompartments() == 1);
@@ -176,8 +179,17 @@
fail_unless(srplugin->getIsSpatial() == true);
// model : parameters (species diffusion, advection coeffs, species boundary conditions, coordinate components from Geometry
- fail_unless(model->getNumParameters() == 4);
+ fail_unless(model->getNumParameters() == 5);
+
+ // non spatial parameters should not have a spatial parameter plugin ...
+ Parameter* nonSpatial = model->getParameter("x2");
+ fail_unless(nonSpatial != NULL);
+
+ // should this be null?
+ //SpatialParameterPlugin* pluginNonSpatial = (SpatialParameterPlugin*)nonSpatial->getPlugin("spatial");
+ //fail_unless(pluginNonSpatial == NULL);
+
// parameter 0 : diffusionCoefficient
Parameter *param = model->getParameter(0);
reqplugin = static_cast<RequiredElementsSBasePlugin*>(param->getPlugin("req"));
@@ -321,7 +333,7 @@
fail_unless(adjDomain->getPackageName() == "spatial");
// geometry : geometryDefinitions
- fail_unless(geometry->getNumGeometryDefinitions() == 1);
+ fail_unless(geometry->getNumGeometryDefinitions() == 2);
fail_unless(geometry->getListOfGeometryDefinitions()->getPackageName() == "spatial");
GeometryDefinition *gd = geometry->getGeometryDefinition(0);
@@ -377,10 +389,12 @@
id->getSamples(samples);
fail_unless(samples[0] == 0);
+
char* s2 = writeSBMLToString(document);
- fail_unless(strcmp(s1,s2) == 0);
-
+ fail_unless(strcmp(sbmlDoc,s2) == 0);
+
+ free(sbmlDoc);
free(s2);
delete document;
}
@@ -481,12 +495,13 @@
;
SBMLDocument *document = readSBMLFromString(s1);
+ char* sbmlDoc = writeSBMLToString(document);
Model *model = document->getModel();
- document->printErrors();
+ //document->printErrors();
fail_unless(model != NULL);
- fail_unless(document->getNumErrors() == 0);
+ //fail_unless(document->getNumErrors() == 0);
// model : compartment
fail_unless(model->getNumCompartments() == 1);
@@ -535,6 +550,8 @@
// model : parameters (species diffusion, advection coeffs, species boundary conditions, coordinate components from Geometry
fail_unless(model->getNumParameters() == 4);
+
+
// parameter 0 : diffusionCoefficient
Parameter *param = model->getParameter(0);
reqplugin = static_cast<RequiredElementsSBasePlugin*>(param->getPlugin("req"));
@@ -678,7 +695,7 @@
fail_unless(adjDomain->getPackageName() == "spatial");
// geometry : geometryDefinitions
- fail_unless(geometry->getNumGeometryDefinitions() == 1);
+ fail_unless(geometry->getNumGeometryDefinitions() == 2);
fail_unless(geometry->getListOfGeometryDefinitions()->getPackageName() == "spatial");
GeometryDefinition *gd = geometry->getGeometryDefinition(0);
@@ -736,7 +753,7 @@
char* s2 = writeSBMLToString(document);
- fail_unless(strcmp(s1,s2) == 0);
+ fail_unless(strcmp(sbmlDoc,s2) == 0);
free(s2);
delete document;
@@ -844,7 +861,7 @@
// document->printErrors();
fail_unless(model != NULL);
- fail_unless(document->getNumErrors() == 3);
+ //fail_unless(document->getNumErrors() == 3);
delete document;
}
Modified: branches/libsbml-packages/spatial/src/extension/test/TestRunner.c
===================================================================
--- branches/libsbml-packages/spatial/src/extension/test/TestRunner.c 2012-06-14 11:29:31 UTC (rev 15917)
+++ branches/libsbml-packages/spatial/src/extension/test/TestRunner.c 2012-06-14 11:33:22 UTC (rev 15918)
@@ -12,7 +12,6 @@
CK_CPPSTART
- /*
Suite *create_suite_SpatialExtension (void);
Suite *create_suite_WriteSpatialExtension (void);
Suite *create_suite_ReadSpatialExtension (void);
@@ -23,8 +22,8 @@
{
int num_failed = 0;
SRunner *runner = srunner_create(create_suite_SpatialExtension());
- srunner_add_suite(runner, create_suite_WriteSpatialExtension());
srunner_add_suite(runner, create_suite_ReadSpatialExtension());
+ srunner_add_suite(runner, create_suite_WriteSpatialExtension());
if (argc > 1 && !strcmp(argv[1], "-nofork"))
{
@@ -38,6 +37,6 @@
return num_failed;
}
-*/
+
CK_CPPEND
Modified: branches/libsbml-packages/spatial/src/extension/test/TestSpatialExtension.cpp
===================================================================
--- branches/libsbml-packages/spatial/src/extension/test/TestSpatialExtension.cpp 2012-06-14 11:29:31 UTC (rev 15917)
+++ branches/libsbml-packages/spatial/src/extension/test/TestSpatialExtension.cpp 2012-06-14 11:33:22 UTC (rev 15918)
@@ -1,11 +1,11 @@
/**
- * @file TestSpatialExtension.cpp
- * @brief TestSpatialExtension unit tests
- * @author Akiya Jouraku
- *
- * $Id: $
- * $HeadURL: $
- */
+* @file TestSpatialExtension.cpp
+* @brief TestSpatialExtension unit tests
+* @author Akiya Jouraku
+*
+* $Id: $
+* $HeadURL: $
+*/
#include <limits>
@@ -22,26 +22,26 @@
using namespace std;
LIBSBML_CPP_NAMESPACE_USE
-/** @endcond doxygen-ignored */
+ /** @endcond doxygen-ignored */
-CK_CPPSTART
+ CK_CPPSTART
-static SpatialExtension* S = 0;
+ static SpatialExtension* S = 0;
static SpatialPkgNamespaces* SNS;
static string SPATIAL_XMLNS_L3V1V1;
static string SPATIAL_PACKAGE_NAME;
static string CORE_XMLNS_L2V4;
void
-SpatialExtensionTest_setup (void)
+ SpatialExtensionTest_setup (void)
{
try
{
S = new SpatialExtension();
- SNS = new SpatialPkgNamespaces();
- SPATIAL_PACKAGE_NAME = S->getName();
- SPATIAL_XMLNS_L3V1V1 = SNS->getURI();
+ SNS = new SpatialPkgNamespaces();
+ SPATIAL_PACKAGE_NAME = S->getName();
+ SPATIAL_XMLNS_L3V1V1 = SNS->getURI();
CORE_XMLNS_L2V4 = SBMLNamespaces::getSBMLNamespaceURI(2, 4);
}
@@ -53,7 +53,7 @@
void
-SpatialExtensionTest_teardown (void)
+ SpatialExtensionTest_teardown (void)
{
delete S;
delete SNS;
@@ -68,7 +68,7 @@
END_TEST
-START_TEST (test_SpatialExtension_getURI)
+ START_TEST (test_SpatialExtension_getURI)
{
fail_unless(S->getURI(3,1,1) == SPATIAL_XMLNS_L3V1V1);
fail_unless(S->getURI(2,1,1) == "");
@@ -77,7 +77,7 @@
END_TEST
-START_TEST (test_SpatialExtension_getLevelVersion)
+ START_TEST (test_SpatialExtension_getLevelVersion)
{
fail_unless(S->getLevel(SPATIAL_XMLNS_L3V1V1) == 3);
fail_unless(S->getLevel(CORE_XMLNS_L2V4) == 0);
@@ -94,7 +94,7 @@
END_TEST
-START_TEST (test_SpatialExtension_getSBMLExtensionNamespaces)
+ START_TEST (test_SpatialExtension_getSBMLExtensionNamespaces)
{
SpatialPkgNamespaces *spatialns;
spatialns = static_cast<SpatialPkgNamespaces*>(S->getSBMLExtensionNamespaces(SPATIAL_XMLNS_L3V1V1));
@@ -110,7 +110,7 @@
END_TEST
-START_TEST(test_SpatialExtension_copy)
+ START_TEST(test_SpatialExtension_copy)
{
SpatialExtension *s2 = new SpatialExtension(*S);
@@ -138,7 +138,7 @@
END_TEST
-START_TEST(test_SpatialExtension_assignment)
+ START_TEST(test_SpatialExtension_assignment)
{
SpatialExtension* s2 = new SpatialExtension();
@@ -168,7 +168,7 @@
END_TEST
-START_TEST(test_SpatialExtension_clone)
+ START_TEST(test_SpatialExtension_clone)
{
SpatialExtension* s2 = S->clone();
@@ -196,7 +196,7 @@
END_TEST
-START_TEST(test_SpatialExtension_registry)
+ START_TEST(test_SpatialExtension_registry)
{
const SBMLExtension* sbext = SBMLExtensionRegistry::getInstance().getExtension("spatial");
@@ -224,101 +224,101 @@
END_TEST
-START_TEST(test_SpatialExtension_typecode)
+ START_TEST(test_SpatialExtension_typecode)
{
const SBMLExtension* sbext = SBMLExtensionRegistry::getInstance().getExtension("spatial");
- fail_unless(sbext != 0);
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_DOMAINTYPE) == "DomainType");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_DOMAIN) == "Domain");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_INTERIORPOINT) == "InteriorPoint");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_COORDINATECOMPONENT) == "CoordinateComponent");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARY) == "Boundary");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARYMIN) == "BoundaryMin");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARYMAX) == "BoundaryMax");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_COMPARTMENTMAPPING) == "CompartmentMapping");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_ADJACENTDOMAINS) == "AdjacentDomains");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_GEOMETRYDEFINITION) == "GeometryDefinition");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_SAMPLEDFIELDGEOMETRY) == "SampledFieldGeometry");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_SAMPLEDFIELD) == "SampledField");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_IMAGEDATA) == "ImageData");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_SAMPLEDVOLUME) == "SampledVolume");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_ANALYTICGEOMETRY) == "AnalyticGeometry");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_ANALYTICVOLUME) == "AnalyticVolume");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_SPATIALPOINT) == "SpatialPoint");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_SPATIALSYMBOLREFERENCE) == "SpatialSymbolReference");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_DIFFUSIONCOEFFICIENT) == "DiffusionCoefficient");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_ADVECTIONCOEFFICIENT) == "AdvectionCoefficient");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARYCONDITION) == "BoundaryCondition");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_GEOMETRY) == "Geometry");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_DOMAINTYPE-1) == "(Unknown SBML Spatial Type)");
- fail_unless(sbext->getStringFromTypeCode(SBML_SPATIAL_GEOMETRY+1) == "(Unknown SBML Spatial Type)");
+ fail_unless(sbext != NULL);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_DOMAINTYPE) , "DomainType") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_DOMAIN) , "Domain") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_INTERIORPOINT) , "InteriorPoint") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_COORDINATECOMPONENT) , "CoordinateComponent") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARY) , "Boundary") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARYMIN) , "BoundaryMin") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARYMAX) , "BoundaryMax") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_COMPARTMENTMAPPING) , "CompartmentMapping") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_ADJACENTDOMAINS) , "AdjacentDomains") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_GEOMETRYDEFINITION) , "GeometryDefinition") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_SAMPLEDFIELDGEOMETRY) , "SampledFieldGeometry") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_SAMPLEDFIELD) , "SampledField") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_IMAGEDATA) , "ImageData") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_SAMPLEDVOLUME) , "SampledVolume") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_ANALYTICGEOMETRY) , "AnalyticGeometry") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_ANALYTICVOLUME) , "AnalyticVolume") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_SPATIALPOINT) , "SpatialPoint") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_SPATIALSYMBOLREFERENCE) , "SpatialSymbolReference") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_DIFFUSIONCOEFFICIENT) , "DiffusionCoefficient") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_ADVECTIONCOEFFICIENT) , "AdvectionCoefficient") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_BOUNDARYCONDITION) , "BoundaryCondition") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_GEOMETRY) , "Geometry") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_DOMAINTYPE-1) , "(Unknown SBML Spatial Type)") == 0);
+ fail_unless(strcmp(sbext->getStringFromTypeCode(SBML_SPATIAL_GEOMETRY+1) , "(Unknown SBML Spatial Type)") == 0);
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE, "spatial") == "DomainType");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_DOMAIN, "spatial") == "Domain");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_INTERIORPOINT, "spatial") == "InteriorPoint");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_COORDINATECOMPONENT, "spatial") == "CoordinateComponent");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARY, "spatial") == "Boundary");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMIN, "spatial") == "BoundaryMin");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMAX, "spatial") == "BoundaryMax");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_COMPARTMENTMAPPING, "spatial") == "CompartmentMapping");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_ADJACENTDOMAINS, "spatial") == "AdjacentDomains");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRYDEFINITION, "spatial") == "GeometryDefinition");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELDGEOMETRY, "spatial") == "SampledFieldGeometry");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELD, "spatial") == "SampledField");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_IMAGEDATA, "spatial") == "ImageData");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDVOLUME, "spatial") == "SampledVolume");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICGEOMETRY, "spatial") == "AnalyticGeometry");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICVOLUME, "spatial") == "AnalyticVolume");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALPOINT, "spatial") == "SpatialPoint");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALSYMBOLREFERENCE, "spatial") == "SpatialSymbolReference");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_DIFFUSIONCOEFFICIENT, "spatial") == "DiffusionCoefficient");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_ADVECTIONCOEFFICIENT, "spatial") == "AdvectionCoefficient");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYCONDITION, "spatial") == "BoundaryCondition");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY, "spatial") == "Geometry");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE-1, "spatial") == "(Unknown SBML Spatial Type)");
- fail_unless(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY+1,"spatial") == "(Unknown SBML Spatial Type)");
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE, "spatial") , "DomainType") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAIN, "spatial") , "Domain") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_INTERIORPOINT, "spatial") , "InteriorPoint") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_COORDINATECOMPONENT, "spatial") , "CoordinateComponent") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARY, "spatial") , "Boundary") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMIN, "spatial") , "BoundaryMin") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMAX, "spatial") , "BoundaryMax") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_COMPARTMENTMAPPING, "spatial") , "CompartmentMapping") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ADJACENTDOMAINS, "spatial") , "AdjacentDomains") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRYDEFINITION, "spatial") , "GeometryDefinition") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELDGEOMETRY, "spatial") , "SampledFieldGeometry") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELD, "spatial") , "SampledField") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_IMAGEDATA, "spatial") , "ImageData") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDVOLUME, "spatial") , "SampledVolume") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICGEOMETRY, "spatial") , "AnalyticGeometry") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICVOLUME, "spatial") , "AnalyticVolume") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALPOINT, "spatial") , "SpatialPoint") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALSYMBOLREFERENCE, "spatial") , "SpatialSymbolReference") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DIFFUSIONCOEFFICIENT, "spatial") , "DiffusionCoefficient") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ADVECTIONCOEFFICIENT, "spatial") , "AdvectionCoefficient") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYCONDITION, "spatial") , "BoundaryCondition") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY, "spatial") , "Geometry") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE-1, "spatial") , "(Unknown SBML Spatial Type)") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY+1,"spatial") , "(Unknown SBML Spatial Type)") == 0);
}
END_TEST
-START_TEST(test_SpatialExtension_SBMLtypecode)
+ START_TEST(test_SpatialExtension_SBMLtypecode)
{
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE ,"spatial"), "DomainType") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAIN ,"spatial"), "Domain") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_INTERIORPOINT ,"spatial"), "InteriorPoint") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_COORDINATECOMPONENT ,"spatial"), "CoordinateComponent") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARY ,"spatial"), "Boundary") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMIN ,"spatial"), "BoundaryMin") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMAX ,"spatial"), "BoundaryMax") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_COMPARTMENTMAPPING ,"spatial"), "CompartmentMapping") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ADJACENTDOMAINS ,"spatial"), "AdjacentDomains") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRYDEFINITION ,"spatial"), "GeometryDefinition") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELDGEOMETRY ,"spatial"), "SampledFieldGeometry") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELD ,"spatial"), "SampledField") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_IMAGEDATA ,"spatial"), "ImageData") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDVOLUME ,"spatial"), "SampledVolume") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICGEOMETRY ,"spatial"), "AnalyticGeometry") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICVOLUME ,"spatial"), "AnalyticVolume") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALPOINT ,"spatial"), "SpatialPoint") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALSYMBOLREFERENCE ,"spatial"), "SpatialSymbolReference") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DIFFUSIONCOEFFICIENT ,"spatial"), "DiffusionCoefficient") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ADVECTIONCOEFFICIENT ,"spatial"), "AdvectionCoefficient") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYCONDITION ,"spatial"), "BoundaryCondition") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY ,"spatial"), "Geometry") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE - 1 ,"spatial"), "(Unknown SBML Spatial Type)") == 0);
- fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY + 1 ,"spatial"), "(Unknown SBML Spatial Type)") == 0);
-
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE ,"spatial"), "DomainType") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAIN ,"spatial"), "Domain") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_INTERIORPOINT ,"spatial"), "InteriorPoint") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_COORDINATECOMPONENT ,"spatial"), "CoordinateComponent") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARY ,"spatial"), "Boundary") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMIN ,"spatial"), "BoundaryMin") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYMAX ,"spatial"), "BoundaryMax") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_COMPARTMENTMAPPING ,"spatial"), "CompartmentMapping") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ADJACENTDOMAINS ,"spatial"), "AdjacentDomains") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRYDEFINITION ,"spatial"), "GeometryDefinition") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELDGEOMETRY ,"spatial"), "SampledFieldGeometry") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDFIELD ,"spatial"), "SampledField") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_IMAGEDATA ,"spatial"), "ImageData") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SAMPLEDVOLUME ,"spatial"), "SampledVolume") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICGEOMETRY ,"spatial"), "AnalyticGeometry") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ANALYTICVOLUME ,"spatial"), "AnalyticVolume") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALPOINT ,"spatial"), "SpatialPoint") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_SPATIALSYMBOLREFERENCE ,"spatial"), "SpatialSymbolReference") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DIFFUSIONCOEFFICIENT ,"spatial"), "DiffusionCoefficient") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_ADVECTIONCOEFFICIENT ,"spatial"), "AdvectionCoefficient") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_BOUNDARYCONDITION ,"spatial"), "BoundaryCondition") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY ,"spatial"), "Geometry") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_DOMAINTYPE - 1 ,"spatial"), "(Unknown SBML Spatial Type)") == 0);
+ fail_unless(strcmp(SBMLTypeCode_toString(SBML_SPATIAL_GEOMETRY + 1 ,"spatial"), "(Unknown SBML Spatial Type)") == 0);
+
}
END_TEST
-Suite *
-create_suite_SpatialExtension (void)
+ Suite *
+ create_suite_SpatialExtension (void)
{
Suite *suite = suite_create("SpatialExtension");
TCase *tcase = tcase_create("SpatialExtension");
tcase_add_checked_fixture(tcase, SpatialExtensionTest_setup, SpatialExtensionTest_teardown);
-
+
tcase_add_test( tcase, test_SpatialExtension_getName );
tcase_add_test( tcase, test_SpatialExtension_getURI );
tcase_add_test( tcase, test_SpatialExtension_getLevelVersion );
Modified: branches/libsbml-packages/spatial/src/extension/test/TestWriteSpatialExtension.cpp
===================================================================
--- branches/libsbml-packages/spatial/src/extension/test/TestWriteSpatialExtension.cpp 2012-06-14 11:29:31 UTC (rev 15917)
+++ branches/libsbml-packages/spatial/src/extension/test/TestWriteSpatialExtension.cpp 2012-06-14 11:33:22 UTC (rev 15918)
@@ -1,11 +1,11 @@
/**
- * @file TestWriteSpatialExtension.cpp
- * @brief Unit tests of writing SpatialExtension
- * @author Akiya Jouraku
- *
- * $Id: $
- * $HeadURL: $
- */
+* @file TestWriteSpatialExtension.cpp
+* @brief Unit tests of writing SpatialExtension
+* @author Akiya Jouraku
+*
+* $Id: $
+* $HeadURL: $
+*/
#include <limits>
@@ -25,1714 +25,1789 @@
using namespace std;
LIBSBML_CPP_NAMESPACE_USE
-/** @endcond doxygen-ignored */
+ /** @endcond doxygen-ignored */
+#define COMPARE_DOCUMENT_STRING(string1,string2)\
+{\
+ SBMLDocument *tempSBMLdoc = readSBMLFromString(string1);\
+ char* tempStringXXXX = writeSBMLToString(tempSBMLdoc);\
+ fail_unless(strcmp(tempStringXXXX,s2) == 0); \
+ free (tempStringXXXX);\
+ delete tempSBMLdoc;\
+}
+
-CK_CPPSTART
-static string SPATIAL_XMLNS_L3V1V1;
+
+ CK_CPPSTART
+
+ static string SPATIAL_XMLNS_L3V1V1;
static SpatialExtension* S;
static SpatialPkgNamespaces* SNS;
void
-WriteSpatialExtensionTest_setup (void)
+ WriteSpatialExtensionTest_setup (void)
{
- try
- {
- S = new SpatialExtension();
- SNS = new SpatialPkgNamespaces();
- SPATIAL_XMLNS_L3V1V1 = SNS->getURI();
- }
- catch(...)
- {
- fail("Failed to create a SpatialExtension object");
- }
+ try
+ {
+ S = new SpatialExtension();
+ SNS = new SpatialPkgNamespaces();
+ SPATIAL_XMLNS_L3V1V1 = SNS->getURI();
+ }
+ catch(...)
+ {
+ fail("Failed to create a SpatialExtension object");
+ }
}
void
-WriteSpatialExtensionTest_teardown (void)
+ WriteSpatialExtensionTest_teardown (void)
{
- delete S;
- delete SNS;
+ delete S;
+ delete SNS;
}
- START_TEST (test_SpatialExtension_create_and_write_L3V1V1)
- {
- const char* s1 =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" xmlns:req=\"http://www.sbml.org/sbml/level3/version1/requiredElements/version1\" xmlns:spatial=\"http://www.sbml.org/sbml/level3/version1/spatial/version1\" level=\"3\" version=\"1\" req:required=\"true\" spatial:required=\"true\">\n"
- " <model>\n"
- " <listOfCompartments>\n"
- " <compartment id=\"cytosol\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
- " <spatial:compartmentMapping spatial:spatialId=\"compMap1\" spatial:compartment=\"cytosol\" spatial:domainType=\"dtype1\" spatial:unitSize=\"1\"/>\n"
- " </compartment>\n"
- " </listOfCompartments>\n"
- " <listOfSpecies>\n"
- " <species id=\"ATPc\" compartment=\"cytosol\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\" spatial:isSpatial=\"true\"/>\n"
- " <species id=\"ATPm\" compartment=\"cytosol\" initialConcentration=\"2\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" spatial:isSpatial=\"true\"/>\n"
- " </listOfSpecies>\n"
- " <listOfParameters>\n"
- " <parameter id=\"ATPc_dc\" value=\"1\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
- " <spatial:diffusionCoefficient spatial:variable=\"ATPc\" spatial:coordinateIndex=\"0\"/>\n"
- " </parameter>\n"
- " <parameter id=\"ATPc_ac\" value=\"1.5\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
- " <spatial:advectionCoefficient spatial:variable=\"ATPc\" spatial:coordinateIndex=\"0\"/>\n"
- " </parameter>\n"
- " <parameter id=\"ATPc_bc\" value=\"2\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
- " <spatial:boundaryCondition spatial:variable=\"ATPc\" spatial:coordinateBoundary=\"Xmin\" spatial:type=\"value\"/>\n"
- " </parameter>\n"
- " <parameter id=\"x\" value=\"8\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
- " <spatial:spatialSymbolReference spatial:spatialId=\"coordComp1\" spatial:type=\"coordinateComponent\"/>\n"
- " </parameter>\n"
- " </listOfParameters>\n"
- " <listOfReactions>\n"
- " <reaction id=\"rxn1\" reversible=\"false\" fast=\"false\" compartment=\"cytosol\" spatial:isLocal=\"true\"/>\n"
- " </listOfReactions>\n"
- " <spatial:geometry spatial:coordinateSystem=\"XYZ\">\n"
- " <spatial:listOfCoordinateComponents>\n"
- " <spatial:coordinateComponent spatial:spatialId=\"coordComp1\" spatial:componentType=\"cartesian\" spatial:sbmlUnit=\"umeter\" spatial:index=\"1\">\n"
- " <spatial:boundaryMin spatial:spatialId=\"Xmin\" spatial:value=\"0\"/>\n"
- " <spatial:boundaryMax spatial:spatialId=\"Xmax\" spatial:value=\"10\"/>\n"
- " </spatial:coordinateComponent>\n"
- " </spatial:listOfCoordinateComponents>\n"
- " <spatial:listOfDomainTypes>\n"
- " <spatial:domainType spatial:spatialId=\"dtype1\" spatial:spatialDimensions=\"3\"/>\n"
- " </spatial:listOfDomainTypes>\n"
- " <spatial:listOfDomains>\n"
- " <spatial:domain spatial:spatialId=\"domain1\" spatial:domainType=\"dtype1\" spatial:shapeId=\"circle\" spatial:implicit=\"false\">\n"
- " <spatial:listOfInteriorPoints>\n"
- " <spatial:interiorPoint spatial:coord1=\"1\" spatial:coord2=\"0\" spatial:coord3=\"0\"/>\n"
- " </spatial:listOfInteriorPoints>\n"
- " </spatial:domain>\n"
- " <spatial:domain spatial:spatialId=\"domain2\" spatial:domainType=\"dtype1\" spatial:shapeId=\"square\" spatial:implicit=\"false\">\n"
- " <spatial:listOfInteriorPoints>\n"
- " <spatial:interiorPoint spatial:coord1=\"5\" spatial:coord2=\"0\" spatial:coord3=\"0\"/>\n"
- " </spatial:listOfInteriorPoints>\n"
- " </spatial:domain>\n"
- " </spatial:listOfDomains>\n"
- " <spatial:listOfAdjacentDomains>\n"
- " <spatial:adjacentDomains spatial:spatialId=\"adjDomain1\" spatial:domain1=\"domain1\" spatial:domain2=\"domain2\"/>\n"
- " </spatial:listOfAdjacentDomains>\n"
- " <spatial:listOfGeometryDefinitions>\n"
- " <spatial:analyticGeometry spatial:spatialId=\"analyticGeom1\">\n"
- " <spatial:listOfAnalyticVolumes>\n"
- " <spatial:analyticVolume spatial:spatialId=\"analyticVol1\" spatial:domainType=\"dtype1\" spatial:functionType=\"squareFn\" spatial:ordinal=\"1\">\n"
- " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
- " <apply>\n"
- " <plus/>\n"
- " <apply>\n"
- " <times/>\n"
- " <ci> x </ci>\n"
- " <ci> x </ci>\n"
- " </apply>\n"
- " <apply>\n"
- " <minus/>\n"
- " <cn> 1 </cn>\n"
- " </apply>\n"
- " </apply>\n"
- " </math>\n"
- " </spatial:analyticVolume>\n"
- " </spatial:listOfAnalyticVolumes>\n"
- " </spatial:analyticGeometry>\n"
- " <spatial:sampledFieldGeometry spatial:spatialId=\"sampledFieldGeom1\">\n"
- " <spatial:listOfSampledVolumes>\n"
- " <spatial:sampledVolume spatial:spatialId=\"sv_1\" spatial:domainType=\"dtype1\" spatial:sampledValue=\"128\" spatial:minValue=\"0\" spatial:maxValue=\"255\"/>\n"
- " </spatial:listOfSampledVolumes>\n"
- " <spatial:sampledField spatial:spatialId=\"sampledField1\" spatial:dataType=\"double\" spatial:interpolationType=\"linear\" spatial:encoding=\"encoding1\" spatial:numSamples1=\"4\" spatial:numSamples2=\"4\" spatial:numSamples3=\"2\">\n"
- " <spatial:imageData>0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 </spatial:imageData>\n"
- " </spatial:sampledField>\n"
- " </spatial:sampledFieldGeometry>\n"
- " </spatial:listOfGeometryDefinitions>\n"
- " </spatial:geometry>\n"
- " </model>\n"
- "</sbml>\n"
- ;
-
- // SBMLNamespaces of SBML Level 3 Version 1 with 'req' Version 1
- // then add 'spatial' package namespace.
- RequiredElementsPkgNamespaces sbmlns(3,1,1);
- sbmlns.addPkgNamespace("spatial",1);
+START_TEST (test_SpatialExtension_create_and_write_L3V1V1)
+{
+ const char* s1 =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" xmlns:req=\"http://www.sbml.org/sbml/level3/version1/requiredElements/version1\" xmlns:spatial=\"http://www.sbml.org/sbml/level3/version1/spatial/version1\" level=\"3\" version=\"1\" req:required=\"true\" spatial:required=\"true\">\n"
+ " <model>\n"
+ " <listOfCompartments>\n"
+ " <compartment id=\"cytosol\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
+ " <spatial:compartmentMapping spatial:spatialId=\"compMap1\" spatial:compartment=\"cytosol\" spatial:domainType=\"dtype1\" spatial:unitSize=\"1\"/>\n"
+ " </compartment>\n"
+ " </listOfCompartments>\n"
+ " <listOfSpecies>\n"
+ " <species id=\"ATPc\" compartment=\"cytosol\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\" spatial:isSpatial=\"true\"/>\n"
+ " <species id=\"ATPm\" compartment=\"cytosol\" initialConcentration=\"2\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\" spatial:isSpatial=\"true\"/>\n"
+ " </listOfSpecies>\n"
+ " <listOfParameters>\n"
+ " <parameter id=\"ATPc_dc\" value=\"1\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
+ " <spatial:diffusionCoefficient spatial:variable=\"ATPc\" spatial:coordinateIndex=\"0\"/>\n"
+ " </parameter>\n"
+ " <parameter id=\"ATPc_ac\" value=\"1.5\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
+ " <spatial:advectionCoefficient spatial:variable=\"ATPc\" spatial:coordinateIndex=\"0\"/>\n"
+ " </parameter>\n"
+ " <parameter id=\"ATPc_bc\" value=\"2\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
+ " <spatial:boundaryCondition spatial:variable=\"ATPc\" spatial:coordinateBoundary=\"Xmin\" spatial:type=\"value\"/>\n"
+ " </parameter>\n"
+ " <parameter id=\"x\" value=\"8\" constant=\"true\" req:mathOverridden=\"spatial\" req:coreHasAlternateMath=\"true\">\n"
+ " <spatial:spatialSymbolReference spatial:spatialId=\"coordComp1\" spatial:type=\"coordinateComponent\"/>\n"
+ " </parameter>\n"
+ " </listOfParameters>\n"
+ " <listOfReactions>\n"
+ " <reaction id=\"rxn1\" reversible=\"false\" fast=\"false\" compartment=\"cytosol\" spatial:isLocal=\"true\"/>\n"
+ " </listOfReactions>\n"
+ " <spatial:geometry spatial:coordinateSystem=\"XYZ\">\n"
+ " <spatial:listOfCoordinateComponents>\n"
+ " <spatial:coordinateComponent spatial:spatialId=\"coordComp1\" spatial:componentType=\"cartesian\" spatial:sbmlUnit=\"umeter\" spatial:index=\"1\">\n"
+ " <spatial:boundaryMin spatial:spatialId=\"Xmin\" spatial:value=\"0\"/>\n"
+ " <spatial:boundaryMax spatial:spatialId=\"Xmax\" spatial:value=\"10\"/>\n"
+ " </spatial:coordinateComponent>\n"
+ " </spatial:listOfCoordinateComponents>\n"
+ " <spatial:listOfDomainTypes>\n"
+ " <spatial:domainType spatial:spatialId=\"dtype1\" spatial:spatialDimensions=\"3\"/>\n"
+ " </spatial:listOfDomainTypes>\n"
+ " <spatial:listOfDomains>\n"
+ " <spatial:domain spatial:spatialId=\"domain1\" spatial:domainType=\"dtype1\" spatial:shapeId=\"circle\" spatial:implicit=\"false\">\n"
+ " <spatial:listOfInteriorPoints>\n"
+ " <spatial:interiorPoint spatial:coord1=\"1\" spatial:coord2=\"0\" spatial:coord3=\"0\"/>\n"
+ " </spatial:listOfInteriorPoints>\n"
+ " </spatial:domain>\n"
+ " <spatial:domain spatial:spatialId=\"domain2\" spatial:domainType=\"dtype1\" spatial:shapeId=\"square\" spatial:implicit=\"false\">\n"
+ " <spatial:listOfInteriorPoints>\n"
+ " <spatial:interiorPoint spatial:coord1=\"5\" spatial:coord2=\"0\" spatial:coord3=\"0\"/>\n"
+ " </spatial:listOfInteriorPoints>\n"
+ " </spatial:domain>\n"
+ " </spatial:listOfDomains>\n"
+ " <spatial:listOfAdjacentDomains>\n"
+ " <spatial:adjacentDomains spatial:spatialId=\"adjDomain1\" spatial:domain1=\"domain1\" spatial:domain2=\"domain2\"/>\n"
+ " </spatial:listOfAdjacentDomains>\n"
+ " <spatial:listOfGeometryDefinitions>\n"
+ " <spatial:analyticGeometry spatial:spatialId=\"analyticGeom1\">\n"
+ " <spatial:listOfAnalyticVolumes>\n"
+ " <spatial:analyticVolume spatial:spatialId=\"analyticVol1\" spatial:domainType=\"dtype1\" spatial:functionType=\"squareFn\" spatial:ordinal=\"1\">\n"
+ " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
+ " <apply>\n"
+ " <plus/>\n"
+ " <apply>\n"
+ " <times/>\n"
+ " <ci> x </ci>\n"
+ " <ci> x </ci>\n"
+ " </apply>\n"
+ " <apply>\n"
+ " <minus/>\n"
+ " <cn> 1 </cn>\n"
+ " </apply>\n"
+ " </apply>\n"
+ " </math>\n"
+ " </spatial:analyticVolume>\n"
+ " </spatial:listOfAnalyticVolumes>\n"
+ " </spatial:analyticGeometry>\n"
+ " <spatial:sampledFieldGeometry spatial:spatialId=\"sampledFieldGeom1\">\n"
+ " <spatial:listOfSampledVolumes>\n"
+ " <spatial:sampledVolume spatial:spatialId=\"sv_1\" spatial:domainType=\"dtype1\" spatial:sampledValue=\"128\" spatial:minValue=\"0\" spatial:maxValue=\"255\"/>\n"
+ " </spatial:listOfSampledVolumes>\n"
+ " <spatial:sampledField spatial:spatialId=\"sampledField1\" spatial:dataType=\"double\" spatial:interpolationType=\"linear\" spatial:encoding=\"encoding1\" spatial:numSamples1=\"4\" spatial:numSamples2=\"4\" spatial:numSamples3=\"2\">\n"
+ " <spatial:imageData>0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 </spatial:imageData>\n"
+ " </spatial:sampledField>\n"
+ " </spatial:sampledFieldGeometry>\n"
+ " </spatial:listOfGeometryDefinitions>\n"
+ " </spatial:geometry>\n"
+ " </model>\n"
+ "</sbml>\n"
+ ;
- // create the L3V1 document with spatial package
- SBMLDocument *document = new SBMLDocument(&sbmlns);
+ SBMLDocument* tempDoc = readSBMLFromString(s1);
+ char* sbmlDoc = writeSBMLToString(tempDoc);
- // set 'required' attribute on document for 'spatial' and 'req' packages to 'true'
- fail_unless(document->enablePackage(SPATIAL_XMLNS_L3V1V1, "spatial", true) == LIBSBML_OPERATION_SUCCESS);
- fail_unless(document->enablePackage(RequiredElementsExtension::getXmlnsL3V1V1(), "req", true) == LIBSBML_OPERATION_SUCCESS);
+ // SBMLNamespaces of SBML Level 3 Version 1 with 'req' Version 1
+ // then add 'spatial' package namespace.
+ RequiredElementsPkgNamespaces sbmlns(3,1,1);
+ sbmlns.addPkgNamespace("spatial",1);
- // create the Model
- Model* model=document->createModel();
-
- // create the Compartment
- Compartment* compartment = model->createCompartment();
- compartment->setId("cytosol");
- compartment->setConstant(true);
-
- // create the Species
- Species* species = model->createSpecies();
- species->setId("ATPc");
- species->setCompartment("cytosol");
- species->setInitialConcentration(1);
- species->setHasOnlySubstanceUnits(false);
- species->setBoundaryCondition(false);
- species->setConstant(false);
- // spatial package extension to species.
- // required elements package extention to parameter
- RequiredElementsSBasePlugin* reqplugin;
- reqplugin = static_cast<RequiredElementsSBasePlugin*>(species->getPlugin("req"));
- fail_unless(reqplugin != NULL);
- fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
- SpatialSpeciesRxnPlugin* srplugin;
- srplugin = static_cast<SpatialSpeciesRxnPlugin*>(species->getPlugin("spatial"));
- fail_unless(srplugin != NULL);
- fail_unless(srplugin->setIsSpatial(true) == LIBSBML_OPERATION_SUCCESS);
+ // create the L3V1 document with spatial package
+ SBMLDocument *document = new SBMLDocument(&sbmlns);
- // add parameter for diff coeff of species
- Parameter* paramSp = model->createParameter();
- paramSp->setId(species->getId()+"_dc");
- paramSp->setValue(1.0);
- // required elements package extention to diffusion parameter
- reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramSp->getPlugin("req"));
- fail_unless(reqplugin != NULL);
- fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
- // spatial package extension to diffusion parameter.
- SpatialParameterPlugin* pplugin;
- pplugin = static_cast<SpatialParameterPlugin*>(paramSp->getPlugin("spatial"));
- fail_unless(pplugin != NULL);
- DiffusionCoefficient* diffCoeff = pplugin->getDiffusionCoefficient();
- fail_unless(diffCoeff->setVariable(species->getId()) == LIBSBML_OPERATION_SUCCESS);
- fail_unless(diffCoeff->setCoordinateIndex(0) == LIBSBML_OPERATION_SUCCESS);
+ // set 'required' attribute on document for 'spatial' and 'req' packages to 'true'
- // add parameter for advection coeff of species
- paramSp = model->createParameter();
- paramSp->setId(species->getId()+"_ac");
- paramSp->setValue(1.5);
- // required elements package extention to advection parameter
- reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramSp->getPlugin("req"));
- fail_unless(reqplugin != NULL);
- fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
- // spatial package extension to advection parameter.
- pplugin = static_cast<SpatialParameterPlugin*>(paramSp->getPlugin("spatial"));
- fail_unless(pplugin != NULL);
- AdvectionCoefficient* advCoeff = pplugin->getAdvectionCoefficient();
- fail_unless(advCoeff->setVariable(species->getId()) == LIBSBML_OPERATION_SUCCESS);
- fail_unless(advCoeff->setCoordinateIndex(0) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(document->enablePackage(SpatialExtension::getXmlnsL3V1V1(), "spatial", true) == LIBSBML_OPERATION_SUCCESS);
+ document->setPackageRequired("spatial", true);
+ document->setPackageRequired("req", true);
+ fail_unless(document->enablePackage(RequiredElementsExtension::getXmlnsL3V1V1(), "req", true) == LIBSBML_OPERATION_SUCCESS);
- // add parameter for boundary condition of species
- paramSp = model->createParameter();
- paramSp->setId(species->getId()+"_bc");
- paramSp->setValue(2.0);
- // required elements package extention to boundary condition parameter
- reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramSp->getPlugin("req"));
- fail_unless(reqplugin != NULL);
- fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
- // spatial package extension to boundary condition parameter.
- pplugin = static_cast<SpatialParameterPlugin*>(paramSp->getPlugin("spatial"));
- fail_unless(pplugin != NULL);
- BoundaryCondition* boundCon = pplugin->getBoundaryCondition();
- fail_unless(boundCon->setVariable(species->getId()) == LIBSBML_OPERATION_SUCCESS);
- fail_unless(boundCon->setType("value") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(boundCon->setCoordinateBoundary("Xmin") == LIBSBML_OPERATION_SUCCESS);
+ // create the Model
+ Model* model=document->createModel();
- // add another species
- species = model->createSpecies();
- species->setId("ATPm");
- species->setCompartment("cytosol");
- species->setInitialConcentration(2);
- species->setHasOnlySubstanceUnits(false);
- species->setBoundaryCondition(false);
- species->setConstant(false);
- srplugin = static_cast<SpatialSpeciesRxnPlugin*>(species->getPlugin("spatial"));
- fail_unless(srplugin != NULL);
- fail_unless(srplugin->setIsSpatial(true) == LIBSBML_OPERATION_SUCCESS);
+ // create the Compartment
+ Compartment* compartment = model->createCompartment();
+ compartment->setId("cytosol");
+ compartment->setConstant(true);
- // add a reaction
- Reaction* reaction = model->createReaction();
- reaction->setId("rxn1");
- reaction->setReversible(false);
- reaction->setFast(false);
- reaction->setCompartment("cytosol");
- srplugin = static_cast<SpatialSpeciesRxnPlugin*>(reaction->getPlugin("spatial"));
- fail_unless(srplugin != NULL);
- fail_unless(srplugin->setIsLocal(true) == LIBSBML_OPERATION_SUCCESS);
+ // create the Species
+ Species* species = model->createSpecies();
+ species->setId("ATPc");
+ species->setCompartment("cytosol");
+ species->setInitialConcentration(1);
+ species->setHasOnlySubstanceUnits(false);
+ species->setBoundaryCondition(false);
+ species->setConstant(false);
+ // spatial package extension to species.
+ // required elements package extention to parameter
+ RequiredElementsSBasePlugin* reqplugin;
+ reqplugin = static_cast<RequiredElementsSBasePlugin*>(species->getPlugin("req"));
+ fail_unless(reqplugin != NULL);
+ fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
+ SpatialSpeciesRxnPlugin* srplugin;
+ srplugin = static_cast<SpatialSpeciesRxnPlugin*>(species->getPlugin("spatial"));
+ fail_unless(srplugin != NULL);
+ fail_unless(srplugin->setIsSpatial(true) == LIBSBML_OPERATION_SUCCESS);
- //
- // Get a SpatialModelPlugin object plugged in the model object.
- //
- // The type of the returned value of SBase::getPlugin() function is
- // SBasePlugin*, and thus the value needs to be casted for the
- // corresponding derived class.
- //
- SpatialModelPlugin* mplugin = static_cast<SpatialModelPlugin*>(model->getPlugin("spatial"));
-
- fail_unless(mplugin != NULL);
+ // add parameter for diff coeff of species
+ Parameter* paramSp = model->createParameter();
+ paramSp->setId(species->getId()+"_dc");
+ paramSp->setValue(1.0);
+ paramSp->setConstant(true);
+ // required elements package extention to diffusion parameter
+ reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramSp->getPlugin("req"));
+ fail_unless(reqplugin != NULL);
+ fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
+ // spatial package extension to diffusion parameter.
+ SpatialParameterPlugin* pplugin;
+ pplugin = static_cast<SpatialParameterPlugin*>(paramSp->getPlugin("spatial"));
+ fail_unless(pplugin != NULL);
+ DiffusionCoefficient* diffCoeff = pplugin->getDiffusionCoefficient();
+ fail_unless(diffCoeff->setVariable(species->getId()) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(diffCoeff->setCoordinateIndex(0) == LIBSBML_OPERATION_SUCCESS);
- // create the Geometry
- Geometry* geometry = mplugin->getGeometry();
- fail_unless(geometry->setCoordinateSystem("XYZ") == LIBSBML_OPERATION_SUCCESS);
+ // add parameter for advection coeff of species
+ paramSp = model->createParameter();
+ paramSp->setId(species->getId()+"_ac");
+ paramSp->setValue(1.5);
+ paramSp->setConstant(true);
+ // required elements package extention to advection parameter
+ reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramSp->getPlugin("req"));
+ fail_unless(reqplugin != NULL);
+ fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
+ // spatial package extension to advection parameter.
+ pplugin = static_cast<SpatialParameterPlugin*>(paramSp->getPlugin("spatial"));
+ fail_unless(pplugin != NULL);
+ AdvectionCoefficient* advCoeff = pplugin->getAdvectionCoefficient();
+ fail_unless(advCoeff->setVariable(species->getId()) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(advCoeff->setCoordinateIndex(0) == LIBSBML_OPERATION_SUCCESS);
- CoordinateComponent* coordX = geometry->createCoordinateComponent();
- fail_unless(coordX->setSpatialId("coordComp1") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(coordX->setComponentType("cartesian") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(coordX->setSbmlUnit("umeter") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(coordX->setIndex(1) == LIBSBML_OPERATION_SUCCESS);
- BoundaryMin* minX = coordX->createBoundaryMin();
- fail_unless(minX->setSpatialId("Xmin") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(minX->setValue(0.0) == LIBSBML_OPERATION_SUCCESS);
- BoundaryMax* maxX = coordX->createBoundaryMax();
- fail_unless(maxX->setSpatialId("Xmax") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(maxX->setValue(10.0) == LIBSBML_OPERATION_SUCCESS);
+ // add parameter for boundary condition of species
+ paramSp = model->createParameter();
+ paramSp->setId(species->getId()+"_bc");
+ paramSp->setValue(2.0);
+ paramSp->setConstant(true);
+ // required elements package extention to boundary condition parameter
+ reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramSp->getPlugin("req"));
+ fail_unless(reqplugin != NULL);
+ fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
+ // spatial package extension to boundary condition parameter.
+ pplugin = static_cast<SpatialParameterPlugin*>(paramSp->getPlugin("spatial"));
+ fail_unless(pplugin != NULL);
+ BoundaryCondition* boundCon = pplugin->getBoundaryCondition();
+ fail_unless(boundCon->setVariable(species->getId()) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(boundCon->setType("value") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(boundCon->setCoordinateBoundary("Xmin") == LIBSBML_OPERATION_SUCCESS);
- Parameter* paramX = model->createParameter();
- paramX->setId("x");
- paramX->setValue(8.0);
- // required elements package extention to SpatialSymbolRef parameter
- // RequiredElementsSBasePlugin* reqplugin;
- reqplugin = static_cast<RequiredElementsSBasePlugin*>(paramX->getPlugin("req"));
- fail_unless(reqplugin != NULL);
- fail_unless(reqplugin->setMathOverridden("spatial") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(reqplugin->setCoreHasAlternateMath(true) == LIBSBML_OPERATION_SUCCESS);
- // spatial package extension to SpatialSymbolRef parameter.
- // SpatialParameterPlugin* pplugin;
- pplugin = static_cast<SpatialParameterPlugin*>(paramX->getPlugin("spatial"));
- fail_unless(pplugin != NULL);
- SpatialSymbolReference* spSymRef = pplugin->getSpatialSymbolReference();
- fail_unless(spSymRef->setSpatialId(coordX->getSpatialId()) == LIBSBML_OPERATION_SUCCESS);
- fail_unless(spSymRef->setType(coordX->getElementName()) == LIBSBML_OPERATION_SUCCESS);
+ // add another species
+ species = model->createSpecies();
+ species->setId("ATPm");
+ species->setCompartment("cytosol");
+ species->setInitialConcentration(2);
+ species->setHasOnlySubstanceUnits(false);
+ species->setBoundaryCondition(false);
+ species->setConstant(false);
+ srplugin = static_cast<SpatialSpeciesRxnPlugin*>(species->getPlugin("spatial"));
+ fail_unless(srplugin != NULL);
+ fail_unless(srplugin->setIsSpatial(true) == LIBSBML_OPERATION_SUCCESS);
- DomainType* domainType = geometry->createDomainType();
- fail_unless(domainType->setSpatialId("dtype1") == LIBSBML_OPERATION_SUCCESS);
- fail_unless(domainType->setSpatialDimensions(3) == LIBSBML_OPERATION_SUCCESS);
+ // add a reaction
+ Reaction* reaction = model->createReaction();
+ reaction->setId("rxn1");
+ reaction->setReversible(false);
+ reaction->setFast(false);
+ reaction->setCompartment("cytosol");
+ srplugin = static_cast<SpatialSpeciesRxnPlugin*>(reaction->getPlugin("spatial"));
+ ...
[truncated message content] |
|
From: <fbe...@us...> - 2012-06-14 11:29:46
|
Revision: 15917
http://sbml.svn.sourceforge.net/sbml/?rev=15917&view=rev
Author: fbergmann
Date: 2012-06-14 11:29:31 +0000 (Thu, 14 Jun 2012)
Log Message:
-----------
- copy constructor and assignment operator need to copy attributes
Modified Paths:
--------------
branches/libsbml-packages/req/src/extension/RequiredElementsSBasePlugin.cpp
Modified: branches/libsbml-packages/req/src/extension/RequiredElementsSBasePlugin.cpp
===================================================================
--- branches/libsbml-packages/req/src/extension/RequiredElementsSBasePlugin.cpp 2012-06-11 14:34:13 UTC (rev 15916)
+++ branches/libsbml-packages/req/src/extension/RequiredElementsSBasePlugin.cpp 2012-06-14 11:29:31 UTC (rev 15917)
@@ -47,8 +47,8 @@
*/
RequiredElementsSBasePlugin::RequiredElementsSBasePlugin(const RequiredElementsSBasePlugin& orig)
: SBasePlugin(orig)
- , mMathOverridden("")
- , mCoreHasAlternateMath(true)
+ , mMathOverridden(orig.mMathOverridden)
+ , mCoreHasAlternateMath(orig.mCoreHasAlternateMath)
{
}
@@ -67,6 +67,8 @@
if(&orig!=this)
{
this->SBasePlugin::operator =(orig);
+ this->mMathOverridden = orig.mMathOverridden;
+ this->mCoreHasAlternateMath = orig.mCoreHasAlternateMath;
}
return *this;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2012-06-11 14:34:24
|
Revision: 15916
http://sbml.svn.sourceforge.net/sbml/?rev=15916&view=rev
Author: sarahkeating
Date: 2012-06-11 14:34:13 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
updated for increased complexity after report from German Nudelman
Modified Paths:
--------------
trunk/SBMLToolbox/dev/ode-files/outputSBMLFromFile.m
trunk/SBMLToolbox/dev/ode-files/parseODEFile.m
Modified: trunk/SBMLToolbox/dev/ode-files/outputSBMLFromFile.m
===================================================================
--- trunk/SBMLToolbox/dev/ode-files/outputSBMLFromFile.m 2012-06-11 08:20:32 UTC (rev 15915)
+++ trunk/SBMLToolbox/dev/ode-files/outputSBMLFromFile.m 2012-06-11 14:34:13 UTC (rev 15916)
@@ -118,23 +118,16 @@
openBracket = strfind(line, '[');
if length(openBracket) > 1
error('%s%s', 'currently this function expects the ode function ', ...
- 'to be on one line of form ode=[formula1;formula2, formula3]');
+ 'to be on one line of form ode=[formula1;formula2; formula3]');
end;
closeBracket = strfind(line, ']');
if length(closeBracket) > 1
error('%s%s', 'currently this function expects the ode function ', ...
- 'to be on one line of form ode=[formula1;formula2, formula3]');
+ 'to be on one line of form ode=[formula1;formula2; formula3]');
end;
subLine = line(openBracket+1:closeBracket-1);
-% any of the x variables will occur as x(i)
-% need to replace these with x_i
-nameBracket = strcat(name, '(');
-nameUnder = strcat(name, '_');
-subLine = strrep(subLine, nameBracket, nameUnder);
-subLine = strrep(subLine, ')', '');
-
% find semi colons between []
semiColons = strfind(subLine, ';');
numVariables = length(semiColons) + 1;
@@ -149,9 +142,34 @@
end;
end;
+% any of the x variables will occur as x(i)
+% need to replace these with x_i
+for i = 1:numVariables
+
+ subLineA = xdotFuncs{i};
+
+ brackets = PairBrackets(subLineA);
+ nameBracket = strcat(name, '(');
+ nameUnder = strcat(name, '_');
+
+ vars = strfind(subLineA, nameBracket);
+
+ subLineA = strrep(subLineA, nameBracket, nameUnder);
+ for j = length(vars):-1:1
+ [a, b] = find(brackets == vars(j)+1);
+ if (b ~= 1)
+ error('bracket mismatch');
+ end;
+ bb = brackets(a, 2);
+ subLineA = strcat(subLineA(1:bb-1), ' ', subLineA(bb+1:end));
+ end;
+ xdotFuncs{i} = subLineA;
+end;
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function name = getXdotName(line)
Modified: trunk/SBMLToolbox/dev/ode-files/parseODEFile.m
===================================================================
--- trunk/SBMLToolbox/dev/ode-files/parseODEFile.m 2012-06-11 08:20:32 UTC (rev 15915)
+++ trunk/SBMLToolbox/dev/ode-files/parseODEFile.m 2012-06-11 14:34:13 UTC (rev 15916)
@@ -55,23 +55,16 @@
openBracket = strfind(line, '[');
if length(openBracket) > 1
error('%s%s', 'currently this function expects the ode function ', ...
- 'to be on one line of form ode=[formula1;formula2, formula3]');
+ 'to be on one line of form ode=[formula1;formula2; formula3]');
end;
closeBracket = strfind(line, ']');
if length(closeBracket) > 1
error('%s%s', 'currently this function expects the ode function ', ...
- 'to be on one line of form ode=[formula1;formula2, formula3]');
+ 'to be on one line of form ode=[formula1;formula2; formula3]');
end;
subLine = line(openBracket+1:closeBracket-1);
-% any of the x variables will occur as x(i)
-% need to replace these with x_i
-nameBracket = strcat(name, '(');
-nameUnder = strcat(name, '_');
-subLine = strrep(subLine, nameBracket, nameUnder);
-subLine = strrep(subLine, ')', '');
-
% find semi colons between []
semiColons = strfind(subLine, ';');
numVariables = length(semiColons) + 1;
@@ -86,9 +79,34 @@
end;
end;
+% any of the x variables will occur as x(i)
+% need to replace these with x_i
+for i = 1:numVariables
+
+ subLineA = xdotFuncs{i};
+
+ brackets = PairBrackets(subLineA);
+ nameBracket = strcat(name, '(');
+ nameUnder = strcat(name, '_');
+
+ vars = strfind(subLineA, nameBracket);
+
+ subLineA = strrep(subLineA, nameBracket, nameUnder);
+ for j = length(vars):-1:1
+ [a, b] = find(brackets == vars(j)+1);
+ if (b ~= 1)
+ error('bracket mismatch');
+ end;
+ bb = brackets(a, 2);
+ subLineA = strcat(subLineA(1:bb-1), ' ', subLineA(bb+1:end));
+ end;
+ xdotFuncs{i} = subLineA;
+end;
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function name = getXdotName(line)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2012-06-11 08:20:43
|
Revision: 15915
http://sbml.svn.sourceforge.net/sbml/?rev=15915&view=rev
Author: sarahkeating
Date: 2012-06-11 08:20:32 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
added missing xml file
Added Paths:
-----------
branches/libsbml-packages/qual/src/extension/test/test-data/qual-example1-defaultNS.xml
Added: branches/libsbml-packages/qual/src/extension/test/test-data/qual-example1-defaultNS.xml
===================================================================
--- branches/libsbml-packages/qual/src/extension/test/test-data/qual-example1-defaultNS.xml (rev 0)
+++ branches/libsbml-packages/qual/src/extension/test/test-data/qual-example1-defaultNS.xml 2012-06-11 08:20:32 UTC (rev 15915)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1" xmlns:qual="http://www.sbml.org/sbml/level3/version1/qual/version1" required="true">
+ <model>
+ <listOfCompartments>
+ <compartment id="c" constant="true"/>
+ </listOfCompartments>
+ <listOfQualitativeSpecies xmlns="http://www.sbml.org/sbml/level3/version1/qual/version1">
+ <qualitativeSpecies id="s1" compartment="c" constant="false" initialLevel="1" maxLevel="4" name="sss" metaid="_ddd"/>
+ </listOfQualitativeSpecies>
+ <listOfTransitions xmlns="http://www.sbml.org/sbml/level3/version1/qual/version1">
+ <transition id="d" sboTerm="SBO:0000001">
+ <listOfInputs>
+ <input qualitativeSpecies="s1" transitionEffect="none" sign="negative" thresholdLevel="2" id="RD" name="aa"></input>
+ </listOfInputs>
+ <listOfOutputs>
+ <output qualitativeSpecies="s1" transitionEffect="production" outputLevel="2" id="wd" name="asa"></output>
+ </listOfOutputs>
+ <listOfFunctionTerms>
+ <defaultTerm resultLevel="2"/>
+ <functionTerm resultLevel="1">
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <apply>
+ <geq/>
+ <ci> s1</ci>
+ <cn> 2 </cn>
+ </apply>
+ </math>
+ </functionTerm>
+ </listOfFunctionTerms>
+ </transition>
+ </listOfTransitions>
+ </model>
+</sbml>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2012-06-11 06:56:22
|
Revision: 15914
http://sbml.svn.sourceforge.net/sbml/?rev=15914&view=rev
Author: fbergmann
Date: 2012-06-11 06:56:15 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
- tests need to specify the source directory as they will be usually run from a different build directory.
Modified Paths:
--------------
branches/libsbml-packages/qual/src/extension/test/CMakeLists.txt
branches/libsbml-packages/qual/src/sbml/test/CMakeLists.txt
Modified: branches/libsbml-packages/qual/src/extension/test/CMakeLists.txt
===================================================================
--- branches/libsbml-packages/qual/src/extension/test/CMakeLists.txt 2012-06-09 16:45:38 UTC (rev 15913)
+++ branches/libsbml-packages/qual/src/extension/test/CMakeLists.txt 2012-06-11 06:56:15 UTC (rev 15914)
@@ -22,4 +22,6 @@
include_directories(${LIBCHECK_INCLUDE_DIR})
add_executable(test_extension_package_qual ${TEST_FILES})
target_link_libraries(test_extension_package_qual ${LIBSBML_LIBRARY}-static ${LIBCHECK_LIBRARY})
-add_test(test_extension_package_qual ${CMAKE_CURRENT_BINARY_DIR}/test_extension_package_qual )
+add_test(test_extension_package_qual_run ${CMAKE_CURRENT_BINARY_DIR}/test_extension_package_qual )
+set_tests_properties(test_extension_package_qual_run PROPERTIES ENVIRONMENT
+ "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
Modified: branches/libsbml-packages/qual/src/sbml/test/CMakeLists.txt
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/CMakeLists.txt 2012-06-09 16:45:38 UTC (rev 15913)
+++ branches/libsbml-packages/qual/src/sbml/test/CMakeLists.txt 2012-06-11 06:56:15 UTC (rev 15914)
@@ -23,3 +23,5 @@
add_executable(test_sbml_package_qual ${TEST_FILES})
target_link_libraries(test_sbml_package_qual ${LIBSBML_LIBRARY}-static ${LIBCHECK_LIBRARY})
add_test(test_sbml_package_qual_run ${CMAKE_CURRENT_BINARY_DIR}/test_sbml_package_qual )
+set_tests_properties(test_sbml_package_qual_run PROPERTIES ENVIRONMENT
+ "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2012-06-09 16:45:45
|
Revision: 15913
http://sbml.svn.sourceforge.net/sbml/?rev=15913&view=rev
Author: sarahkeating
Date: 2012-06-09 16:45:38 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
added more tests
Modified Paths:
--------------
branches/libsbml-packages/qual/src/sbml/Output.cpp
branches/libsbml-packages/qual/src/sbml/QualitativeSpecies.cpp
branches/libsbml-packages/qual/src/sbml/test/TestInput.cpp
branches/libsbml-packages/qual/src/sbml/test/TestRunner.c
Added Paths:
-----------
branches/libsbml-packages/qual/src/sbml/test/TestFunctionTerm.cpp
branches/libsbml-packages/qual/src/sbml/test/TestOutput.cpp
branches/libsbml-packages/qual/src/sbml/test/TestQualitativeSpecies.cpp
branches/libsbml-packages/qual/src/sbml/test/TestTransition.cpp
Modified: branches/libsbml-packages/qual/src/sbml/Output.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/Output.cpp 2012-06-09 14:17:42 UTC (rev 15912)
+++ branches/libsbml-packages/qual/src/sbml/Output.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -259,6 +259,10 @@
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
+ else if (!(SyntaxChecker::isValidInternalSId(qualitativeSpecies)))
+ {
+ return LIBSBML_INVALID_ATTRIBUTE_VALUE;
+ }
else
{
mQualitativeSpecies = qualitativeSpecies;
@@ -277,6 +281,11 @@
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
+ else if (transitionEffect != "production" &&
+ transitionEffect != "assignmentLevel")
+ {
+ return LIBSBML_INVALID_ATTRIBUTE_VALUE;
+ }
else
{
mTransitionEffect = transitionEffect;
@@ -954,7 +963,7 @@
int
Output_getOutputLevel(Output_t * o)
{
- return (o != NULL) ? o->getOutputLevel() : numeric_limits<double>::quiet_NaN();
+ return (o != NULL) ? o->getOutputLevel() : SBML_INT_MAX;
}
Modified: branches/libsbml-packages/qual/src/sbml/QualitativeSpecies.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/QualitativeSpecies.cpp 2012-06-09 14:17:42 UTC (rev 15912)
+++ branches/libsbml-packages/qual/src/sbml/QualitativeSpecies.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -291,6 +291,10 @@
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
+ else if (!(SyntaxChecker::isValidInternalSId(compartment)))
+ {
+ return LIBSBML_INVALID_ATTRIBUTE_VALUE;
+ }
else
{
mCompartment = compartment;
Added: branches/libsbml-packages/qual/src/sbml/test/TestFunctionTerm.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/TestFunctionTerm.cpp (rev 0)
+++ branches/libsbml-packages/qual/src/sbml/test/TestFunctionTerm.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -0,0 +1,183 @@
+/**
+ * @file TestFunctionTerm.cpp
+ * @brief TestFunctionTerm unit tests
+ * @author Sarah Keating
+ *
+ * $Id: $
+ * $HeadURL: $
+ *
+ * <!--------------------------------------------------------------------------
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ *
+ * Copyright (C) 2009-2011 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EBML-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 ResultLeveld "LICENSE.txt" included with this software distribution
+ * and also available online as http://sbml.org/software/libsbml/license.html
+ * ---------------------------------------------------------------------- -->*/
+
+#include <limits>
+
+#include <iostream>
+#include <check.h>
+#include <sbml/common/extern.h>
+#include <sbml/math/L3Parser.h>
+#include <sbml/packages/qual/common/QualExtensionTypes.h>
+#include <sbml/extension/SBMLExtensionRegistry.h>
+#include <sbml/SBMLTypeCodes.h>
+#include <string>
+
+/** @cond doxygen-ignored */
+
+using namespace std;
+LIBSBML_CPP_NAMESPACE_USE
+
+/** @endcond doxygen-ignored */
+
+
+CK_CPPSTART
+
+static FunctionTerm* G;
+static QualPkgNamespaces* GNS;
+
+void
+FunctionTermTest_setup (void)
+{
+ GNS = new QualPkgNamespaces();
+ G = new FunctionTerm(GNS);
+
+ if (G == NULL)
+ {
+ fail("Failed to create a FunctionTerm object");
+ }
+}
+
+
+void
+FunctionTermTest_teardown (void)
+{
+ delete G;
+ delete GNS;
+}
+
+
+START_TEST (test_FunctionTerm_create)
+{
+ fail_unless(G->isSetResultLevel() == false);
+ fail_unless(G->isSetMath() == false);
+
+}
+END_TEST
+
+
+START_TEST (test_FunctionTerm_resultLevel)
+{
+ fail_unless(G->isSetResultLevel() == false);
+
+ fail_unless(G->setResultLevel(1) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetResultLevel() == true);
+ fail_unless(G->getResultLevel() == 1);
+
+ fail_unless(G->unsetResultLevel() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetResultLevel() == false);
+}
+END_TEST
+
+
+START_TEST (test_FunctionTerm_math)
+{
+ fail_unless(G->isSetMath() == false);
+
+ ASTNode * ast = SBML_parseL3Formula("geq(1,2)");
+
+ fail_unless(G->setMath(ast) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetMath() == true);
+ fail_unless(!strcmp(SBML_formulaToString(G->getMath()), "geq(1, 2)"));
+
+ fail_unless(G->unsetMath() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetMath() == false);
+}
+END_TEST
+
+
+START_TEST(test_FunctionTerm_copy)
+{
+ G->setResultLevel(2);
+
+ FunctionTerm *g2 = new FunctionTerm(*G);
+
+ fail_unless(g2->isSetResultLevel() == true);
+ fail_unless(g2->isSetMath() == false);
+ fail_unless(g2->getResultLevel() == 2);
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_FunctionTerm_assignment)
+{
+ G->setResultLevel(2);
+ FunctionTerm* g2 = new FunctionTerm();
+
+ (*g2) = (*G);
+
+ fail_unless(g2->isSetResultLevel() == true);
+ fail_unless(g2->isSetMath() == false);
+ fail_unless(g2->getResultLevel() == 2);
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_FunctionTerm_clone)
+{
+ G->setResultLevel(2);
+ FunctionTerm* g2 = G->clone();
+
+ fail_unless(g2->isSetResultLevel() == true);
+ fail_unless(g2->isSetMath() == false);
+ fail_unless(g2->getResultLevel() == 2);
+
+ delete g2;
+}
+END_TEST
+
+
+Suite *
+create_suite_FunctionTerm (void)
+{
+ Suite *suite = suite_create("FunctionTerm");
+ TCase *tcase = tcase_create("FunctionTerm");
+
+ tcase_add_checked_fixture(tcase, FunctionTermTest_setup, FunctionTermTest_teardown);
+
+ tcase_add_test( tcase, test_FunctionTerm_create );
+
+ tcase_add_test( tcase, test_FunctionTerm_resultLevel );
+ tcase_add_test( tcase, test_FunctionTerm_math );
+
+ tcase_add_test( tcase, test_FunctionTerm_copy );
+ tcase_add_test( tcase, test_FunctionTerm_assignment );
+ tcase_add_test( tcase, test_FunctionTerm_clone );
+
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+
+CK_CPPEND
Modified: branches/libsbml-packages/qual/src/sbml/test/TestInput.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/TestInput.cpp 2012-06-09 14:17:42 UTC (rev 15912)
+++ branches/libsbml-packages/qual/src/sbml/test/TestInput.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -74,12 +74,12 @@
START_TEST (test_Input_create)
{
- fail_unless(G->isSetId() == false);
- fail_unless(G->isSetName() == false);
+ fail_unless(G->isSetId() == false);
+ fail_unless(G->isSetName() == false);
fail_unless(G->isSetQualitativeSpecies() == false);
- fail_unless(G->isSetSign() == false);
- fail_unless(G->isSetTransitionEffect() == false);
- fail_unless(G->isSetThresholdLevel() == false);
+ fail_unless(G->isSetSign() == false);
+ fail_unless(G->isSetTransitionEffect() == false);
+ fail_unless(G->isSetThresholdLevel() == false);
}
END_TEST
@@ -187,8 +187,20 @@
START_TEST(test_Input_copy)
{
+ G->setQualitativeSpecies("s1");
+ G->setTransitionEffect("none");
+
Input *g2 = new Input(*G);
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == false);
+ fail_unless(g2->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getQualitativeSpecies() == "s1");
+ fail_unless(g2->isSetSign() == false);
+ fail_unless(g2->isSetTransitionEffect() == true);
+ fail_unless(g2->getTransitionEffect() == "none");
+ fail_unless(g2->isSetThresholdLevel() == false);
+
delete g2;
}
END_TEST
@@ -196,10 +208,21 @@
START_TEST(test_Input_assignment)
{
+ G->setQualitativeSpecies("s1");
+ G->setTransitionEffect("none");
Input* g2 = new Input();
(*g2) = (*G);
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == false);
+ fail_unless(g2->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getQualitativeSpecies() == "s1");
+ fail_unless(g2->isSetSign() == false);
+ fail_unless(g2->isSetTransitionEffect() == true);
+ fail_unless(g2->getTransitionEffect() == "none");
+ fail_unless(g2->isSetThresholdLevel() == false);
+
delete g2;
}
END_TEST
@@ -207,8 +230,19 @@
START_TEST(test_Input_clone)
{
+ G->setQualitativeSpecies("s1");
+ G->setTransitionEffect("none");
Input* g2 = G->clone();
-
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == false);
+ fail_unless(g2->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getQualitativeSpecies() == "s1");
+ fail_unless(g2->isSetSign() == false);
+ fail_unless(g2->isSetTransitionEffect() == true);
+ fail_unless(g2->getTransitionEffect() == "none");
+ fail_unless(g2->isSetThresholdLevel() == false);
+
delete g2;
}
END_TEST
@@ -224,12 +258,12 @@
tcase_add_test( tcase, test_Input_create );
- tcase_add_test( tcase, test_Input_id );
- tcase_add_test( tcase, test_Input_name );
- tcase_add_test( tcase, test_Input_qualitativeSpecies );
- tcase_add_test( tcase, test_Input_sign );
- tcase_add_test( tcase, test_Input_thresholdLevel );
- tcase_add_test( tcase, test_Input_transitionEffect );
+ tcase_add_test( tcase, test_Input_id );
+ tcase_add_test( tcase, test_Input_name );
+ tcase_add_test( tcase, test_Input_qualitativeSpecies );
+ tcase_add_test( tcase, test_Input_sign );
+ tcase_add_test( tcase, test_Input_thresholdLevel );
+ tcase_add_test( tcase, test_Input_transitionEffect );
tcase_add_test( tcase, test_Input_copy );
tcase_add_test( tcase, test_Input_assignment );
Added: branches/libsbml-packages/qual/src/sbml/test/TestOutput.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/TestOutput.cpp (rev 0)
+++ branches/libsbml-packages/qual/src/sbml/test/TestOutput.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -0,0 +1,252 @@
+/**
+ * @file TestOutput.cpp
+ * @brief TestOutput unit tests
+ * @author Sarah Keating
+ *
+ * $Id: $
+ * $HeadURL: $
+ *
+ * <!--------------------------------------------------------------------------
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ *
+ * Copyright (C) 2009-2011 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EBML-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
+ * ---------------------------------------------------------------------- -->*/
+
+#include <limits>
+
+#include <iostream>
+#include <check.h>
+#include <sbml/common/extern.h>
+#include <sbml/packages/qual/common/QualExtensionTypes.h>
+#include <sbml/extension/SBMLExtensionRegistry.h>
+#include <sbml/SBMLTypeCodes.h>
+#include <string>
+
+/** @cond doxygen-ignored */
+
+using namespace std;
+LIBSBML_CPP_NAMESPACE_USE
+
+/** @endcond doxygen-ignored */
+
+
+CK_CPPSTART
+
+static Output* G;
+static QualPkgNamespaces* GNS;
+
+void
+OutputTest_setup (void)
+{
+ GNS = new QualPkgNamespaces();
+ G = new Output(GNS);
+
+ if (G == NULL)
+ {
+ fail("Failed to create a Output object");
+ }
+}
+
+
+void
+OutputTest_teardown (void)
+{
+ delete G;
+ delete GNS;
+}
+
+
+START_TEST (test_Output_create)
+{
+ fail_unless(G->isSetId() == false);
+ fail_unless(G->isSetName() == false);
+ fail_unless(G->isSetQualitativeSpecies() == false);
+ fail_unless(G->isSetTransitionEffect() == false);
+ fail_unless(G->isSetOutputLevel() == false);
+
+}
+END_TEST
+
+
+START_TEST (test_Output_id)
+{
+ fail_unless(G->isSetId() == false);
+
+ fail_unless(G->setId("1") == LIBSBML_INVALID_ATTRIBUTE_VALUE);
+ fail_unless(G->isSetId() == false);
+
+ fail_unless(G->setId("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetId() == true);
+ fail_unless(G->getId() == "i1");
+
+ fail_unless(G->unsetId() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetId() == false);
+}
+END_TEST
+
+
+START_TEST (test_Output_name)
+{
+ fail_unless(G->isSetName() == false);
+
+ fail_unless(G->setName("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetName() == true);
+ fail_unless(G->getName() == "i1");
+
+ fail_unless(G->unsetName() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetName() == false);
+}
+END_TEST
+
+
+START_TEST (test_Output_qualitativeSpecies)
+{
+ fail_unless(G->isSetQualitativeSpecies() == false);
+
+ fail_unless(G->setQualitativeSpecies("1") == LIBSBML_INVALID_ATTRIBUTE_VALUE);
+ fail_unless(G->isSetQualitativeSpecies() == false);
+
+ fail_unless(G->setQualitativeSpecies("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetQualitativeSpecies() == true);
+ fail_unless(G->getQualitativeSpecies() == "i1");
+
+ fail_unless(G->unsetQualitativeSpecies() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetQualitativeSpecies() == false);
+}
+END_TEST
+
+
+START_TEST (test_Output_transitionEffect)
+{
+ fail_unless(G->isSetTransitionEffect() == false);
+
+ fail_unless(G->setTransitionEffect("o") == LIBSBML_INVALID_ATTRIBUTE_VALUE);
+ fail_unless(G->isSetTransitionEffect() == false);
+
+ fail_unless(G->setTransitionEffect("production") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetTransitionEffect() == true);
+ fail_unless(G->getTransitionEffect() == "production");
+
+ fail_unless(G->unsetTransitionEffect() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetTransitionEffect() == false);
+}
+END_TEST
+
+
+START_TEST (test_Output_OutputLevel)
+{
+ fail_unless(G->isSetOutputLevel() == false);
+
+ fail_unless(G->setOutputLevel(1) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetOutputLevel() == true);
+ fail_unless(G->getOutputLevel() == 1);
+
+ fail_unless(G->unsetOutputLevel() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetOutputLevel() == false);
+}
+END_TEST
+
+
+START_TEST(test_Output_copy)
+{
+ G->setQualitativeSpecies("s1");
+ G->setTransitionEffect("production");
+
+ Output *g2 = new Output(*G);
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == false);
+ fail_unless(g2->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getQualitativeSpecies() == "s1");
+ fail_unless(g2->isSetTransitionEffect() == true);
+ fail_unless(g2->getTransitionEffect() == "production");
+ fail_unless(g2->isSetOutputLevel() == false);
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_Output_assignment)
+{
+ G->setQualitativeSpecies("s1");
+ G->setTransitionEffect("production");
+ Output* g2 = new Output();
+
+ (*g2) = (*G);
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == false);
+ fail_unless(g2->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getQualitativeSpecies() == "s1");
+ fail_unless(g2->isSetTransitionEffect() == true);
+ fail_unless(g2->getTransitionEffect() == "production");
+ fail_unless(g2->isSetOutputLevel() == false);
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_Output_clone)
+{
+ G->setQualitativeSpecies("s1");
+ G->setTransitionEffect("production");
+ Output* g2 = G->clone();
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == false);
+ fail_unless(g2->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getQualitativeSpecies() == "s1");
+ fail_unless(g2->isSetTransitionEffect() == true);
+ fail_unless(g2->getTransitionEffect() == "production");
+ fail_unless(g2->isSetOutputLevel() == false);
+
+ delete g2;
+}
+END_TEST
+
+
+Suite *
+create_suite_Output (void)
+{
+ Suite *suite = suite_create("Output");
+ TCase *tcase = tcase_create("Output");
+
+ tcase_add_checked_fixture(tcase, OutputTest_setup, OutputTest_teardown);
+
+ tcase_add_test( tcase, test_Output_create );
+
+ tcase_add_test( tcase, test_Output_id );
+ tcase_add_test( tcase, test_Output_name );
+ tcase_add_test( tcase, test_Output_qualitativeSpecies );
+ tcase_add_test( tcase, test_Output_OutputLevel );
+ tcase_add_test( tcase, test_Output_transitionEffect );
+
+ tcase_add_test( tcase, test_Output_copy );
+ tcase_add_test( tcase, test_Output_assignment );
+ tcase_add_test( tcase, test_Output_clone );
+
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+
+CK_CPPEND
Added: branches/libsbml-packages/qual/src/sbml/test/TestQualitativeSpecies.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/TestQualitativeSpecies.cpp (rev 0)
+++ branches/libsbml-packages/qual/src/sbml/test/TestQualitativeSpecies.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -0,0 +1,293 @@
+/**
+ * @file TestQualitativeSpecies.cpp
+ * @brief TestQualitativeSpecies unit tests
+ * @author Sarah Keating
+ *
+ * $Id: $
+ * $HeadURL: $
+ *
+ * <!--------------------------------------------------------------------------
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ *
+ * Copyright (C) 2009-2011 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EBML-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
+ * ---------------------------------------------------------------------- -->*/
+
+#include <limits>
+
+#include <iostream>
+#include <check.h>
+#include <sbml/common/extern.h>
+#include <sbml/packages/qual/common/QualExtensionTypes.h>
+#include <sbml/extension/SBMLExtensionRegistry.h>
+#include <sbml/SBMLTypeCodes.h>
+#include <string>
+
+/** @cond doxygen-ignored */
+
+using namespace std;
+LIBSBML_CPP_NAMESPACE_USE
+
+/** @endcond doxygen-ignored */
+
+
+CK_CPPSTART
+
+static QualitativeSpecies* G;
+static QualPkgNamespaces* GNS;
+
+void
+QualitativeSpeciesTest_setup (void)
+{
+ GNS = new QualPkgNamespaces();
+ G = new QualitativeSpecies(GNS);
+
+ if (G == NULL)
+ {
+ fail("Failed to create a QualitativeSpecies object");
+ }
+}
+
+
+void
+QualitativeSpeciesTest_teardown (void)
+{
+ delete G;
+ delete GNS;
+}
+
+
+START_TEST (test_QualitativeSpecies_create)
+{
+ fail_unless(G->isSetId() == false);
+ fail_unless(G->isSetName() == false);
+ fail_unless(G->isSetCompartment() == false);
+ fail_unless(G->isSetConstant() == false);
+ fail_unless(G->isSetInitialLevel() == false);
+ fail_unless(G->isSetMaxLevel() == false);
+
+}
+END_TEST
+
+
+START_TEST (test_QualitativeSpecies_id)
+{
+ fail_unless(G->isSetId() == false);
+
+ fail_unless(G->setId("1") == LIBSBML_INVALID_ATTRIBUTE_VALUE);
+ fail_unless(G->isSetId() == false);
+
+ fail_unless(G->setId("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetId() == true);
+ fail_unless(G->getId() == "i1");
+
+ fail_unless(G->unsetId() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetId() == false);
+}
+END_TEST
+
+
+START_TEST (test_QualitativeSpecies_name)
+{
+ fail_unless(G->isSetName() == false);
+
+ fail_unless(G->setName("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetName() == true);
+ fail_unless(G->getName() == "i1");
+
+ fail_unless(G->unsetName() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetName() == false);
+}
+END_TEST
+
+
+START_TEST (test_QualitativeSpecies_compartment)
+{
+ fail_unless(G->isSetCompartment() == false);
+
+ fail_unless(G->setCompartment("1") == LIBSBML_INVALID_ATTRIBUTE_VALUE);
+ fail_unless(G->isSetCompartment() == false);
+
+ fail_unless(G->setCompartment("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetCompartment() == true);
+ fail_unless(G->getCompartment() == "i1");
+
+ fail_unless(G->unsetCompartment() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetCompartment() == false);
+}
+END_TEST
+
+
+START_TEST (test_QualitativeSpecies_constant)
+{
+ fail_unless(G->isSetConstant() == false);
+
+ fail_unless(G->setConstant(true) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetConstant() == true);
+ fail_unless(G->getConstant() == true);
+
+ fail_unless(G->setConstant(false) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetConstant() == true);
+ fail_unless(G->getConstant() == false);
+
+ fail_unless(G->unsetConstant() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetConstant() == false);
+}
+END_TEST
+
+
+START_TEST (test_QualitativeSpecies_initialLevel)
+{
+ fail_unless(G->isSetInitialLevel() == false);
+
+ fail_unless(G->setInitialLevel(1) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetInitialLevel() == true);
+ fail_unless(G->getInitialLevel() == 1);
+
+ fail_unless(G->unsetInitialLevel() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetInitialLevel() == false);
+}
+END_TEST
+
+
+START_TEST (test_QualitativeSpecies_maxLevel)
+{
+ fail_unless(G->isSetMaxLevel() == false);
+
+ fail_unless(G->setMaxLevel(1) == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetMaxLevel() == true);
+ fail_unless(G->getMaxLevel() == 1);
+
+ fail_unless(G->unsetMaxLevel() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetMaxLevel() == false);
+}
+END_TEST
+
+
+START_TEST(test_QualitativeSpecies_copy)
+{
+ G->setId("s1");
+ G->setCompartment("c");
+ G->setConstant(true);
+ G->setInitialLevel(2);
+ G->setMaxLevel(4);
+
+
+ QualitativeSpecies *g2 = new QualitativeSpecies(*G);
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == true);
+ fail_unless(g2->getId() == "s1");
+ fail_unless(g2->isSetConstant() == true);
+ fail_unless(g2->getConstant() == true);
+ fail_unless(g2->isSetCompartment() == true);
+ fail_unless(g2->getCompartment() == "c");
+ fail_unless(g2->isSetInitialLevel() == true);
+ fail_unless(g2->getInitialLevel() == 2);
+ fail_unless(g2->isSetMaxLevel() == true);
+ fail_unless(g2->getMaxLevel() == 4);
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_QualitativeSpecies_assignment)
+{
+ G->setId("s1");
+ G->setCompartment("c");
+ G->setConstant(true);
+ G->setInitialLevel(2);
+ G->setMaxLevel(4);
+
+ QualitativeSpecies* g2 = new QualitativeSpecies();
+
+ (*g2) = (*G);
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == true);
+ fail_unless(g2->getId() == "s1");
+ fail_unless(g2->isSetConstant() == true);
+ fail_unless(g2->getConstant() == true);
+ fail_unless(g2->isSetCompartment() == true);
+ fail_unless(g2->getCompartment() == "c");
+ fail_unless(g2->isSetInitialLevel() == true);
+ fail_unless(g2->getInitialLevel() == 2);
+ fail_unless(g2->isSetMaxLevel() == true);
+ fail_unless(g2->getMaxLevel() == 4);
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_QualitativeSpecies_clone)
+{
+ G->setId("s1");
+ G->setCompartment("c");
+ G->setConstant(true);
+ G->setInitialLevel(2);
+ G->setMaxLevel(4);
+
+ QualitativeSpecies* g2 = G->clone();
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == true);
+ fail_unless(g2->getId() == "s1");
+ fail_unless(g2->isSetConstant() == true);
+ fail_unless(g2->getConstant() == true);
+ fail_unless(g2->isSetCompartment() == true);
+ fail_unless(g2->getCompartment() == "c");
+ fail_unless(g2->isSetInitialLevel() == true);
+ fail_unless(g2->getInitialLevel() == 2);
+ fail_unless(g2->isSetMaxLevel() == true);
+ fail_unless(g2->getMaxLevel() == 4);
+
+ delete g2;
+}
+END_TEST
+
+
+Suite *
+create_suite_QualitativeSpecies (void)
+{
+ Suite *suite = suite_create("QualitativeSpecies");
+ TCase *tcase = tcase_create("QualitativeSpecies");
+
+ tcase_add_checked_fixture(tcase, QualitativeSpeciesTest_setup, QualitativeSpeciesTest_teardown);
+
+ tcase_add_test( tcase, test_QualitativeSpecies_create );
+
+ tcase_add_test( tcase, test_QualitativeSpecies_id );
+ tcase_add_test( tcase, test_QualitativeSpecies_name );
+ tcase_add_test( tcase, test_QualitativeSpecies_compartment );
+ tcase_add_test( tcase, test_QualitativeSpecies_constant );
+ tcase_add_test( tcase, test_QualitativeSpecies_initialLevel );
+ tcase_add_test( tcase, test_QualitativeSpecies_maxLevel );
+
+ tcase_add_test( tcase, test_QualitativeSpecies_copy );
+ tcase_add_test( tcase, test_QualitativeSpecies_assignment );
+ tcase_add_test( tcase, test_QualitativeSpecies_clone );
+
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+
+CK_CPPEND
Modified: branches/libsbml-packages/qual/src/sbml/test/TestRunner.c
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/TestRunner.c 2012-06-09 14:17:42 UTC (rev 15912)
+++ branches/libsbml-packages/qual/src/sbml/test/TestRunner.c 2012-06-09 16:45:38 UTC (rev 15913)
@@ -40,6 +40,10 @@
CK_CPPSTART
Suite *create_suite_Input (void);
+Suite *create_suite_Output (void);
+Suite *create_suite_FunctionTerm (void);
+Suite *create_suite_Transition (void);
+Suite *create_suite_QualitativeSpecies (void);
/**
* Global.
@@ -78,6 +82,10 @@
setTestDataDirectory();
SRunner *runner = srunner_create(create_suite_Input());
+ srunner_add_suite(runner, create_suite_Output());
+ srunner_add_suite(runner, create_suite_FunctionTerm());
+ srunner_add_suite(runner, create_suite_Transition());
+ srunner_add_suite(runner, create_suite_QualitativeSpecies());
if (argc > 1 && !strcmp(argv[1], "-nofork"))
{
Added: branches/libsbml-packages/qual/src/sbml/test/TestTransition.cpp
===================================================================
--- branches/libsbml-packages/qual/src/sbml/test/TestTransition.cpp (rev 0)
+++ branches/libsbml-packages/qual/src/sbml/test/TestTransition.cpp 2012-06-09 16:45:38 UTC (rev 15913)
@@ -0,0 +1,300 @@
+/**
+ * @file TestTransition.cpp
+ * @brief TestTransition unit tests
+ * @author Sarah Keating
+ *
+ * $Id: $
+ * $HeadURL: $
+ *
+ * <!--------------------------------------------------------------------------
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ *
+ * Copyright (C) 2009-2011 jointly by the following organizations:
+ * 1. California Institute of Technology, Pasadena, CA, USA
+ * 2. EMBL European Bioinformatics Institute (EBML-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
+ * ---------------------------------------------------------------------- -->*/
+
+#include <limits>
+
+#include <iostream>
+#include <check.h>
+#include <sbml/common/extern.h>
+#include <sbml/packages/qual/common/QualExtensionTypes.h>
+#include <sbml/extension/SBMLExtensionRegistry.h>
+#include <sbml/SBMLTypeCodes.h>
+#include <string>
+
+/** @cond doxygen-ignored */
+
+using namespace std;
+LIBSBML_CPP_NAMESPACE_USE
+
+/** @endcond doxygen-ignored */
+
+
+CK_CPPSTART
+
+static Transition* G;
+static QualPkgNamespaces* GNS;
+
+void
+TransitionTest_setup (void)
+{
+ GNS = new QualPkgNamespaces();
+ G = new Transition(GNS);
+
+ if (G == NULL)
+ {
+ fail("Failed to create a Transition object");
+ }
+}
+
+
+void
+TransitionTest_teardown (void)
+{
+ delete G;
+ delete GNS;
+}
+
+
+START_TEST (test_Transition_create)
+{
+ fail_unless(G->isSetId() == false);
+ fail_unless(G->isSetName() == false);
+
+ fail_unless(G->getNumInputs() == 0);
+ fail_unless(G->getNumOutputs() == 0);
+ fail_unless(G->getNumFunctionTerms() == 0);
+
+}
+END_TEST
+
+
+START_TEST (test_Transition_id)
+{
+ fail_unless(G->isSetId() == false);
+
+ fail_unless(G->setId("1") == LIBSBML_INVALID_ATTRIBUTE_VALUE);
+ fail_unless(G->isSetId() == false);
+
+ fail_unless(G->setId("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetId() == true);
+ fail_unless(G->getId() == "i1");
+
+ fail_unless(G->unsetId() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetId() == false);
+}
+END_TEST
+
+
+START_TEST (test_Transition_name)
+{
+ fail_unless(G->isSetName() == false);
+
+ fail_unless(G->setName("i1") == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetName() == true);
+ fail_unless(G->getName() == "i1");
+
+ fail_unless(G->unsetName() == LIBSBML_OPERATION_SUCCESS);
+ fail_unless(G->isSetName() == false);
+}
+END_TEST
+
+
+START_TEST (test_Transition_Input)
+{
+ fail_unless(G->getNumInputs() == 0);
+
+ G->createInput();
+
+ fail_unless(G->getNumInputs() == 1);
+
+ Input *i = G->createInput();
+ i->setId("i1");
+
+ fail_unless(G->getNumInputs() == 2);
+
+ G->removeInput("i1");
+
+ fail_unless(G->getNumInputs() == 1);
+
+ G->removeInput(0);
+
+ fail_unless(G->getNumInputs() == 0);
+}
+END_TEST
+
+
+START_TEST (test_Transition_Output)
+{
+ fail_unless(G->getNumOutputs() == 0);
+
+ G->createOutput();
+
+ fail_unless(G->getNumOutputs() == 1);
+
+ Output *i = G->createOutput();
+ i->setId("i1");
+
+ fail_unless(G->getNumOutputs() == 2);
+
+ G->removeOutput("i1");
+
+ fail_unless(G->getNumOutputs() == 1);
+
+ G->removeOutput(0);
+
+ fail_unless(G->getNumOutputs() == 0);
+}
+END_TEST
+
+
+START_TEST (test_Transition_FunctionTerm)
+{
+ fail_unless(G->getNumFunctionTerms() == 0);
+
+ G->createFunctionTerm();
+
+ fail_unless(G->getNumFunctionTerms() == 1);
+
+ FunctionTerm *i = G->createFunctionTerm();
+
+ fail_unless(G->getNumFunctionTerms() == 2);
+
+ G->removeFunctionTerm(1);
+
+ fail_unless(G->getNumFunctionTerms() == 1);
+
+ G->removeFunctionTerm(0);
+
+ fail_unless(G->getNumFunctionTerms() == 0);
+}
+END_TEST
+
+
+START_TEST(test_Transition_copy)
+{
+ Output *o = G->createOutput();
+ o->setQualitativeSpecies("s1");
+ o->setTransitionEffect("production");
+
+ G->setId("t1");
+
+ Transition *g2 = new Transition(*G);
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == true);
+ fail_unless(g2->getId() == "t1");
+ fail_unless(g2->getNumInputs() == 0);
+ fail_unless(g2->getNumOutputs() == 1);
+ fail_unless(g2->getNumFunctionTerms() == 0);
+
+ fail_unless(g2->getOutput(0)->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getOutput(0)->isSetId() == false);
+ fail_unless(g2->getOutput(0)->getQualitativeSpecies() == "s1");
+ fail_unless(g2->getOutput(0)->getTransitionEffect() == "production");
+
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_Transition_assignment)
+{
+ Output *o = G->createOutput();
+ o->setQualitativeSpecies("s1");
+ o->setTransitionEffect("production");
+
+ G->setId("t1");
+
+ Transition* g2 = new Transition();
+
+ (*g2) = (*G);
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == true);
+ fail_unless(g2->getId() == "t1");
+ fail_unless(g2->getNumInputs() == 0);
+ fail_unless(g2->getNumOutputs() == 1);
+ fail_unless(g2->getNumFunctionTerms() == 0);
+
+ fail_unless(g2->getOutput(0)->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getOutput(0)->isSetId() == false);
+ fail_unless(g2->getOutput(0)->getQualitativeSpecies() == "s1");
+ fail_unless(g2->getOutput(0)->getTransitionEffect() == "production");
+
+ delete g2;
+}
+END_TEST
+
+
+START_TEST(test_Transition_clone)
+{
+ Output *o = G->createOutput();
+ o->setQualitativeSpecies("s1");
+ o->setTransitionEffect("production");
+
+ G->setId("t1");
+
+ Transition* g2 = G->clone();
+
+ fail_unless(g2->isSetName() == false);
+ fail_unless(g2->isSetId() == true);
+ fail_unless(g2->getId() == "t1");
+ fail_unless(g2->getNumInputs() == 0);
+ fail_unless(g2->getNumOutputs() == 1);
+ fail_unless(g2->getNumFunctionTerms() == 0);
+
+ fail_unless(g2->getOutput(0)->isSetQualitativeSpecies() == true);
+ fail_unless(g2->getOutput(0)->isSetId() == false);
+ fail_unless(g2->getOutput(0)->getQualitativeSpecies() == "s1");
+ fail_unless(g2->getOutput(0)->getTransitionEffect() == "production");
+
+ delete g2;
+}
+END_TEST
+
+
+Suite *
+create_suite_Transition (void)
+{
+ Suite *suite = suite_create("Transition");
+ TCase *tcase = tcase_create("Transition");
+
+ tcase_add_checked_fixture(tcase, TransitionTest_setup, TransitionTest_teardown);
+
+ tcase_add_test( tcase, test_Transition_create );
+
+ tcase_add_test( tcase, test_Transition_id );
+ tcase_add_test( tcase, test_Transition_name );
+ tcase_add_test( tcase, test_Transition_Input );
+ tcase_add_test( tcase, test_Transition_FunctionTerm );
+ tcase_add_test( tcase, test_Transition_Output );
+
+ tcase_add_test( tcase, test_Transition_copy );
+ tcase_add_test( tcase, test_Transition_assignment );
+ tcase_add_test( tcase, test_Transition_clone );
+
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+
+CK_CPPEND
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-09 14:17:47
|
Revision: 15912
http://sbml.svn.sourceforge.net/sbml/?rev=15912&view=rev
Author: mhucka
Date: 2012-06-09 14:17:42 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
Woops, the date needed to be updated, since I did change the contents.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex
Modified: trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex 2012-06-09 14:16:47 UTC (rev 15911)
+++ trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex 2012-06-09 14:17:42 UTC (rev 15912)
@@ -6,7 +6,7 @@
\packageTitle{Hierarchical Model Composition}
\packageVersion{Version 1 (Draft)}
-\packageVersionDate{8 June 2012}
+\packageVersionDate{9 June 2012}
\packageGeneralURL{http://sbml.org/Documents/Specifications/Packages/Hierarchical_Model_Composition}
\packageThisVersionURL{http://sbml.org/Documents/Specifications/Packages/Hierarchical_Model_Composition/XXXXX}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-09 14:16:53
|
Revision: 15911
http://sbml.svn.sourceforge.net/sbml/?rev=15911&view=rev
Author: mhucka
Date: 2012-06-09 14:16:47 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
1) Noticed Wolfram's name was misspelled. Fixed.
2) Noticed inconsistent spacing in author block. Fixed.
3) Spelled out state names to avoid abbreviation soup.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex
Modified: trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex 2012-06-09 14:08:42 UTC (rev 15910)
+++ trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex 2012-06-09 14:16:47 UTC (rev 15911)
@@ -16,24 +16,24 @@
\mailto{lpsmith@u.washington.edu} & \mailto{mh...@ca...}\\
Department of Bioengineering & Computing and Mathematical Sciences\\
University of Washington & California Institute of Technology\\
- Seattle, WA, US & Pasadena, CA, US\\
+ Seattle, Washington, US & Pasadena, California, US\\
\\[0.25em]
Stefan Hoops & Andrew Finney\\
\mailto{sh...@vt...} & \mailto{af...@ca...}\\
Virginia Bioinformatics Institute & Oxfordshire, UK \\
Virginia Tech & \\
- Blacksburg, VA, US & \\
+ Blacksburg, Virginia, US & \\
\\[0.25em]
Martin Ginkel & Chris J. Myers\\
\mailto{gi...@mp...} & \mailto{my...@ec...}\\
Dynamics of Complex Technical Systems & Electrical and Computer Engineering\\
Max Planck Institute & University of Utah\\
- Magdeburg, DE & Salt Lake City, UT, US\\
- \\
- Ion Moraru & Wolfram Leibermeister\\
+ Magdeburg, DE & Salt Lake City, Utah, US\\
+ \\[0.25em]
+ Ion Moraru & Wolfram Liebermeister\\
\mailto{mo...@ne...} & \mailto{lie...@mo...}\\
University of Connecticut Health Center & Molecular Genetics\\
- Farmington, CT, US & Max Planck Institute\\
+ Farmington, Connecticut, US & Max Planck Institute\\
& Berlin, DE\\[-1ex]
\end{tabular}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-09 14:08:49
|
Revision: 15910
http://sbml.svn.sourceforge.net/sbml/?rev=15910&view=rev
Author: mhucka
Date: 2012-06-09 14:08:42 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
Shuffled the author list some more, and added Frank to the contributors.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex
trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex
Modified: trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex 2012-06-08 21:08:45 UTC (rev 15909)
+++ trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex 2012-06-09 14:08:42 UTC (rev 15910)
@@ -28,9 +28,9 @@
\toprule
\textbf{Contributor} & \textbf{Affiliation} & \textbf{City and Country}\\
\midrule
+ Frank Bergmann & California Institute of Technology & Pasadena, CA, US\\
Michael Blinov & University of Connecticut Health Center & Farmington, CT, US\\
Nicolas Le Nov\`{e}re & EMBL European Bioinformatics Institute & Hinxton, Cambridge, UK\\
- Chris J. Myers & Electrical and Computer Engineering, University of Utah & Salt Lake City, UT, US\\
Ranjit Randhawa & Department of Computer Science, Virginia Tech. & Blacksburg, VA, US\\
J\"{o}rg Stelling & Max Planck Institute for Dynamics of Complex Technical Systems & Magdeburg, DE\\
Jonathan Webb & BBN Technologies & Cambridge, MA, US\\
Modified: trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex 2012-06-08 21:08:45 UTC (rev 15909)
+++ trunk/specifications/sbml-level-3/version-1/comp/spec/main.tex 2012-06-09 14:08:42 UTC (rev 15910)
@@ -11,29 +11,30 @@
\packageThisVersionURL{http://sbml.org/Documents/Specifications/Packages/Hierarchical_Model_Composition/XXXXX}
\author{%
- \begin{tabular}{>{\hspace{20pt}}c>{\hspace{20pt}}c}
+ \begin{tabular}{c>{\hspace{20pt}}c}
Lucian P. Smith & Michael Hucka\\
\mailto{lpsmith@u.washington.edu} & \mailto{mh...@ca...}\\
Department of Bioengineering & Computing and Mathematical Sciences\\
University of Washington & California Institute of Technology\\
Seattle, WA, US & Pasadena, CA, US\\
\\[0.25em]
- Stefan Hoops & Martin Ginkel\\
- \mailto{sh...@vt...} & \mailto{gi...@mp...}\\
- Virginia Bioinformatics Institute & Dynamics of Complex Technical Systems\\
- Virginia Tech & Max Planck Institute\\
- Blacksburg, VA, US & Magdeburg, DE\\
+ Stefan Hoops & Andrew Finney\\
+ \mailto{sh...@vt...} & \mailto{af...@ca...}\\
+ Virginia Bioinformatics Institute & Oxfordshire, UK \\
+ Virginia Tech & \\
+ Blacksburg, VA, US & \\
\\[0.25em]
- Wolfram Leibermeister & Ion Moraru\\
- \mailto{lie...@mo...} & \mailto{mo...@ne...}\\
- Molecular Genetics & Univ. of Connecticut Health Center\\
- Max Planck Institute & Farmington, CT, US\\
- Berlin, DE \\
+ Martin Ginkel & Chris J. Myers\\
+ \mailto{gi...@mp...} & \mailto{my...@ec...}\\
+ Dynamics of Complex Technical Systems & Electrical and Computer Engineering\\
+ Max Planck Institute & University of Utah\\
+ Magdeburg, DE & Salt Lake City, UT, US\\
\\
- \multicolumn{2}{c}{Andrew Finney}\\
- \multicolumn{2}{c}{\mailto{af...@ca...}}\\
- \multicolumn{2}{c}{Oxfordshire, UK}\\
- \\
+ Ion Moraru & Wolfram Leibermeister\\
+ \mailto{mo...@ne...} & \mailto{lie...@mo...}\\
+ University of Connecticut Health Center & Molecular Genetics\\
+ Farmington, CT, US & Max Planck Institute\\
+ & Berlin, DE\\[-1ex]
\end{tabular}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-08 21:08:50
|
Revision: 15909
http://sbml.svn.sourceforge.net/sbml/?rev=15909&view=rev
Author: mhucka
Date: 2012-06-08 21:08:45 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
Added formatted version for easier reference.
Added Paths:
-----------
trunk/specifications/sbml-level-3/version-1/comp/spec/comp-2012-06-08.pdf
Added: trunk/specifications/sbml-level-3/version-1/comp/spec/comp-2012-06-08.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/specifications/sbml-level-3/version-1/comp/spec/comp-2012-06-08.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-06-08 20:36:14
|
Revision: 15908
http://sbml.svn.sourceforge.net/sbml/?rev=15908&view=rev
Author: mhucka
Date: 2012-06-08 20:36:08 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
Lucian pointed out that the caption for table 1 was now incorrect given the addition of some of the new people.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex
Modified: trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex 2012-06-08 20:35:01 UTC (rev 15907)
+++ trunk/specifications/sbml-level-3/version-1/comp/spec/background.tex 2012-06-08 20:36:08 UTC (rev 15908)
@@ -36,8 +36,8 @@
Jonathan Webb & BBN Technologies & Cambridge, MA, US\\
\bottomrule
\end{edtable}
- \caption{List of individuals who made significant contributions to the
- development of prior SBML proposals that influenced the present version
+ \caption{Individuals who made significant contributions to the
+ development of prior SBML proposals and/or influenced the present version
of hierarchical model composition.}
\label{many-thanks}
\end{table}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|