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
|
2
|
3
|
4
|
5
(1) |
6
|
|
7
|
8
|
9
|
10
|
11
|
12
(4) |
13
(3) |
|
14
|
15
(1) |
16
(1) |
17
(5) |
18
(2) |
19
(6) |
20
|
|
21
(1) |
22
(5) |
23
(5) |
24
(1) |
25
(6) |
26
(12) |
27
(3) |
|
28
|
29
(1) |
30
(1) |
|
|
|
|
|
From: <fbe...@us...> - 2010-11-30 21:52:39
|
Revision: 12239
http://sbml.svn.sourceforge.net/sbml/?rev=12239&view=rev
Author: fbergmann
Date: 2010-11-30 21:52:33 +0000 (Tue, 30 Nov 2010)
Log Message:
-----------
- finished adding the post processing step for creating the java documentation
- modified the path for creating the python configuration
Modified Paths:
--------------
branches/libsbml-5/docs/CMakeLists.txt
branches/libsbml-5/docs/src/doxygen-config-python.txt.cmake
Added Paths:
-----------
branches/libsbml-5/docs/process-java-doc.cmake
Modified: branches/libsbml-5/docs/CMakeLists.txt
===================================================================
--- branches/libsbml-5/docs/CMakeLists.txt 2010-11-29 13:31:28 UTC (rev 12238)
+++ branches/libsbml-5/docs/CMakeLists.txt 2010-11-30 21:52:33 UTC (rev 12239)
@@ -75,6 +75,7 @@
${search_path}
COMMENT "Generate ${lang}-API Documentation"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
+
)
add_custom_target(api_docs_${lang} ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api/index.html ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
@@ -168,20 +169,37 @@
COMMENT "Generate Java-API Documentation"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src
+
COMMAND "${CMAKE_COMMAND}"
ARGS -E copy
- ${logo_file}
- ${output_dir}
+ "${logo_file}"
+ "${output_dir}"
+
COMMAND "${CMAKE_COMMAND}"
ARGS -E copy
- ${sbml_js}
- ${output_dir}
+ "${sbml_js}"
+ "${output_dir}"
+
COMMAND "${CMAKE_COMMAND}"
ARGS -E copy
- ${tabs_css}
- ${output_dir}
- )
+ "${tabs_css}"
+ "${output_dir}"
+
+# COMMAND "${CMAKE_COMMAND}"
+# ARGS -E copy
+# ${logo_file}
+# ${java_output_dir}
+#
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -DPACKAGE_VERSION=\"${PACKAGE_VERSION}\"
+ -Djava_manual=${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/process-java-doc.cmake
+
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/process-java-doc.cmake
+ )
+
add_custom_target(api_docs_java ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api/index.html)
install(DIRECTORY ${output_dir} DESTINATION docs )
Added: branches/libsbml-5/docs/process-java-doc.cmake
===================================================================
--- branches/libsbml-5/docs/process-java-doc.cmake (rev 0)
+++ branches/libsbml-5/docs/process-java-doc.cmake 2010-11-30 21:52:33 UTC (rev 12239)
@@ -0,0 +1,77 @@
+#
+# This file applies post processing to the generated java documentation.
+#
+#
+#
+#
+
+macro(merge_html sourceFile targetFile title)
+
+ file(READ "libsbml-java-top.html" top)
+ file(READ "${sourceFile}" source)
+ file(READ "libsbml-java-bottom.html" bottom)
+ file(READ "libsbml-java-footer.html" footer)
+
+ set(content "${top}${source}${bottom}${footer}")
+
+ string(REPLACE "%%title%%" "${title}" content "${content}")
+ string(REPLACE "%%version%%" "${PACKAGE_VERSION}" content "${content}")
+
+ file(WRITE "${targetFile}" "${content}")
+
+endmacro()
+
+macro(merge_html_verb sourceFile targetFile title)
+
+ file(READ "libsbml-java-top.html" top)
+ file(READ "libsbml-java-verb-top.html" verb)
+ file(READ "${sourceFile}" source)
+ file(READ "libsbml-java-verb-bottom.html" verb_bottom)
+ file(READ "libsbml-java-bottom.html" bottom)
+ file(READ "libsbml-java-footer.html" footer)
+
+ set(content "${top}${verb}${source}${verb_bottom}${bottom}${footer}")
+
+ string(REPLACE "%%title%%" "${title}" content "${content}")
+ string(REPLACE "%%version%%" "${PACKAGE_VERSION}" content "${content}")
+
+ file(WRITE "${targetFile}" "${content}")
+
+endmacro()
+
+macro(insert_javascript directory)
+
+ file(GLOB html_files ${directory}/*.html)
+
+ foreach(html ${html_files})
+ file(READ "${html}" content)
+
+ # only change if it is not included yet
+ if(NOT "${content}" MATCHES "^.*sbml.js^.*")
+
+ string(REPLACE "<SCRIPT type=\"text/javascript\">"
+ "<script type=\"text/javascript\" src=\"../../../sbml.js\"></script><SCRIPT type=\"text/javascript\">"
+ content ${content})
+
+ file(WRITE "${html}" "${content}")
+
+ endif()
+
+ endforeach()
+
+endmacro()
+
+merge_html( "libsbml-java-overview.html" "${java_manual}/overview-summary.html" "Java ${PACKAGE_VERSION} API" )
+merge_html( "libsbml-installation.html" "${java_manual}/libsbml-installation.html" "installation" )
+merge_html( "libsbml-features.html" "${java_manual}/libsbml-features.html" "features" )
+merge_html( "libsbml-accessing.html" "${java_manual}/libsbml-accessing.html" "accessibility to your software" )
+merge_html( "libsbml-communications.html" "${java_manual}/libsbml-communications.html" "bug reports and other communications" )
+merge_html( "libsbml-java-reading.html" "${java_manual}/libsbml-java-reading.html" "basic facilities for reading and writing SBML content" )
+merge_html( "libsbml-java-math.html" "${java_manual}/libsbml-java-math.html" "facilities for manipulating mathematical expressions" )
+merge_html( "libsbml-issues.html" "${java_manual}/libsbml-issues.html" "known issues and pitfalls" )
+merge_html( "libsbml-uninstallation.html" "${java_manual}/libsbml-uninstallation.html" "uninstallation" )
+merge_html( "../../LICENSE.html" "${java_manual}/libsbml-license.html" "license" )
+
+merge_html_verb( "../../NEWS.txt" "${java_manual}/libsbml-news.html" "news" )
+
+insert_javascript("${java_manual}/org/sbml/libsbml")
Modified: branches/libsbml-5/docs/src/doxygen-config-python.txt.cmake
===================================================================
--- branches/libsbml-5/docs/src/doxygen-config-python.txt.cmake 2010-11-29 13:31:28 UTC (rev 12238)
+++ branches/libsbml-5/docs/src/doxygen-config-python.txt.cmake 2010-11-30 21:52:33 UTC (rev 12239)
@@ -94,7 +94,7 @@
# input file. Doxygen will then use the output that the filter program writes
# to standard output.
-INPUT_FILTER = ./pythondocfilter.py
+INPUT_FILTER = pythondocfilter.py
# Because of the way the proxies are done, @param never works properly.
# So don't bother telling us.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-29 13:31:35
|
Revision: 12238
http://sbml.svn.sourceforge.net/sbml/?rev=12238&view=rev
Author: sarahkeating
Date: 2010-11-29 13:31:28 +0000 (Mon, 29 Nov 2010)
Log Message:
-----------
tidied up tests
Modified Paths:
--------------
trunk/libsbml/src/bindings/matlab/test/testBinding.m
trunk/libsbml/src/bindings/matlab/test/testOutput.m
Modified: trunk/libsbml/src/bindings/matlab/test/testBinding.m
===================================================================
--- trunk/libsbml/src/bindings/matlab/test/testBinding.m 2010-11-27 04:35:15 UTC (rev 12237)
+++ trunk/libsbml/src/bindings/matlab/test/testBinding.m 2010-11-29 13:31:28 UTC (rev 12238)
@@ -1,9 +1,9 @@
function Totalfail = testBinding
if (strcmp(isoctave(), '0'))
- test = 15;
+ test = 15 + 36;
else
- test = 14;
+ test = 14 + 36;
end;
Totalfail = 0;
@@ -24,6 +24,8 @@
if (strcmp(isoctave(), '0'))
Totalfail = Totalfail + testReadFlags;
end;
+Totalfail = Totalfail + testOutput;
+disp ('************************************');
disp('Overall tests:');
disp(sprintf('Number tests: %d', test));
disp(sprintf('Number fails: %d', Totalfail));
@@ -32,5 +34,3 @@
if (Totalfail == 0)
disp('MATLAB binding tests successful.');
end;
-
-testOutput;
\ No newline at end of file
Modified: trunk/libsbml/src/bindings/matlab/test/testOutput.m
===================================================================
--- trunk/libsbml/src/bindings/matlab/test/testOutput.m 2010-11-27 04:35:15 UTC (rev 12237)
+++ trunk/libsbml/src/bindings/matlab/test/testOutput.m 2010-11-29 13:31:28 UTC (rev 12238)
@@ -42,12 +42,19 @@
for i=1:length(files)
model = [];
- model = TranslateSBML(sprintf('test-data/%s', files(i).name));
- if (~isempty(model))
- OutputSBML(model, sprintf('Out-test/%s', files(i).name));
- if (compareFiles(sprintf('test-data/%s', files(i).name), sprintf('Out-test/%s', files(i).name)))
- disp(sprintf('Output of %s failed', files(i).name));
- fail = fail + 1;
+ %skip models that will cause read errors
+ if (strcmp(files(i).name, 'readerror.xml'))
+ % donothing
+ elseif (strcmp(files(i).name, 'fatal.xml'))
+ %do nothing
+ else
+ model = TranslateSBML(sprintf('test-data/%s', files(i).name));
+ if (~isempty(model))
+ OutputSBML(model, sprintf('Out-test/%s', files(i).name));
+ if (compareFiles(sprintf('test-data/%s', files(i).name), sprintf('Out-test/%s', files(i).name)))
+ disp(sprintf('Output of %s failed', files(i).name));
+ fail = fail + 1;
+ end;
end;
end;
end;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-27 04:35:21
|
Revision: 12237
http://sbml.svn.sourceforge.net/sbml/?rev=12237&view=rev
Author: fbergmann
Date: 2010-11-27 04:35:15 +0000 (Sat, 27 Nov 2010)
Log Message:
-----------
- found a better way to determine the library path
Modified Paths:
--------------
branches/libsbml-5/src/bindings/octave/CMakeLists.txt
Modified: branches/libsbml-5/src/bindings/octave/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/octave/CMakeLists.txt 2010-11-27 04:34:50 UTC (rev 12236)
+++ branches/libsbml-5/src/bindings/octave/CMakeLists.txt 2010-11-27 04:35:15 UTC (rev 12237)
@@ -7,6 +7,12 @@
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
find_package(Octave)
+# get location of library
+get_property(sbml_location TARGET sbml PROPERTY LOCATION)
+get_filename_component(sbml_path ${sbml_location} PATH)
+file(TO_NATIVE_PATH ${sbml_path} sbml_path)
+
+
# break up the libsbml library dependencies into paths and libraries
set(OCTAVE_EXTRA_LIBS)
set(OCTAVE_EXTRA_PATHS)
@@ -34,7 +40,7 @@
-l${LIBSBML_LIBRARY}
${OCTAVE_EXTRA_LIBS}
${OCTAVE_EXTRA_PATHS}
- -L${CMAKE_BINARY_DIR}/src
+ -L${sbml_path}
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/../matlab/TranslateSBML.c
COMMENT "compile and link octave mex file")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-27 04:34:56
|
Revision: 12236
http://sbml.svn.sourceforge.net/sbml/?rev=12236&view=rev
Author: fbergmann
Date: 2010-11-27 04:34:50 +0000 (Sat, 27 Nov 2010)
Log Message:
-----------
- found a better way to determine the library path
Modified Paths:
--------------
branches/libsbml-5/src/bindings/matlab/CMakeLists.txt
Modified: branches/libsbml-5/src/bindings/matlab/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/matlab/CMakeLists.txt 2010-11-27 00:20:11 UTC (rev 12235)
+++ branches/libsbml-5/src/bindings/matlab/CMakeLists.txt 2010-11-27 04:34:50 UTC (rev 12236)
@@ -7,6 +7,11 @@
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ${CMAKE_MODULE_PATH})
find_package(Matlab)
+# get location of library
+get_property(sbml_location TARGET sbml PROPERTY LOCATION)
+get_filename_component(sbml_path ${sbml_location} PATH)
+file(TO_NATIVE_PATH ${sbml_path} sbml_path)
+
message(STATUS "matlab root ${MATLAB_ROOT}")
message(STATUS "matlab mex command ${MATLAB_MEX_COMMAND}")
message(STATUS "matlab mex library ${MATLAB_MEX_LIBRARY}")
@@ -32,24 +37,16 @@
set(MATLAB_OBJ_FILE)
set(MATLAB_MEX_EXTRA_ARGS)
if(UNIX)
- set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${CMAKE_BINARY_DIR}/src/)
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${sbml_path})
set(MATLAB_MEX_EXTRA_ARGS -cxx)
set(MATLAB_OBJ_FILE ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.o)
else()
if(MSVC)
- if (EXISTS "${CMAKE_BINARY_DIR}/src/${LIBSBML_LIBRARY}.lib")
- file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src/ lib_path)
- set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${lib_path})
- elseif(EXISTS "${CMAKE_BINARY_DIR}/src/Release/${LIBSBML_LIBRARY}.lib")
- file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src/Release/ lib_path)
- set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${lib_path})
- else()
- set(MATLAB_LIBSBML_LIB ${LIBSBML_LIBRARY}.lib )
- endif()
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${sbml_path})
set(MATLAB_MEX_EXTRA_ARGS -DWIN32 -DLIBSBML_EXPORTS -DLIBLAX_EXPORTS )
set(MATLAB_OBJ_FILE ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.obj)
else()
- set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${CMAKE_BINARY_DIR}/src/)
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${sbml_path})
set(MATLAB_OBJ_FILE ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.o)
endif()
endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-27 00:20:17
|
Revision: 12235
http://sbml.svn.sourceforge.net/sbml/?rev=12235&view=rev
Author: fbergmann
Date: 2010-11-27 00:20:11 +0000 (Sat, 27 Nov 2010)
Log Message:
-----------
- compile OutputSBML for octave
Modified Paths:
--------------
trunk/libsbml/src/bindings/octave/Makefile.in
Modified: trunk/libsbml/src/bindings/octave/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/octave/Makefile.in 2010-11-26 23:44:59 UTC (rev 12234)
+++ trunk/libsbml/src/bindings/octave/Makefile.in 2010-11-27 00:20:11 UTC (rev 12235)
@@ -52,6 +52,8 @@
README.txt \
TranslateSBML.c \
TranslateSBML.m \
+ OutputSBML.c \
+ OutputSBML.m \
buildWin.m \
install_Win32.m \
install_Win64.m \
@@ -64,7 +66,8 @@
test.xml \
uninstall_Win32.m
-compiled_sources = TranslateSBML.c
+compiled_sources = TranslateSBML.c \
+ OutputSBML.c
# This use of $(libraries) is slightly inconsistent with the other makefiles,
# but for Octave, these object files act a lot like dynamic libraries and
@@ -129,9 +132,10 @@
flags = $(MKOCTFILE_FLAGS) -DUSE_OCTAVE -I../.. -I../../../include
-TranslateSBML.lo: TranslateSBML.c
+%.lo: %.c
$(LIBTOOL) --tag=CC --mode=compile $(MKOCTFILE_WRAPPER) $(MKOCTFILE) -c -o $@ $(flags) $<
+
%.$(OCTAVEEXT): %.lo
$(TOP_SRCDIR)/config/lt_link_helper.sh $(MKOCTFILE_WRAPPER) --libdir $(LIBDIR) $(MKOCTFILE) -o $@ $(flags) $^ ../../libsbml.la $(MKOCTFILE_LIBS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 23:45:05
|
Revision: 12234
http://sbml.svn.sourceforge.net/sbml/?rev=12234&view=rev
Author: fbergmann
Date: 2010-11-26 23:44:59 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
- C# bindings use new getXXX namespace functions instead of properties
Modified Paths:
--------------
branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-groups.i
branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-layout.i
Modified: branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-groups.i
===================================================================
--- branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-groups.i 2010-11-26 22:44:21 UTC (rev 12233)
+++ branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-groups.i 2010-11-26 23:44:59 UTC (rev 12234)
@@ -7,7 +7,7 @@
%pragma(csharp) modulecode =
%{
- if (ns.hasURI(GroupsExtension.XmlnsL3V1V1))
+ if (ns.hasURI(GroupsExtension.getXmlnsL3V1V1()))
{
return new GroupsPkgNamespaces(cPtr, owner);
}
Modified: branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-layout.i
===================================================================
--- branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-layout.i 2010-11-26 22:44:21 UTC (rev 12233)
+++ branches/libsbml-5/src/bindings/csharp/local-downcast-namespaces-layout.i 2010-11-26 23:44:59 UTC (rev 12234)
@@ -7,7 +7,7 @@
%pragma(csharp) modulecode =
%{
- if (ns.hasURI(LayoutExtension.XmlnsL3V1V1) || ns.hasURI(LayoutExtension.XmlnsL2))
+ if (ns.hasURI(LayoutExtension.getXmlnsL3V1V1()) || ns.hasURI(LayoutExtension.getXmlnsL2()))
{
return new LayoutPkgNamespaces(cPtr, owner);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 22:44:29
|
Revision: 12233
http://sbml.svn.sourceforge.net/sbml/?rev=12233&view=rev
Author: fbergmann
Date: 2010-11-26 22:44:21 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
As discovered yesterday, having PackageName, DefaultLevel, DefaultPackageVersion, DefaultVersion and XmlnsL3V1V1 as static variables on LibSBML Extension classes will not work for dynamic libraries on Windows. This set of changes alters the API so that these static variables are now static methods. Everything works fine with this on Windows. I will perform more testing on other platforms.
The one drawback that I have discovered is with swigdoc.py. It cannot handle initializations of the form:
SBMLExtensionNamespaces(unsigned int level = SBMLExtensionType::getDefaultLevel(),
unsigned int version = SBMLExtensionType::getDefaultVersion(),
unsigned int pkgVersion = SBMLExtensionType::getDefaultPackageVersion(),
const std::string& prefix = SBMLExtensionType::getPackageName())
Instead of creating documentation for this constructor it will instead create documentation for:
SBMLExtensionNamespaces::SBMLExtensionType::getPackageName())
and produces invalid swig files in the process. For now I changed swigdoc.py to skip members with 'SBMLExtensionType' but this needs fixing.
Modified Paths:
--------------
branches/libsbml-5/docs/src/libsbml-extension-support-classes.txt
branches/libsbml-5/src/bindings/swig/swigdoc.py
branches/libsbml-5/src/extension/SBMLExtension.h
branches/libsbml-5/src/extension/SBMLExtensionNamespaces.h
branches/libsbml-5/src/extension/SBaseExtensionPoint.h
branches/libsbml-5/src/packages/groups/extension/GroupsExtension.cpp
branches/libsbml-5/src/packages/groups/extension/GroupsExtension.h
branches/libsbml-5/src/packages/groups/sbml/Group.cpp
branches/libsbml-5/src/packages/groups/sbml/Group.h
branches/libsbml-5/src/packages/groups/sbml/Member.h
branches/libsbml-5/src/packages/layout/extension/LayoutExtension.cpp
branches/libsbml-5/src/packages/layout/extension/LayoutExtension.h
branches/libsbml-5/src/packages/layout/extension/LayoutModelPlugin.cpp
branches/libsbml-5/src/packages/layout/extension/LayoutSpeciesReferencePlugin.cpp
branches/libsbml-5/src/packages/layout/sbml/BoundingBox.h
branches/libsbml-5/src/packages/layout/sbml/CompartmentGlyph.h
branches/libsbml-5/src/packages/layout/sbml/CubicBezier.h
branches/libsbml-5/src/packages/layout/sbml/Curve.h
branches/libsbml-5/src/packages/layout/sbml/Dimensions.h
branches/libsbml-5/src/packages/layout/sbml/GraphicalObject.h
branches/libsbml-5/src/packages/layout/sbml/Layout.cpp
branches/libsbml-5/src/packages/layout/sbml/Layout.h
branches/libsbml-5/src/packages/layout/sbml/LineSegment.h
branches/libsbml-5/src/packages/layout/sbml/Point.h
branches/libsbml-5/src/packages/layout/sbml/ReactionGlyph.h
branches/libsbml-5/src/packages/layout/sbml/SpeciesGlyph.h
branches/libsbml-5/src/packages/layout/sbml/SpeciesReferenceGlyph.h
branches/libsbml-5/src/packages/layout/sbml/TextGlyph.h
branches/libsbml-5/src/sbml/SBMLReader.h
Modified: branches/libsbml-5/docs/src/libsbml-extension-support-classes.txt
===================================================================
--- branches/libsbml-5/docs/src/libsbml-extension-support-classes.txt 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/docs/src/libsbml-extension-support-classes.txt 2010-11-26 22:44:21 UTC (rev 12233)
@@ -110,13 +110,13 @@
in the derived class:
<ol>
- <li> <p>common static variables such as:</p>
+ <li> <p>common static functions such as:</p>
<ul>
- <li> <code>const std::string PackageName</code>, the name (label) of package
- <li> <code>const unsigned int DefaultLevel</code>, default level
- <li> <code>const unsigned int DefaultVersion</code>, default version,
- <li> <code>const unsigned int DefaultPackageVersion</code>, default package_version,
- <li> <code>const std::string XMLnsL3V1V1</code>, URI of package versions,
+ <li> <code>const std::string getPackageName()</code>, the name (label) of package
+ <li> <code>const unsigned int getDefaultLevel()</code>, default level
+ <li> <code>const unsigned int getDefaultVersion()</code>, default version,
+ <li> <code>const unsigned int getDefaultPackageVersion()</code>, default package_version,
+ <li> <code>const std::string getXMLnsL3V1V1()</code>, URI of package versions,
</ul>
</li>
Modified: branches/libsbml-5/src/bindings/swig/swigdoc.py
===================================================================
--- branches/libsbml-5/src/bindings/swig/swigdoc.py 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/bindings/swig/swigdoc.py 2010-11-26 22:44:21 UTC (rev 12233)
@@ -154,7 +154,11 @@
if stripped.startswith('#endif') and (stripped.find('SWIG') >= 0):
inSkip = False
if inSkip: continue
-
+ # HACK: swigdoc.py does not recognize initializations like:
+ # FunctionName(int value = staticFunctionCall()) this is used by the extensions
+ # and causes invalid documentation files to be written, thus i skip them for now
+ if (stripped.find('SBMLExtensionType') >= 0): continue
+
# Track things that we flag as internal, so that we can
# remove them from the documentation.
@@ -945,7 +949,7 @@
post = ''
output = pre + ' '
-
+
if classname:
output += classname + '::'
@@ -961,6 +965,7 @@
def generateFunctionDocString (language, methodname, docstring, args):
+
if language == 'java':
doc = rewriteDocstringForJava(docstring)
elif language == 'python':
Modified: branches/libsbml-5/src/extension/SBMLExtension.h
===================================================================
--- branches/libsbml-5/src/extension/SBMLExtension.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/extension/SBMLExtension.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -43,30 +43,47 @@
*
* <ol>
*
- * <li> Define the following static variables in the extended class:
+ * <li> Define the following static functions in the extended class:
* (examples of groups extension are shown respectively)
* <ol>
- * <li> <p>A string of package name (label) (The variable name must be "PackageName".)</p>
+ * <li> <p>A string of package name (label) (The function name must be "getPackageName".)</p>
*
@verbatim
- const std::string GroupsExtension::PackageName = "groups";
+ const std::string& GroupsExtension::getPackageName ()
+ {
+ static const std::string pkgName = "groups";
+ return pkgName;
+ }
@endverbatim
* </li>
*
* <li> <p>
- * A string of Default SBML level, version, and package version
- * (The variable name must be "DefaultLevel", "DefaultVersion", and
- * "DefaultPackageVersion" respectively.)
+ * Methods returning an integer of Default SBML level, version, and package version
+ * (The method names must be "getDefaultLevel()", "getDefaultVersion()", and
+ * "getDefaultPackageVersion()" respectively.)
* </p>
@verbatim
- const unsigne int GroupsExtension::DefaultLevel = 3;
- const unsigne int GroupsExtension::DefaultVersion = 1;
- const unsigne int GroupsExtension::DefaultPackageVersion = 1;
+ unsigned int GroupsExtension::getDefaultLevel()
+ {
+ return 3;
+ }
+ unsigned int GroupsExtension::getDefaultVersion()
+ {
+ return 1;
+ }
+ unsigned int GroupsExtension::getDefaultPackageVersion()
+ {
+ return 1;
+ }
@endverbatim
* </li>
- * <li> <p>Strings that represent the URI of packages </p>
+ * <li> <p> Methods returning Strings that represent the URI of packages </p>
@verbatim
- const std::string GroupsExtension::XmlnsL3V1V1 = "http://www.sbml.org/sbml/level3/version1/groups/version1";
+ const std::string& GroupsExtension::getXmlnsL3V1V1 ()
+ {
+ static const std::string xmlns = "http://www.sbml.org/sbml/level3/version1/groups/version1";
+ return xmlns;
+ }
@endverbatim
* </li>
* <li> <p>Strings that represent the other URI needed in this package (if any) </p>
@@ -90,13 +107,13 @@
const std::string&
GroupsExtension::getName() const
{
- return PackageName;
+ return getPackageName();
}
unsigned int
GroupsExtension::getLevel(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 3;
}
@@ -107,7 +124,7 @@
unsigned int
GroupsExtension::getVersion(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 1;
}
@@ -118,7 +135,7 @@
unsigned int
GroupsExtension::getPackageVersion(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 1;
}
@@ -135,7 +152,7 @@
{
if (pkgVersion == 1)
{
- return XmlnsL3V1V1;
+ return getXmlnsL3V1V1();
}
}
}
@@ -221,7 +238,7 @@
GroupsExtension::getSBMLExtensionNamespaces(const std::string &uri) const
{
GroupsPkgNamespaces* pkgns = 0;
- if ( uri == XmlnsL3V1V1)
+ if ( uri == getXmlnsL3V1V1())
{
pkgns = new GroupsPkgNamespaces(3,1,1);
}
@@ -288,7 +305,7 @@
@verbatim
void example (const SBase *sb)
{
- cons std::string pkgName = sb->getPackageName();
+ const std::string pkgName = sb->getPackageName();
if (pkgName == "core") {
switch (sb->getTypeCode()) {
case SBML_MODEL:
@@ -371,7 +388,7 @@
//
//-------------------------------------------------------------------------
- if (SBMLExtensionRegistry::getInstance().isRegistered(PackageName))
+ if (SBMLExtensionRegistry::getInstance().isRegistered(getPackageName()))
{
// do nothing;
return;
@@ -412,7 +429,7 @@
//---------------------------------------------------------------------------------------
std::vector<std::string> packageURIs;
- packageURIs.push_back(XmlnsL3V1V1);
+ packageURIs.push_back(getXmlnsL3V1V1());
SBaseExtensionPoint sbmldocExtPoint("core",SBML_DOCUMENT);
SBaseExtensionPoint modelExtPoint("core",SBML_MODEL);
@@ -506,23 +523,23 @@
//
// (NOTICE)
//
- // Package developers MUST define the following static variables
+ // Package developers MUST define the following static methods
// in the derived class:
//
- // (1) Strings that represent the URI of packages
- // (e.g., LayoutExtension::XmlnsL3V1 = "..."; )
+ // (1) Method returning Strings that represent the URI of packages
+ // (e.g., LayoutExtension::getXmlnsL3V1(); )
//
- // (2) A string of package name (label)
- // The variable name must be "PackageName".
- // (e.g. LayoutExtension::PackageName = "layout";)
+ // (2) A method returning a string of the package name (label)
+ // The method name must be "getPackageName()".
+ // (e.g. LayoutExtension::getPackageName();)
//
- // (3) A string of Default SBML level, version, and package version
- // The variable name must be "DefaultLevel", "DefaultVersion", and
- // "DefaultPackageVersion" respectively.
+ // (3) Methods returning integers of Default SBML level, version, and package version
+ // The method names must be "getDefaultLevel()", "getDefaultVersion()", and
+ // "getDefaultPackageVersion()" respectively.
//
- // (e.g. LayoutExtension::DefaultLevel = 3;
- // LayoutExtension::DefaultVersion = 1;
- // LayoutExtension::DefaultPackageVersion = 1; )
+ // (e.g. LayoutExtension::getDefaultLevel();
+ // LayoutExtension::getDefaultVersion();
+ // LayoutExtension::getDefaultPackageVersion(); )
//
// (NOTICE)
Modified: branches/libsbml-5/src/extension/SBMLExtensionNamespaces.h
===================================================================
--- branches/libsbml-5/src/extension/SBMLExtensionNamespaces.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/extension/SBMLExtensionNamespaces.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -57,16 +57,16 @@
* @param level the SBML level
* @param version the SBML version
* @param pkgVersion the package version
- * @param pkgPrefix the prefix of the package namespace (e.g. "layout", "multi")
+ * @param prefix the prefix of the package namespace (e.g. "layout", "multi")
* to be added. The package's name will be used if the given string is empty
* (default).
*/
- SBMLExtensionNamespaces(unsigned int level = SBMLExtensionType::DefaultLevel,
- unsigned int version = SBMLExtensionType::DefaultVersion,
- unsigned int pkgVersion = SBMLExtensionType::DefaultPackageVersion,
- const std::string& prefix = SBMLExtensionType::PackageName)
+ SBMLExtensionNamespaces(unsigned int level = SBMLExtensionType::getDefaultLevel(),
+ unsigned int version = SBMLExtensionType::getDefaultVersion(),
+ unsigned int pkgVersion = SBMLExtensionType::getDefaultPackageVersion(),
+ const std::string& prefix = SBMLExtensionType::getPackageName())
#ifndef SWIG
- : SBMLNamespaces(level, version, SBMLExtensionType::PackageName, pkgVersion, prefix)
+ : SBMLNamespaces(level, version, SBMLExtensionType::getPackageName(), pkgVersion, prefix)
,mPackageVersion(pkgVersion), mPackageName(prefix)
{}
#else
@@ -141,7 +141,7 @@
virtual std::string getURI() const
#ifndef SWIG
{
- const SBMLExtension *sbext = SBMLExtensionRegistry::getInstance().getExtension(SBMLExtensionType::PackageName);
+ const SBMLExtension *sbext = SBMLExtensionRegistry::getInstance().getExtension(SBMLExtensionType::getPackageName());
return sbext->getURI(mLevel,mVersion,mPackageVersion);
}
#else
Modified: branches/libsbml-5/src/extension/SBaseExtensionPoint.h
===================================================================
--- branches/libsbml-5/src/extension/SBaseExtensionPoint.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/extension/SBaseExtensionPoint.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -53,8 +53,8 @@
// std::vector object that contains a list of URI (package versions) supported
// by the plugin object.
std::vector<std::string> packageURIs;
- packageURIs.push_back(XmlnsL3V1V1);
- packageURIs.push_back(XmlnsL2);
+ packageURIs.push_back(getXmlnsL3V1V1());
+ packageURIs.push_back(getXmlnsL2());
// creates an extension point (model element of the "core" package)
SBaseExtensionPoint modelExtPoint("core",SBML_MODEL);
Modified: branches/libsbml-5/src/packages/groups/extension/GroupsExtension.cpp
===================================================================
--- branches/libsbml-5/src/packages/groups/extension/GroupsExtension.cpp 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/groups/extension/GroupsExtension.cpp 2010-11-26 22:44:21 UTC (rev 12233)
@@ -45,23 +45,42 @@
// The name of this package
-const std::string GroupsExtension::PackageName = "groups";
+const std::string& GroupsExtension::getPackageName ()
+{
+ static const std::string pkgName = "groups";
+ return pkgName;
+}
//
// Default SBML level, version, and package version
//
+unsigned int GroupsExtension::getDefaultLevel()
+{
+ return 3;
+}
-const unsigned int GroupsExtension::DefaultLevel = 3;
-const unsigned int GroupsExtension::DefaultVersion = 1;
-const unsigned int GroupsExtension::DefaultPackageVersion = 1;
+unsigned int GroupsExtension::getDefaultVersion()
+{
+ return 1;
+}
+unsigned int GroupsExtension::getDefaultPackageVersion()
+{
+ return 1;
+}
+
//
// XML namespaces of (1) package versions of groups extension, and
// (2) another XML namespace(XMLSchema-instance) required in the groups
// extension.
//
-const std::string GroupsExtension::XmlnsL3V1V1 = "http://www.sbml.org/sbml/level3/version1/groups/version1";
+const std::string& GroupsExtension::getXmlnsL3V1V1 ()
+{
+ static const std::string xmlns = "http://www.sbml.org/sbml/level3/version1/groups/version1";
+ return xmlns;
+}
+
//
// Adds this GroupsExtension object to the SBMLExtensionRegistry class.
// GroupsExtension::init() function is automatically invoked when this
@@ -137,7 +156,7 @@
const std::string&
GroupsExtension::getName() const
{
- return PackageName;
+ return getPackageName();
}
@@ -157,7 +176,7 @@
{
if (pkgVersion == 1)
{
- return XmlnsL3V1V1;
+ return getXmlnsL3V1V1();
}
}
}
@@ -177,7 +196,7 @@
unsigned int
GroupsExtension::getLevel(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 3;
}
@@ -195,7 +214,7 @@
unsigned int
GroupsExtension::getVersion(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 1;
}
@@ -213,7 +232,7 @@
unsigned int
GroupsExtension::getPackageVersion(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 1;
}
@@ -235,7 +254,7 @@
GroupsExtension::getSBMLExtensionNamespaces(const std::string &uri) const
{
GroupsPkgNamespaces* pkgns = 0;
- if ( uri == XmlnsL3V1V1)
+ if ( uri == getXmlnsL3V1V1())
{
pkgns = new GroupsPkgNamespaces(3,1,1);
}
@@ -277,7 +296,7 @@
//
//-------------------------------------------------------------------------
- if (SBMLExtensionRegistry::getInstance().isRegistered(PackageName))
+ if (SBMLExtensionRegistry::getInstance().isRegistered(getPackageName()))
{
// do nothing;
return;
@@ -318,7 +337,7 @@
//---------------------------------------------------------------------------------------
std::vector<std::string> packageURIs;
- packageURIs.push_back(XmlnsL3V1V1);
+ packageURIs.push_back(getXmlnsL3V1V1());
SBaseExtensionPoint sbmldocExtPoint("core",SBML_DOCUMENT);
SBaseExtensionPoint modelExtPoint("core",SBML_MODEL);
Modified: branches/libsbml-5/src/packages/groups/extension/GroupsExtension.h
===================================================================
--- branches/libsbml-5/src/packages/groups/extension/GroupsExtension.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/groups/extension/GroupsExtension.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -42,27 +42,35 @@
//---------------------------------------------------------------
//
- // Required class variables
+ // Required class methods
//
//---------------------------------------------------------------
- //
- // Package name
- //
- static const std::string PackageName;
+ /**
+ * Returns the package name of this extension.
+ */
+ static const std::string& getPackageName ();
- //
- // Default SBML Level, SBML Version, and package version
- //
- static const unsigned int DefaultLevel;
- static const unsigned int DefaultVersion;
- static const unsigned int DefaultPackageVersion;
+ /**
+ * Returns the default SBML Level this extension.
+ */
+ static unsigned int getDefaultLevel();
- //
- // URI of supported versions of this package.
- //
- static const std::string XmlnsL3V1V1;
+ /**
+ * Returns the default SBML Version this extension.
+ */
+ static unsigned int getDefaultVersion();
+ /**
+ * Returns the default SBML version this extension.
+ */
+ static unsigned int getDefaultPackageVersion();
+
+ /**
+ * Returns URI of supported versions of this package.
+ */
+ static const std::string& getXmlnsL3V1V1();
+
//
// Other URI needed in this package (if any)
//
Modified: branches/libsbml-5/src/packages/groups/sbml/Group.cpp
===================================================================
--- branches/libsbml-5/src/packages/groups/sbml/Group.cpp 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/groups/sbml/Group.cpp 2010-11-26 22:44:21 UTC (rev 12233)
@@ -728,9 +728,9 @@
if (prefix.empty())
{
- if (getNamespaces()->hasURI(GroupsExtension::XmlnsL3V1V1))
+ if (getNamespaces()->hasURI(GroupsExtension::getXmlnsL3V1V1()))
{
- xmlns.add(GroupsExtension::XmlnsL3V1V1,prefix);
+ xmlns.add(GroupsExtension::getXmlnsL3V1V1(),prefix);
}
}
Modified: branches/libsbml-5/src/packages/groups/sbml/Group.h
===================================================================
--- branches/libsbml-5/src/packages/groups/sbml/Group.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/groups/sbml/Group.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -54,9 +54,9 @@
/**
* Creates a new Group with the given level, version, and package version.
*/
- Group(unsigned int level = GroupsExtension::DefaultLevel,
- unsigned int version = GroupsExtension::DefaultVersion,
- unsigned int pkgVersion = GroupsExtension::DefaultPackageVersion);
+ Group(unsigned int level = GroupsExtension::getDefaultLevel(),
+ unsigned int version = GroupsExtension::getDefaultVersion(),
+ unsigned int pkgVersion = GroupsExtension::getDefaultPackageVersion());
/**
@@ -441,9 +441,9 @@
/**
* Creates a new ListOfGroups with the given level, version, and package version.
*/
- ListOfGroups(unsigned int level = GroupsExtension::DefaultLevel,
- unsigned int version = GroupsExtension::DefaultVersion,
- unsigned int pkgVersion = GroupsExtension::DefaultPackageVersion);
+ ListOfGroups(unsigned int level = GroupsExtension::getDefaultLevel(),
+ unsigned int version = GroupsExtension::getDefaultVersion(),
+ unsigned int pkgVersion = GroupsExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/groups/sbml/Member.h
===================================================================
--- branches/libsbml-5/src/packages/groups/sbml/Member.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/groups/sbml/Member.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -50,9 +50,9 @@
/**
* Creates a new Member with the given level, version, and package version.
*/
- Member(unsigned int level = GroupsExtension::DefaultLevel,
- unsigned int version = GroupsExtension::DefaultVersion,
- unsigned int pkgVersion = GroupsExtension::DefaultPackageVersion);
+ Member(unsigned int level = GroupsExtension::getDefaultLevel(),
+ unsigned int version = GroupsExtension::getDefaultVersion(),
+ unsigned int pkgVersion = GroupsExtension::getDefaultPackageVersion());
/**
@@ -227,9 +227,9 @@
/**
* Creates a new ListOfMembers with the given level, version, and package version.
*/
- ListOfMembers(unsigned int level = GroupsExtension::DefaultLevel,
- unsigned int version = GroupsExtension::DefaultVersion,
- unsigned int pkgVersion = GroupsExtension::DefaultPackageVersion);
+ ListOfMembers(unsigned int level = GroupsExtension::getDefaultLevel(),
+ unsigned int version = GroupsExtension::getDefaultVersion(),
+ unsigned int pkgVersion = GroupsExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/extension/LayoutExtension.cpp
===================================================================
--- branches/libsbml-5/src/packages/layout/extension/LayoutExtension.cpp 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/extension/LayoutExtension.cpp 2010-11-26 22:44:21 UTC (rev 12233)
@@ -47,25 +47,54 @@
// The name of this package
-const std::string LayoutExtension::PackageName = "layout";
+const std::string& LayoutExtension::getPackageName ()
+{
+ static const std::string pkgName = "layout";
+ return pkgName;
+}
//
// Default SBML level, version, and package version
//
+unsigned int LayoutExtension::getDefaultLevel()
+{
+ return 3;
+}
-const unsigned int LayoutExtension::DefaultLevel = 3;
-const unsigned int LayoutExtension::DefaultVersion = 1;
-const unsigned int LayoutExtension::DefaultPackageVersion = 1;
+unsigned int LayoutExtension::getDefaultVersion()
+{
+ return 1;
+}
+unsigned int LayoutExtension::getDefaultPackageVersion()
+{
+ return 1;
+}
+
//
// XML namespaces of (1) package versions of layout extension, and
// (2) another XML namespace(XMLSchema-instance) required in the layout
// extension.
//
-const std::string LayoutExtension::XmlnsL2 = "http://projects.eml.org/bcb/sbml/level2";
-const std::string LayoutExtension::XmlnsL3V1V1 = "http://www.sbml.org/sbml/level3/version1/layout/version1";
-const std::string LayoutExtension::XmlnsXSI = "http://www.w3.org/2001/XMLSchema-instance";
+const std::string& LayoutExtension::getXmlnsL3V1V1 ()
+{
+ static const std::string xmlns = "http://www.sbml.org/sbml/level3/version1/layout/version1";
+ return xmlns;
+}
+
+const std::string& LayoutExtension::getXmlnsL2 ()
+{
+ static const std::string xmlns = "http://projects.eml.org/bcb/sbml/level2";
+ return xmlns;
+}
+
+const std::string& LayoutExtension::getXmlnsXSI ()
+{
+ static const std::string xmlns = "http://www.w3.org/2001/XMLSchema-instance";
+ return xmlns;
+}
+
//
// Adds this LayoutExtension object to the SBMLExtensionRegistry class.
// LayoutExtension::init() function is automatically invoked when this
@@ -152,7 +181,7 @@
const std::string&
LayoutExtension::getName() const
{
- return PackageName;
+ return getPackageName();
}
@@ -172,13 +201,13 @@
{
if (pkgVersion == 1)
{
- return XmlnsL3V1V1;
+ return getXmlnsL3V1V1();
}
}
}
else if (sbmlLevel == 2)
{
- return XmlnsL2;
+ return getXmlnsL2();
}
static std::string empty = "";
@@ -193,11 +222,11 @@
unsigned int
LayoutExtension::getLevel(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 3;
}
- else if (uri == XmlnsL2)
+ else if (uri == getXmlnsL2())
{
return 2;
}
@@ -212,11 +241,11 @@
unsigned int
LayoutExtension::getVersion(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 1;
}
- else if (uri == XmlnsL2)
+ else if (uri == getXmlnsL2())
{
//
// (NOTE) This may cause unexpected behaviour.
@@ -234,11 +263,11 @@
unsigned int
LayoutExtension::getPackageVersion(const std::string &uri) const
{
- if (uri == XmlnsL3V1V1)
+ if (uri == getXmlnsL3V1V1())
{
return 1;
}
- else if (uri == XmlnsL2)
+ else if (uri == getXmlnsL2())
{
//
// (NOTE) This should be harmless but may cause some problem.
@@ -260,11 +289,11 @@
LayoutExtension::getSBMLExtensionNamespaces(const std::string &uri) const
{
LayoutPkgNamespaces* pkgns = 0;
- if ( uri == XmlnsL3V1V1)
+ if ( uri == getXmlnsL3V1V1())
{
pkgns = new LayoutPkgNamespaces(3,1,1);
}
- else if ( uri == XmlnsL2)
+ else if ( uri == getXmlnsL2())
{
//
// (NOTE) This should be harmless but may cause some problem.
@@ -309,7 +338,7 @@
//
//-------------------------------------------------------------------------
- if (SBMLExtensionRegistry::getInstance().isRegistered(PackageName))
+ if (SBMLExtensionRegistry::getInstance().isRegistered(getPackageName()))
{
// do nothing;
return;
@@ -346,14 +375,14 @@
//---------------------------------------------------------------------------------------
std::vector<std::string> packageURIs;
- packageURIs.push_back(XmlnsL3V1V1);
- packageURIs.push_back(XmlnsL2);
+ packageURIs.push_back(getXmlnsL3V1V1());
+ packageURIs.push_back(getXmlnsL2());
//
// LayoutSpeciesReferencePlugin is used only for SBML Level 2
//
std::vector<std::string> L2packageURI;
- L2packageURI.push_back(XmlnsL2);
+ L2packageURI.push_back(getXmlnsL2());
SBaseExtensionPoint sbmldocExtPoint("core",SBML_DOCUMENT);
SBaseExtensionPoint modelExtPoint("core",SBML_MODEL);
Modified: branches/libsbml-5/src/packages/layout/extension/LayoutExtension.h
===================================================================
--- branches/libsbml-5/src/packages/layout/extension/LayoutExtension.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/extension/LayoutExtension.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -40,32 +40,41 @@
//---------------------------------------------------------------
//
- // Required class variables
+ // Required class methods
//
//---------------------------------------------------------------
- //
- // Package name
- //
- static const std::string PackageName;
+ /**
+ * Returns the package name of this extension.
+ */
+ static const std::string& getPackageName ();
- //
- // Default SBML Level, SBML Version, and package version
- //
- static const unsigned int DefaultLevel;
- static const unsigned int DefaultVersion;
- static const unsigned int DefaultPackageVersion;
+ /**
+ * Returns the default SBML Level this extension.
+ */
+ static unsigned int getDefaultLevel();
- //
- // URI of supported versions of this package.
- //
- static const std::string XmlnsL2;
- static const std::string XmlnsL3V1V1;
+ /**
+ * Returns the default SBML Version this extension.
+ */
+ static unsigned int getDefaultVersion();
+ /**
+ * Returns the default SBML version this extension.
+ */
+ static unsigned int getDefaultPackageVersion();
+
+ /**
+ * Returns URI of supported versions of this package.
+ */
+ static const std::string& getXmlnsL3V1V1();
+
+ static const std::string& getXmlnsL2();
+
//
// Other URI needed in this package (if any)
//
- static const std::string XmlnsXSI;
+ static const std::string& getXmlnsXSI();
//---------------------------------------------------------------
Modified: branches/libsbml-5/src/packages/layout/extension/LayoutModelPlugin.cpp
===================================================================
--- branches/libsbml-5/src/packages/layout/extension/LayoutModelPlugin.cpp 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/extension/LayoutModelPlugin.cpp 2010-11-26 22:44:21 UTC (rev 12233)
@@ -133,7 +133,7 @@
//
// This function is used only for SBML Level 2.
//
- if ( getURI() != LayoutExtension::XmlnsL2 ) return false;
+ if ( getURI() != LayoutExtension::getXmlnsL2() ) return false;
XMLNode *pAnnotation = parentObject->getAnnotation();
@@ -217,7 +217,7 @@
//
// This function is used only for SBML Level 2.
//
- if ( getURI() != LayoutExtension::XmlnsL2 ) return;
+ if ( getURI() != LayoutExtension::getXmlnsL2() ) return;
Model *parent = static_cast<Model*>(const_cast<SBase*>(getParentSBMLObject()));
if (!parent) return;
@@ -240,7 +240,7 @@
//
// This function is not used for SBML Level 2.
//
- if ( getURI() == LayoutExtension::XmlnsL2 ) return;
+ if ( getURI() == LayoutExtension::getXmlnsL2() ) return;
if (mLayouts.size() > 0)
{
Modified: branches/libsbml-5/src/packages/layout/extension/LayoutSpeciesReferencePlugin.cpp
===================================================================
--- branches/libsbml-5/src/packages/layout/extension/LayoutSpeciesReferencePlugin.cpp 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/extension/LayoutSpeciesReferencePlugin.cpp 2010-11-26 22:44:21 UTC (rev 12233)
@@ -100,7 +100,7 @@
//
// This plugin object is used only for SBML Level 2 Version 1.
//
- if ( getURI() != LayoutExtension::XmlnsL2 ) return false;
+ if ( getURI() != LayoutExtension::getXmlnsL2() ) return false;
if ( parentObject->getVersion() > 1 ) return false;
XMLNode *pAnnotation = parentObject->getAnnotation();
@@ -199,7 +199,7 @@
//
// This plugin object is used only for SBML Level 2 Version 1.
//
- if ( getURI() != LayoutExtension::XmlnsL2 ) return;
+ if ( getURI() != LayoutExtension::getXmlnsL2() ) return;
if ( parent->getVersion() > 1 ) return;
XMLNode *annt = parseLayoutId(parent);
Modified: branches/libsbml-5/src/packages/layout/sbml/BoundingBox.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/BoundingBox.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/BoundingBox.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -85,9 +85,9 @@
* the id to an empty string.
*/
- BoundingBox (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ BoundingBox (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/CompartmentGlyph.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/CompartmentGlyph.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/CompartmentGlyph.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -80,9 +80,9 @@
* associated compartment id are unset.
*/
- CompartmentGlyph (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ CompartmentGlyph (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
* Ctor.
Modified: branches/libsbml-5/src/packages/layout/sbml/CubicBezier.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/CubicBezier.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/CubicBezier.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -81,9 +81,9 @@
* Creates a CubicBezier and returns the pointer.
*/
- CubicBezier (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ CubicBezier (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/Curve.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/Curve.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/Curve.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -82,9 +82,9 @@
/**
* Ctor.
*/
- ListOfLineSegments(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfLineSegments(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
* Ctor.
@@ -169,9 +169,9 @@
* Creates a curve with an empty list of segments.
*/
- Curve (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ Curve (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/Dimensions.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/Dimensions.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/Dimensions.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -79,9 +79,9 @@
* Creates a new Dimensions object with the given level, version, and package version
* and with all sizes set to 0.0.
*/
- Dimensions(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ Dimensions(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/GraphicalObject.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/GraphicalObject.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/GraphicalObject.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -83,9 +83,9 @@
* Creates a new GraphicalObject.
*/
- GraphicalObject (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ GraphicalObject (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/Layout.cpp
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/Layout.cpp 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/Layout.cpp 2010-11-26 22:44:21 UTC (rev 12233)
@@ -1645,15 +1645,15 @@
ListOfLayouts::writeXMLNS (XMLOutputStream& stream) const
{
XMLNamespaces xmlns;
- xmlns.add(LayoutExtension::XmlnsXSI, "xsi");
+ xmlns.add(LayoutExtension::getXmlnsXSI(), "xsi");
std::string prefix = getPrefix();
if (prefix.empty())
{
- if (getNamespaces()->hasURI(LayoutExtension::XmlnsL3V1V1))
+ if (getNamespaces()->hasURI(LayoutExtension::getXmlnsL3V1V1()))
{
- xmlns.add(LayoutExtension::XmlnsL3V1V1,prefix);
+ xmlns.add(LayoutExtension::getXmlnsL3V1V1(),prefix);
}
}
Modified: branches/libsbml-5/src/packages/layout/sbml/Layout.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/Layout.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/Layout.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -89,9 +89,9 @@
/**
* Ctor.
*/
- ListOfCompartmentGlyphs(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfCompartmentGlyphs(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
@@ -226,9 +226,9 @@
/**
* Ctor.
*/
- ListOfSpeciesGlyphs(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfSpeciesGlyphs(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
@@ -362,9 +362,9 @@
/**
* Ctor.
*/
- ListOfReactionGlyphs(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfReactionGlyphs(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
@@ -498,9 +498,9 @@
/**
* Ctor.
*/
- ListOfTextGlyphs(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfTextGlyphs(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
@@ -634,9 +634,9 @@
/**
* Ctor.
*/
- ListOfGraphicalObjects(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfGraphicalObjects(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
@@ -788,9 +788,9 @@
/**
* Creates a new Layout with the given level, version, and package version.
*/
- Layout(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ Layout(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
@@ -1466,9 +1466,9 @@
/**
* Ctor.
*/
- ListOfLayouts(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfLayouts(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/LineSegment.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/LineSegment.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/LineSegment.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -82,9 +82,9 @@
* Creates a line segment with the given SBML level, version, and package version
* and both points set to (0.0,0.0,0.0)
*/
- LineSegment (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ LineSegment (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
* Creates a line segment with the LayoutPkgNamespaces and both points set to (0.0,0.0,0.0)
Modified: branches/libsbml-5/src/packages/layout/sbml/Point.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/Point.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/Point.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -78,9 +78,9 @@
* Creates a new point with x,y and z set to 0.0.
*/
- Point (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ Point (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
* Ctor.
Modified: branches/libsbml-5/src/packages/layout/sbml/ReactionGlyph.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/ReactionGlyph.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/ReactionGlyph.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -82,9 +82,9 @@
/**
* Ctor.
*/
- ListOfSpeciesReferenceGlyphs(unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ListOfSpeciesReferenceGlyphs(unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
* Ctor.
@@ -223,9 +223,9 @@
* string.
*/
- ReactionGlyph (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ ReactionGlyph (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/SpeciesGlyph.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/SpeciesGlyph.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/SpeciesGlyph.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -81,9 +81,9 @@
* and the id of the associated species set to the empty string.
*/
- SpeciesGlyph (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ SpeciesGlyph (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
* Ctor.
Modified: branches/libsbml-5/src/packages/layout/sbml/SpeciesReferenceGlyph.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/SpeciesReferenceGlyph.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/SpeciesReferenceGlyph.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -91,9 +91,9 @@
* empty string. The role is set to SPECIES_ROLE_UNDEFINED.
*/
- SpeciesReferenceGlyph (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ SpeciesReferenceGlyph (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/packages/layout/sbml/TextGlyph.h
===================================================================
--- branches/libsbml-5/src/packages/layout/sbml/TextGlyph.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/packages/layout/sbml/TextGlyph.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -84,9 +84,9 @@
* to the empty string as well.
*/
- TextGlyph (unsigned int level = LayoutExtension::DefaultLevel,
- unsigned int version = LayoutExtension::DefaultVersion,
- unsigned int pkgVersion = LayoutExtension::DefaultPackageVersion);
+ TextGlyph (unsigned int level = LayoutExtension::getDefaultLevel(),
+ unsigned int version = LayoutExtension::getDefaultVersion(),
+ unsigned int pkgVersion = LayoutExtension::getDefaultPackageVersion());
/**
Modified: branches/libsbml-5/src/sbml/SBMLReader.h
===================================================================
--- branches/libsbml-5/src/sbml/SBMLReader.h 2010-11-26 18:57:09 UTC (rev 12232)
+++ branches/libsbml-5/src/sbml/SBMLReader.h 2010-11-26 22:44:21 UTC (rev 12233)
@@ -255,7 +255,7 @@
* appear first. The error code (a value drawn from the enumeration
* #XMLErrorCode_t) can provide a clue about what happened. For example,
* a file might be unreadable (either because it does not actually exist
- * or because the user does not have the necessary access priviledges to
+ * or because the user does not have the necessary access privileges to
* read it) or some sort of file operation error may have been reported
* by the underlying operating system. Callers can check for these
* situations using a program fragment such as the following:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 18:57:16
|
Revision: 12232
http://sbml.svn.sourceforge.net/sbml/?rev=12232&view=rev
Author: fbergmann
Date: 2010-11-26 18:57:09 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
- always create separate dynamic and static library
- language bindings link against static library (this works around a limitation in the extension mechanism for now)
Modified Paths:
--------------
branches/libsbml-5/CMakeLists.txt
branches/libsbml-5/src/CMakeLists.txt
branches/libsbml-5/src/bindings/csharp/CMakeLists.txt
branches/libsbml-5/src/bindings/java/CMakeLists.txt
branches/libsbml-5/src/bindings/perl/CMakeLists.txt
branches/libsbml-5/src/bindings/python/CMakeLists.txt
branches/libsbml-5/src/bindings/ruby/CMakeLists.txt
Modified: branches/libsbml-5/CMakeLists.txt
===================================================================
--- branches/libsbml-5/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -66,7 +66,7 @@
#
# build static / shared library
-option(BUILD_SHARED_LIBS "Build shared library (Set to OFF to build static libraries)" OFF)
+# option(BUILD_SHARED_LIBS "Build shared library (Set to OFF to build static libraries)" OFF)
# should we compile examples
Modified: branches/libsbml-5/src/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/src/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -190,8 +190,7 @@
#
# Build library
#
-message("Build libsbml")
-add_library (${LIBSBML_LIBRARY} ${LIBSBML_SOURCES} )
+add_library (${LIBSBML_LIBRARY} SHARED ${LIBSBML_SOURCES} )
target_link_libraries(${LIBSBML_LIBRARY} ${LIBSBML_LIBS})
INSTALL(TARGETS ${LIBSBML_LIBRARY}
@@ -200,6 +199,15 @@
ARCHIVE DESTINATION lib
)
+add_library (${LIBSBML_LIBRARY}-static STATIC ${LIBSBML_SOURCES} )
+target_link_libraries(${LIBSBML_LIBRARY}-static ${LIBSBML_LIBS})
+
+INSTALL(TARGETS ${LIBSBML_LIBRARY}-static
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+
####################################################################
#
@@ -207,19 +215,19 @@
#
if(WITH_CHECK)
-# no support for testing C/C++ files on windows right now
-# TODO: ensure that tests compile on windows
-if(UNIX)
-add_subdirectory(annotation/test)
-add_subdirectory(math/test)
-add_subdirectory(sbml/test)
-add_subdirectory(units/test)
-add_subdirectory(util/test)
-add_subdirectory(validator/test)
-add_subdirectory(xml/test)
-else()
-add_subdirectory(math/test)
-endif()
+ # no support for testing C/C++ files on windows right now
+ # TODO: ensure that tests compile on windows
+ if(UNIX)
+ add_subdirectory(annotation/test)
+ add_subdirectory(math/test)
+ add_subdirectory(sbml/test)
+ add_subdirectory(units/test)
+ add_subdirectory(util/test)
+ add_subdirectory(validator/test)
+ add_subdirectory(xml/test)
+ else()
+ add_subdirectory(math/test)
+ endif()
endif()
Modified: branches/libsbml-5/src/bindings/csharp/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/csharp/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/src/bindings/csharp/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -99,7 +99,7 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../swig)
include_directories(${CMAKE_SOURCE_DIR}/include)
add_library(${LIBSBML_CS_LIBRARY} SHARED libsbml_wrap.cpp)
-target_link_libraries(${LIBSBML_CS_LIBRARY} ${LIBSBML_LIBRARY})
+target_link_libraries(${LIBSBML_CS_LIBRARY} ${LIBSBML_LIBRARY}-static)
INSTALL(TARGETS ${LIBSBML_CS_LIBRARY}
RUNTIME DESTINATION bindings/csharp
LIBRARY DESTINATION bindings/csharp
Modified: branches/libsbml-5/src/bindings/java/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/java/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/src/bindings/java/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -100,7 +100,7 @@
ARCHIVE DESTINATION bindings/java
)
-target_link_libraries(sbmlj ${LIBSBML_LIBRARY} ${JNI_LIBRARIES})
+target_link_libraries(sbmlj ${LIBSBML_LIBRARY}-static ${JNI_LIBRARIES})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/java-files/org/sbml/libsbml/libsbml.class
Modified: branches/libsbml-5/src/bindings/perl/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/perl/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/src/bindings/perl/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -110,7 +110,7 @@
add_library(${LIBSBML_PERL_LIBRARY} SHARED LibSBML.cpp)
set_target_properties(${LIBSBML_PERL_LIBRARY}
PROPERTIES OUTPUT_NAME LibSBML)
-target_link_libraries(${LIBSBML_PERL_LIBRARY} ${LIBSBML_LIBRARY} ${PERL_LIBRARY})
+target_link_libraries(${LIBSBML_PERL_LIBRARY} ${LIBSBML_LIBRARY}-static ${PERL_LIBRARY})
INSTALL(TARGETS ${LIBSBML_PERL_LIBRARY}
RUNTIME DESTINATION bindings/perl
LIBRARY DESTINATION bindings/perl
Modified: branches/libsbml-5/src/bindings/python/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/python/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/src/bindings/python/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -97,7 +97,7 @@
set(LIBSBML_PYTHON_LIBRARY _libsbml)
add_library(${LIBSBML_PYTHON_LIBRARY} SHARED libsbml_wrap.cpp)
-target_link_libraries(${LIBSBML_PYTHON_LIBRARY} ${LIBSBML_LIBRARY} ${PYTHON_LIBRARIES})
+target_link_libraries(${LIBSBML_PYTHON_LIBRARY} ${LIBSBML_LIBRARY}-static ${PYTHON_LIBRARIES})
INSTALL(TARGETS ${LIBSBML_PERL_LIBRARY}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
Modified: branches/libsbml-5/src/bindings/ruby/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/ruby/CMakeLists.txt 2010-11-26 18:08:37 UTC (rev 12231)
+++ branches/libsbml-5/src/bindings/ruby/CMakeLists.txt 2010-11-26 18:57:09 UTC (rev 12232)
@@ -89,7 +89,7 @@
set(LIBSBML_RUBY_LIBRARY libsbmlrb)
add_library(${LIBSBML_RUBY_LIBRARY} SHARED libsbml_wrap.cpp)
-target_link_libraries(${LIBSBML_RUBY_LIBRARY} ${LIBSBML_LIBRARY} ${RUBY_LIBRARY})
+target_link_libraries(${LIBSBML_RUBY_LIBRARY} ${LIBSBML_LIBRARY}-static ${RUBY_LIBRARY})
INSTALL(TARGETS ${LIBSBML_PERL_LIBRARY}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 18:08:44
|
Revision: 12231
http://sbml.svn.sourceforge.net/sbml/?rev=12231&view=rev
Author: fbergmann
Date: 2010-11-26 18:08:37 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
- now make dist is working
Modified Paths:
--------------
trunk/libsbml/src/bindings/matlab/test/Makefile.in
Modified: trunk/libsbml/src/bindings/matlab/test/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/matlab/test/Makefile.in 2010-11-26 18:04:09 UTC (rev 12230)
+++ trunk/libsbml/src/bindings/matlab/test/Makefile.in 2010-11-26 18:08:37 UTC (rev 12231)
@@ -70,8 +70,7 @@
testReadFromFile14.m \
testReadFlags.m \
compareFiles.m \
- testOutput.m
-
+ testOutput.m \
$(test_data_files)
# `extra_clean' and `extra_distclean' determine the files and directories
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 18:04:16
|
Revision: 12230
http://sbml.svn.sourceforge.net/sbml/?rev=12230&view=rev
Author: fbergmann
Date: 2010-11-26 18:04:09 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
- OutputSBML will now also be compiled by the make file
Modified Paths:
--------------
trunk/libsbml/src/bindings/matlab/Makefile.in
Modified: trunk/libsbml/src/bindings/matlab/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/matlab/Makefile.in 2010-11-26 17:12:13 UTC (rev 12229)
+++ trunk/libsbml/src/bindings/matlab/Makefile.in 2010-11-26 18:04:09 UTC (rev 12230)
@@ -40,15 +40,14 @@
srcdir = @srcdir@
thisdir = src/bindings/matlab
-translate_sources = TranslateSBML.c
-output_sources = OutputSBML.c
+sources = TranslateSBML.c \
+ OutputSBML.c
# This use of $(libraries) is slightly inconsistent with the other makefiles,
# but for Matlab, these object files act a lot like dynamic libraries and
# we're installing them in the same place as the other libraries, so....
-translate_libraries = $(translate_sources:.c=.$(MEXEXT))
-output_libraries = $(output_sources:.c=.$(MEXEXT))
+libraries = $(sources:.c=.$(MEXEXT))
subdirs = test
@@ -90,7 +89,7 @@
# Primary build actions
# -----------------------------------------------------------------------------
-all: Makefile $(translate_libraries) $(output_libraries)
+all: Makefile $(libraries)
flags = $(MEX_FLAGS) $(MATLAB_CPPFLAGS) -I../.. -I../../../include -L../..
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 17:12:19
|
Revision: 12229
http://sbml.svn.sourceforge.net/sbml/?rev=12229&view=rev
Author: fbergmann
Date: 2010-11-26 17:12:13 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
- also compile OutputSBML
Modified Paths:
--------------
trunk/libsbml/src/bindings/matlab/Makefile.in
Modified: trunk/libsbml/src/bindings/matlab/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/matlab/Makefile.in 2010-11-26 14:15:31 UTC (rev 12228)
+++ trunk/libsbml/src/bindings/matlab/Makefile.in 2010-11-26 17:12:13 UTC (rev 12229)
@@ -40,13 +40,15 @@
srcdir = @srcdir@
thisdir = src/bindings/matlab
-sources = TranslateSBML.c
+translate_sources = TranslateSBML.c
+output_sources = OutputSBML.c
# This use of $(libraries) is slightly inconsistent with the other makefiles,
# but for Matlab, these object files act a lot like dynamic libraries and
# we're installing them in the same place as the other libraries, so....
-libraries = $(sources:.c=.$(MEXEXT))
+translate_libraries = $(translate_sources:.c=.$(MEXEXT))
+output_libraries = $(output_sources:.c=.$(MEXEXT))
subdirs = test
@@ -88,7 +90,7 @@
# Primary build actions
# -----------------------------------------------------------------------------
-all: Makefile $(libraries)
+all: Makefile $(translate_libraries) $(output_libraries)
flags = $(MEX_FLAGS) $(MATLAB_CPPFLAGS) -I../.. -I../../../include -L../..
@@ -127,7 +129,6 @@
ARCH=$(MEX_ARCH) Arch=$(MEX_ARCH) -f ./$(mexopts_file) \
-o $@ $^ $(flags) ../../libsbml.la $(MATLAB_LIBS)
cp -f .libs/$@ .
-
# -----------------------------------------------------------------------------
# Tags.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-26 14:15:37
|
Revision: 12228
http://sbml.svn.sourceforge.net/sbml/?rev=12228&view=rev
Author: sarahkeating
Date: 2010-11-26 14:15:31 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
added new output function to make files
Modified Paths:
--------------
trunk/libsbml/src/bindings/matlab/Makefile.in
trunk/libsbml/src/bindings/matlab/install_Win32.m
trunk/libsbml/src/bindings/matlab/install_Win64.m
trunk/libsbml/src/bindings/matlab/test/Makefile.in
Modified: trunk/libsbml/src/bindings/matlab/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/matlab/Makefile.in 2010-11-26 14:01:14 UTC (rev 12227)
+++ trunk/libsbml/src/bindings/matlab/Makefile.in 2010-11-26 14:15:31 UTC (rev 12228)
@@ -40,7 +40,7 @@
srcdir = @srcdir@
thisdir = src/bindings/matlab
-sources = TranslateSBML.c
+sources = TranslateSBML.c
# This use of $(libraries) is slightly inconsistent with the other makefiles,
# but for Matlab, these object files act a lot like dynamic libraries and
@@ -58,10 +58,14 @@
AUTHORS.txt \
CheckAndConvert.m \
Contents.m \
+ ConvertFormulaToMathML.m \
+ isSBML_Model.m \
Makefile.in \
README.txt \
TranslateSBML.c \
TranslateSBML.m \
+ OutputSBML.c \
+ OutputSBML.m \
buildWin.m \
install_Win32.m \
install_Win64.m \
@@ -148,11 +152,11 @@
# Installation.
# -----------------------------------------------------------------------------
-install: all install-libraries install-checkandconvert install-isoctave
+install: all install-libraries install-checkandconvert install-isoctave install-issbmlmodel install-convertformula
installdirs: all
-uninstall: uninstall-libraries uninstall-checkandconvert uninstall-isoctave
+uninstall: uninstall-libraries uninstall-checkandconvert uninstall-isoctave uninstall-issbmlmodel uninstall-convertformula
install-checkandconvert:
$(INSTALL_SH) -m 644 CheckAndConvert.m "$(DESTDIR)$(LIBDIR)"
@@ -174,6 +178,27 @@
rm $$target; \
fi;
+install-issbmlmodel:
+ $(INSTALL_SH) -m 644 isSBML_Model.m "$(DESTDIR)$(LIBDIR)"
+
+uninstall-issbmlmodel:
+ @target="$(DESTDIR)$(LIBDIR)/isSBML_Model.m"; \
+ if test -f $$target ; then \
+ echo rm $$target; \
+ rm $$target; \
+ fi;
+
+install-convertformula:
+ $(INSTALL_SH) -m 644 ConvertFormulaToMathML.m "$(DESTDIR)$(LIBDIR)"
+
+uninstall-convertformula:
+ @target="$(DESTDIR)$(LIBDIR)/ConvertFormulaToMathML.m"; \
+ if test -f $$target ; then \
+ echo rm $$target; \
+ rm $$target; \
+ fi;
+
+
# -----------------------------------------------------------------------------
# Creating distribution (for libSBML maintainers only)
Modified: trunk/libsbml/src/bindings/matlab/install_Win32.m
===================================================================
--- trunk/libsbml/src/bindings/matlab/install_Win32.m 2010-11-26 14:01:14 UTC (rev 12227)
+++ trunk/libsbml/src/bindings/matlab/install_Win32.m 2010-11-26 14:15:31 UTC (rev 12228)
@@ -61,10 +61,6 @@
% path and save
addpath(pwd);
-% add the path for validating the structure
-valid_path = strcat(pwd, '\validate_MATLAB_SBML_Structures');
-addpath(valid_path);
-
% path2rc is deprecated by version 7.0.4
% replaced by savepath
% but savepath doesnt exist in version 6.5.1 or lower
Modified: trunk/libsbml/src/bindings/matlab/install_Win64.m
===================================================================
--- trunk/libsbml/src/bindings/matlab/install_Win64.m 2010-11-26 14:01:14 UTC (rev 12227)
+++ trunk/libsbml/src/bindings/matlab/install_Win64.m 2010-11-26 14:15:31 UTC (rev 12228)
@@ -76,9 +76,14 @@
% try the executable
% if it doesnt work the library files are not on the system path and need
% to be placed there
+
+success = 1;
+
+
try
M = TranslateSBML('test.xml');
catch
+ disp('Libraries not found - copying');
% determine the matlabroot for windows executable
% this directory is saved to the environmental variable PATH
Path_to_libs = matlabroot;
@@ -93,9 +98,52 @@
end;
end;
+% try the different executables
+% but stop at first fail
try
+ disp('checking for TranslateSBML');
M = TranslateSBML('test.xml');
catch
- disp('Installation failed.');
+ disp('Installation failed - need to build TranslateSBML');
+ success = 0;
end;
+if (success == 1)
+ try
+ disp('checking OutputSBML');
+ OutputSBML(M, 'test-out.xml');
+ catch
+ disp('Installation failed - need to build OutputSBML');
+ success = 0;
+ end;
+end;
+
+if (success == 1)
+ disp ('running tests for TranslateSBML');
+ cd test;
+ pass = testBinding;
+ cd ..;
+ if (pass == 0)
+ disp('TranslateSBML successful');
+ else
+ disp('Binding present but problem detected. Seek help.');
+ success = 0;
+ end;
+end;
+
+if (success == 1)
+ disp('running tests for OutputSBML');
+ cd test;
+ pass = testOutput;
+ cd ..;
+ if (pass == 0)
+ disp('OutputSBML successful');
+ else
+ disp('Output function present but problem detected. Seek help.');
+ success = 0;
+ end;
+end;
+
+if (success == 1)
+ disp ('Installation completed');
+end;
Modified: trunk/libsbml/src/bindings/matlab/test/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/matlab/test/Makefile.in 2010-11-26 14:01:14 UTC (rev 12227)
+++ trunk/libsbml/src/bindings/matlab/test/Makefile.in 2010-11-26 14:15:31 UTC (rev 12228)
@@ -69,6 +69,9 @@
testReadFromFile13.m \
testReadFromFile14.m \
testReadFlags.m \
+ compareFiles.m \
+ testOutput.m
+
$(test_data_files)
# `extra_clean' and `extra_distclean' determine the files and directories
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-26 14:01:20
|
Revision: 12227
http://sbml.svn.sourceforge.net/sbml/?rev=12227&view=rev
Author: sarahkeating
Date: 2010-11-26 14:01:14 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
run the output tests after the import tests
Modified Paths:
--------------
trunk/libsbml/src/bindings/matlab/test/testBinding.m
Modified: trunk/libsbml/src/bindings/matlab/test/testBinding.m
===================================================================
--- trunk/libsbml/src/bindings/matlab/test/testBinding.m 2010-11-26 13:59:47 UTC (rev 12226)
+++ trunk/libsbml/src/bindings/matlab/test/testBinding.m 2010-11-26 14:01:14 UTC (rev 12227)
@@ -32,3 +32,5 @@
if (Totalfail == 0)
disp('MATLAB binding tests successful.');
end;
+
+testOutput;
\ 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: <sar...@us...> - 2010-11-26 13:59:54
|
Revision: 12226
http://sbml.svn.sourceforge.net/sbml/?rev=12226&view=rev
Author: sarahkeating
Date: 2010-11-26 13:59:47 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
scripts that create the isSBML_Model file for the libsbml binding
Added Paths:
-----------
trunk/SBMLToolbox/dev/utilities/code_manipulation/
trunk/SBMLToolbox/dev/utilities/code_manipulation/createIsModelforBinding.m
trunk/SBMLToolbox/dev/utilities/code_manipulation/removePath.m
Added: trunk/SBMLToolbox/dev/utilities/code_manipulation/createIsModelforBinding.m
===================================================================
--- trunk/SBMLToolbox/dev/utilities/code_manipulation/createIsModelforBinding.m (rev 0)
+++ trunk/SBMLToolbox/dev/utilities/code_manipulation/createIsModelforBinding.m 2010-11-26 13:59:47 UTC (rev 12226)
@@ -0,0 +1,62 @@
+function createIsModelforBinding()
+
+% check we are in the correct directory
+% need to be in toolbox directory Validate_MATLAB_SBML_Structures
+[root, this_dir] = fileparts(pwd());
+if (~strcmp(this_dir, 'Validate_MATLAB_SBML_Structures'))
+ error ('Need to be in the Validate_MATLAB_SBML_Structures directory');
+end;
+spacer = '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%';
+
+% get original isModel_SBML.m
+
+fileOut = fopen('isSBML_Model.m', 'r');
+
+fileIn = fopen('bind_isSBML_Model.m', 'w');
+
+while (~feof(fileOut))
+ line = fgetl(fileOut);
+ fprintf(fileIn, '%s\n', line);
+end;
+
+fprintf(fileIn, '\n%s\n\n', spacer);
+
+% get other files
+files = dir('isSBML_*.m');
+
+for i = 1:length(files)
+ if (~strcmp(files(i).name, 'isSBML_Model.m'))
+ copyFile(files(i).name, fileIn);
+ fprintf(fileIn, '\n%s\n\n', spacer);
+ end;
+end;
+
+fclose(fileOut);
+fclose(fileIn);
+
+function copyFile(filename, fileIn)
+
+fileOut1 = fopen(filename, 'r');
+
+%copy first line
+line = fgetl(fileOut1);
+fprintf(fileIn, '%s\n', line);
+
+end_of_comment = 0;
+
+while (~end_of_comment)
+ line = fgetl(fileOut1);
+ if (length(line) > 10)
+ begins = line(1:10);
+ if (strcmp(begins, '%---------'))
+ end_of_comment = 1;
+ end;
+ end;
+end;
+
+while (~feof(fileOut1))
+ line = fgetl(fileOut1);
+ fprintf(fileIn, '%s\n', line);
+end;
+
+fclose(fileOut1);
\ No newline at end of file
Added: trunk/SBMLToolbox/dev/utilities/code_manipulation/removePath.m
===================================================================
--- trunk/SBMLToolbox/dev/utilities/code_manipulation/removePath.m (rev 0)
+++ trunk/SBMLToolbox/dev/utilities/code_manipulation/removePath.m 2010-11-26 13:59:47 UTC (rev 12226)
@@ -0,0 +1,20 @@
+function removePath()
+
+%check we are in the right directory
+files = dir();
+
+for i= 1:length(files)
+ if (strcmp(files(i).name, 'AccessModel'))
+ break;
+ end;
+end;
+
+if (i == length(files))
+ error('Need to be in the toolbox directory');
+end;
+
+dirs_to_delete = genpath(pwd());
+
+rmpath(dirs_to_delete);
+
+savepath();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-26 13:58:26
|
Revision: 12225
http://sbml.svn.sourceforge.net/sbml/?rev=12225&view=rev
Author: sarahkeating
Date: 2010-11-26 13:58:18 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
replaced the validation tests with one global one
Added Paths:
-----------
trunk/libsbml/src/bindings/matlab/isSBML_Model.m
Removed Paths:
-------------
trunk/libsbml/src/bindings/matlab/Validate_MATLAB_SBML_Structures/
Added: trunk/libsbml/src/bindings/matlab/isSBML_Model.m
===================================================================
--- trunk/libsbml/src/bindings/matlab/isSBML_Model.m (rev 0)
+++ trunk/libsbml/src/bindings/matlab/isSBML_Model.m 2010-11-26 13:58:18 UTC (rev 12225)
@@ -0,0 +1,2444 @@
+function [y, message] = isSBML_Model(SBMLStructure)
+% isSBML_Model(SBMLStructure) checks that SBMLStructure represents an sbml model
+%
+% if SBMLStructure represents an SBML model
+% it has the appropriate fields
+% eg Typecode
+% Metaid (L2V1)
+% Notes
+% Annotations
+% Level
+% Version
+% Name
+% Id (L2V1)
+% SBOTerm (L2V2)
+% ListFunctionDefinition (L2V1)
+% ListUnitDefinition
+% ListOfCompartmentTypes (L2V2)
+% ListOfSpeciesTypes (L2V2)
+% ListCompartment
+% ListSpecies
+% ListParameter
+% ListOfInitialAssignments (L2V2)
+% ListRule
+% ListOfConstraints (L2V2)
+% ListReaction
+% ListEvent (2)
+%
+% NOTE: content of brackets indicates the level and version of sbml from which the given field
+% is appropriate.
+%
+% Returns 1 if SBMLStructure is a structure containing each of the above
+% fields (appropriate with the given level and version) and the typecode is "SBML_MODEL"
+%
+% Returns 0 if SBMLStructure is not a structure
+% or does not contain one of the appropriate fields
+% or the typecode is not "SBML_MODEL"
+%
+% Returns message indicating the structure that is invalid.
+
+% Filename : isSBML_Model.m
+% Description :
+% Author(s) : SBML Development Group <sbm...@ca...>
+% $Id: isSBML_Model.m 11823 2010-09-03 11:24:42Z sarahkeating $
+% $Source v $
+%
+%<!---------------------------------------------------------------------------
+% This file is part of SBMLToolbox. Please visit http://sbml.org for more
+% information about SBML, and the latest version of SBMLToolbox.
+%
+% Copyright 2005-2007 California Institute of Technology.
+% Copyright 2002-2005 California Institute of Technology and
+% Japan Science and Technology Corporation.
+%
+% 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/sbmltoolbox/license.html
+%----------------------------------------------------------------------- -->
+
+y = isfield(SBMLStructure, 'SBML_level');
+if (y == 0)
+ return;
+end;
+message = '';
+% get level
+Level = SBMLStructure.SBML_level;
+if (Level < 1 || Level > 3)
+ y = 0;
+ message = 'Invalid SBML level';
+ return;
+end;
+
+% get version
+Version = SBMLStructure.SBML_version;
+if (Version < 1 || Version > 4)
+ y = 0;
+ message = 'Invalid SBML version';
+ return;
+end;
+
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation', 'SBML_level', 'SBML_version', 'name', 'unitDefinition',...
+ 'compartment', 'species', 'parameter', 'rule', 'reaction'};
+ nNumberFields = 12;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'SBML_level', 'SBML_version', 'name', 'id', ...
+ 'functionDefinition', 'unitDefinition', 'compartment', 'species', 'parameter', 'rule', 'reaction',...
+ 'event'};
+ nNumberFields = 16;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'SBML_level', 'SBML_version', 'name', 'id', ...
+ 'sboTerm', 'functionDefinition', 'unitDefinition', 'compartmentType', 'speciesType', 'compartment', ...
+ 'species', 'parameter', 'initialAssignment', 'rule', 'constraint', 'reaction', 'event'};
+ nNumberFields = 21;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'SBML_level', 'SBML_version', 'name', 'id', ...
+ 'sboTerm', 'functionDefinition', 'unitDefinition', 'compartmentType', 'speciesType', 'compartment', ...
+ 'species', 'parameter', 'initialAssignment', 'rule', 'constraint', 'reaction', 'event'};
+ nNumberFields = 21;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'SBML_level', 'SBML_version', 'name', 'id', ...
+ 'sboTerm', 'functionDefinition', 'unitDefinition', 'compartmentType', 'speciesType', 'compartment', ...
+ 'species', 'parameter', 'initialAssignment', 'rule', 'constraint', 'reaction', 'event'};
+ nNumberFields = 21;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'SBML_level', 'SBML_version', 'name', 'id', ...
+ 'sboTerm', 'functionDefinition', 'unitDefinition', 'compartment', ...
+ 'species', 'parameter', 'initialAssignment', 'rule', 'constraint', 'reaction', 'event', ...
+ 'substanceUnits', 'timeUnits', 'lengthUnits', 'areaUnits', 'volumeUnits', 'extentUnits', 'conversionFactor'};
+ nNumberFields = 26;
+ end;
+end;
+typecode = 'SBML_MODEL';
+
+bSBML = 0;
+
+% check that Model is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+% take out this requirement as a user may wish to
+% add their own fields
+% if (bSBML == 1)
+% names = fieldnames(SBMLStructure);
+% [m,n] = size(names);
+% if (m ~= nNumberFields)
+% bSBML = 0;
+% end;
+% end;
+%
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+% check that any nested structures are appropriate
+if (bSBML == 1)
+ if (Level == 2)
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.functionDefinition);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_FunctionDefinition(SBMLStructure.functionDefinition(index), Level, Version);
+ index = index + 1;
+ end;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.unitDefinition);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_UnitDefinition(SBMLStructure.unitDefinition(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.compartment);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Compartment(SBMLStructure.compartment(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.species);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Species(SBMLStructure.species(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.parameter);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Parameter(SBMLStructure.parameter(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.rule);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Rule(SBMLStructure.rule(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.reaction);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Reaction(SBMLStructure.reaction(index), Level, Version);
+ index = index + 1;
+ end;
+
+ if (Level == 2)
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.event);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Event(SBMLStructure.event(index), Level, Version);
+ index = index + 1;
+ end;
+ end;
+
+ if (Level == 2 && Version > 1)
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.compartmentType);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_CompartmentType(SBMLStructure.compartmentType(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.speciesType);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_SpeciesType(SBMLStructure.speciesType(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.initialAssignment);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_InitialAssignment(SBMLStructure.initialAssignment(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.constraint);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_Constraint(SBMLStructure.constraint(index), Level, Version);
+ index = index + 1;
+ end;
+
+ end;
+
+end;
+
+if (bSBML == 0)
+ if (isempty(message))
+ message = 'Invalid Model structure';
+ else
+ message = sprintf('%s\n%s', message, 'Invalid Model structure');
+ end;
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_AlgebraicRule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+typecode = 'SBML_ALGEBRAIC_RULE';
+
+bSBML = isSBML_Rule(SBMLStructure, Level, Version);
+
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid AlgebraicRule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_AssignmentRule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+typecode = {'SBML_SPECIES_CONCENTRATION_RULE', 'SBML_COMPARTMENT_VOLUME_RULE', 'SBML_PARAMETER_RULE', 'SBML_ASSIGNMENT_RULE'};
+nNumberTypecodes = 4;
+
+bSBML = isSBML_Rule(SBMLStructure, Level, Version);
+
+
+% check that the typecode is correct
+index = 1;
+nMatch = 0;
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ while (index <= nNumberTypecodes)
+ k = strcmp(type, typecode(index));
+ if (k == 1)
+ nMatch = nMatch + 1;
+ end;
+ index = index + 1;
+ end;
+ if (nMatch == 0)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid AssignmentRule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Compartment(varargin)
+
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+
+
+
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation','name', 'volume', 'units', 'outside', 'isSetVolume'};
+ nNumberFields = 8;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'spatialDimensions', ...
+ 'size', 'units', 'outside', 'constant', 'isSetSize','isSetVolume'};
+ nNumberFields = 13;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'compartmentType', ...
+ 'spatialDimensions', 'size', 'units', 'outside', 'constant', 'isSetSize','isSetVolume'};
+ nNumberFields = 14;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'compartmentType', ...
+ 'spatialDimensions', 'size', 'units', 'outside', 'constant', 'isSetSize','isSetVolume'};
+ nNumberFields = 15;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'compartmentType', ...
+ 'spatialDimensions', 'size', 'units', 'outside', 'constant', 'isSetSize','isSetVolume'};
+ nNumberFields = 15;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', ...
+ 'spatialDimensions', 'size', 'units', 'constant', 'isSetSize','isSetSpatialDimensions'};
+ nNumberFields = 13;
+ end;
+end;
+typecode = 'SBML_COMPARTMENT';
+
+bSBML = 0;
+
+% check that Model is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Compartment structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_CompartmentType(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'name', 'id'};
+ nNumberFields = 6;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id'};
+ nNumberFields = 7;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id'};
+ nNumberFields = 7;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ y = 0;
+ return;
+ end;
+end;
+
+ typecode = 'SBML_COMPARTMENT_TYPE';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid CompartmentType structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_CompartmentVolumeRule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+typecode = 'SBML_COMPARTMENT_VOLUME_RULE';
+
+bSBML = isSBML_Rule(SBMLStructure, Level, Version);
+
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid CompartmentVolumeRule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Constraint(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math', 'message'};
+ nNumberFields = 7;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math', 'message'};
+ nNumberFields = 7;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math', 'message'};
+ nNumberFields = 7;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math', 'message'};
+ nNumberFields = 7;
+ end;
+end;
+
+ typecode = 'SBML_CONSTRAINT';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Constraint structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Delay(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ y = 0;
+ return;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ end;
+end;
+
+ typecode = 'SBML_DELAY';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Delay structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Event(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ message = 'Event is invalid for SBML L1';
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'name', 'id', 'trigger', 'delay', ...
+ 'timeUnits', 'eventAssignment'};
+ nNumberFields = 10;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'name', 'id', 'trigger', 'delay', ...
+ 'timeUnits', 'sboTerm', 'eventAssignment'};
+ nNumberFields = 11;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'trigger', 'delay', ...
+ 'eventAssignment'};
+ nNumberFields = 10;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', ...
+ 'useValuesFromTriggerTime', 'trigger', 'delay', 'eventAssignment'};
+ nNumberFields = 11;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', ...
+ 'useValuesFromTriggerTime', 'trigger', 'delay', 'eventAssignment'};
+ nNumberFields = 11;
+ end;
+end;
+
+ typecode = 'SBML_EVENT';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+% check that any nested structures are appropriate
+if(bSBML == 1)
+ index = 1;
+ [x, nNumber] = size(SBMLStructure.eventAssignment);
+ while (bSBML == 1 && index <= nNumber)
+ [bSBML, message] = isSBML_EventAssignment(SBMLStructure.eventAssignment(index), Level, Version);
+ index = index + 1;
+ end;
+end;
+if (Level == 2 && Version > 2)
+ if (length(SBMLStructure.trigger) > 1 || length(SBMLStructure.delay) > 1)
+ bSBML = 0;
+ end;
+
+ if(bSBML == 1 && ~isempty(SBMLStructure.trigger))
+ [bSBML, mess1] = isSBML_Trigger(SBMLStructure.trigger, Level, Version);
+ if (bSBML == 0)
+ if (isempty(message))
+ message = mess1;
+ else
+ message = sprintf('%s\n%s', message, mess1);
+ end;
+ end;
+ end;
+ if(bSBML == 1 && ~isempty(SBMLStructure.delay))
+ [bSBML, mess1] = isSBML_Delay(SBMLStructure.delay, Level, Version);
+ if (bSBML == 0)
+ if (isempty(message))
+ message = mess1;
+ else
+ message = sprintf('%s\n%s', message, mess1);
+ end;
+ end;
+ end;
+end;
+
+if (bSBML == 0)
+ if (isempty(message))
+ message = 'Invalid Event structure';
+ else
+ message = sprintf('%s\n%s', message, 'Invalid Event structure');
+ end;
+end;
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_EventAssignment(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','variable', 'math'};
+ nNumberFields = 6;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','variable', 'sboTerm', 'math'};
+ nNumberFields = 7;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'variable', 'math'};
+ nNumberFields = 7;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'variable', 'math'};
+ nNumberFields = 7;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'variable', 'math'};
+ nNumberFields = 7;
+ end;
+end;
+
+ typecode = 'SBML_EVENT_ASSIGNMENT';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid EventAssignment structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_FunctionDefinition(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'math'};
+ nNumberFields = 7;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'math'};
+ nNumberFields = 8;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'math'};
+ nNumberFields = 8;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'math'};
+ nNumberFields = 8;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'math'};
+ nNumberFields = 8;
+ end;
+end;
+
+ typecode = 'SBML_FUNCTION_DEFINITION';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid FunctionDefinition structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_InitialAssignment(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'symbol', 'math'};
+ nNumberFields = 7;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'symbol', 'math'};
+ nNumberFields = 7;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'symbol', 'math'};
+ nNumberFields = 7;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'symbol', 'math'};
+ nNumberFields = 7;
+ end;
+end;
+
+ typecode = 'SBML_INITIAL_ASSIGNMENT';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid InitialAssignment structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_KineticLaw(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation','formula', 'parameter', 'timeUnits', 'substanceUnits'};
+ nNumberFields = 7;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','formula', 'math','parameter', ...
+ 'timeUnits','substanceUnits'};
+ nNumberFields = 9;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','formula', 'math','parameter', 'sboTerm'};
+ nNumberFields = 8;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'formula', 'math','parameter'};
+ nNumberFields = 8;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'formula', 'math','parameter'};
+ nNumberFields = 8;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math','localParameter'};
+ nNumberFields = 7;
+ end;
+end;
+typecode = 'SBML_KINETIC_LAW';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+% check that any nested structures are appropriate
+if(bSBML == 1)
+ index = 1;
+ if (Level < 3)
+ [x, nNumberParameters] = size(SBMLStructure.parameter);
+ while (bSBML == 1 && index <= nNumberParameters)
+ [bSBML, message] = isSBML_Parameter(SBMLStructure.parameter(index), Level, Version);
+ index = index + 1;
+ end;
+ else
+ [x, nNumberParameters] = size(SBMLStructure.localParameter);
+ while (bSBML == 1 && index <= nNumberParameters)
+ [bSBML, message] = isSBML_LocalParameter(SBMLStructure.localParameter(index), Level, Version);
+ index = index + 1;
+ end;
+ end;
+end;
+
+if (bSBML == 0)
+ if (isempty(message))
+ message = 'Invalid KineticLaw structure';
+ else
+ message = sprintf('%s\n%s', message, 'Invalid KineticLaw structure');
+ end;
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_LocalParameter(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ y = 0;
+ return;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'value', 'units', ...
+ 'isSetValue'};
+ nNumberFields = 10;
+ end;
+end;
+
+typecode = 'SBML_LOCAL_PARAMETER';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Parameter structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_ModifierSpeciesReference(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','species'};
+ nNumberFields = 5;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','species', 'id', 'name', 'sboTerm'};
+ nNumberFields = 8;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'species', 'id', 'name'};
+ nNumberFields = 8;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'species', 'id', 'name'};
+ nNumberFields = 8;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'species', 'id', 'name'};
+ nNumberFields = 8;
+ end;
+end;
+typecode = 'SBML_MODIFIER_SPECIES_REFERENCE';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid ModifierSpeciesReference structure';
+end;
+
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Parameter(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation','name', 'value', 'units', 'isSetValue'};
+ nNumberFields = 7;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'value', 'units', 'constant', 'isSetValue'};
+ nNumberFields = 10;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'value', 'units', ...
+ 'constant', 'sboTerm', 'isSetValue'};
+ nNumberFields = 11;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'value', 'units', ...
+ 'constant', 'isSetValue'};
+ nNumberFields = 11;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'value', 'units', ...
+ 'constant', 'isSetValue'};
+ nNumberFields = 11;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id', 'value', 'units', ...
+ 'constant', 'isSetValue'};
+ nNumberFields = 11;
+ end;
+end;
+
+typecode = 'SBML_PARAMETER';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Parameter structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_ParameterRule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+typecode = 'SBML_PARAMETER_RULE';
+
+bSBML = isSBML_Rule(SBMLStructure, Level, Version);
+
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid ParameterRule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_RateRule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+typecodel1 = {'SBML_SPECIES_CONCENTRATION_RULE', ...
+ 'SBML_COMPARTMENT_VOLUME_RULE', 'SBML_PARAMETER_RULE'};
+index = 1;
+
+typecode = 'SBML_RATE_RULE';
+
+bSBML = isSBML_Rule(SBMLStructure, Level, Version);
+
+
+% check that the typecode is correct
+if (bSBML == 1)
+ code = SBMLStructure.typecode;
+ k = strcmp(code, typecode);
+ if (k ~= 1)
+ nMatch = 0;
+ while (index <= 3)
+ k = strcmp(code, typecodel1(index));
+ if (k == 1 && strcmp(SBMLStructure.type, 'rate'))
+ nMatch = nMatch + 1;
+ end;
+ index = index + 1;
+ end;
+ if (nMatch == 0)
+ bSBML = 0;
+ end;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid RateRule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Reaction(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation','name', 'reactant', 'product', 'kineticLaw', ...
+ 'reversible', 'fast'};
+ nNumberFields = 9;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'reactant', 'product', ...
+ 'modifier', 'kineticLaw', 'reversible', 'fast', 'isSetFast'};
+ nNumberFields = 13;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'reactant', 'product', ...
+ 'modifier', 'kineticLaw', 'reversible', 'fast', 'sboTerm', 'isSetFast'};
+ nNumberFields = 14;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','sboTerm', 'name', 'id', 'reactant', 'product', ...
+ 'modifier', 'kineticLaw', 'reversible', 'fast', 'isSetFast'};
+ nNumberFields = 14;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','sboTerm', 'name', 'id', 'reactant', 'product', ...
+ 'modifier', 'kineticLaw', 'reversible', 'fast', 'isSetFast'};
+ nNumberFields = 14;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','sboTerm', 'name', 'id', 'reactant', 'product', ...
+ 'modifier', 'kineticLaw', 'reversible', 'fast', 'isSetFast', 'compartment'};
+ nNumberFields = 15;
+ end;
+end;
+
+typecode = 'SBML_REACTION';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% catch cases where isSetFast field was capitalised (Version 1.0.2)
+if (Level == 2 && bSBML == 0)
+ % may have failed on case
+ if (index == 13)
+ bSBML = isfield(SBMLStructure, 'IsSetFast');
+ end;
+end;
+
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+% check that any nested structures are appropriate
+if(bSBML == 1)
+ index = 1;
+ [x, nNumberReactants] = size(SBMLStructure.reactant);
+ while (bSBML == 1 && index <= nNumberReactants)
+ [bSBML, message] = isSBML_SpeciesReference(SBMLStructure.reactant(index), Level, Version);
+ index = index + 1;
+ end;
+
+ index = 1;
+ [x, nNumberProducts] = size(SBMLStructure.product);
+ while (bSBML == 1 && index <= nNumberProducts)
+ [bSBML, message] = isSBML_SpeciesReference(SBMLStructure.product(index), Level, Version);
+ index = index + 1;
+ end;
+
+ if (Level > 1)
+ index = 1;
+ [x, nNumberModifiers] = size(SBMLStructure.modifier);
+ while (bSBML == 1 && index <= nNumberModifiers)
+ [bSBML, message] = isSBML_ModifierSpeciesReference(SBMLStructure.modifier(index), Level, Version);
+ index = index + 1;
+ end;
+ end;
+
+ % if a kinetic law is present check that it is valid
+ if (bSBML == 1 && ~isempty(SBMLStructure.kineticLaw))
+ [bSBML, message] = isSBML_KineticLaw(SBMLStructure.kineticLaw, Level, Version);
+ end;
+end;
+
+if (bSBML == 0)
+ if (isempty(message))
+ message = 'Invalid Reaction structure';
+ else
+ message = sprintf('%s\n%s', message, 'Invalid Reaction structure');
+ end;
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Rule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation', 'type', 'formula', ...
+ 'variable', 'species', 'compartment', 'name', 'units'};
+ nNumberFields = 10;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','formula', ...
+ 'variable', 'species', 'compartment', 'name', 'units'};
+ nNumberFields = 10;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', ...
+ 'formula', 'variable', 'species', 'compartment', 'name', 'units'};
+ nNumberFields = 11;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', ...
+ 'formula', 'variable', 'species', 'compartment', 'name', 'units'};
+ nNumberFields = 11;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', ...
+ 'formula', 'variable', 'species', 'compartment', 'name', 'units'};
+ nNumberFields = 11;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', ...
+ 'formula', 'variable', 'species', 'compartment', 'name', 'units'};
+ nNumberFields = 11;
+ end;
+end;
+typecodel1 = {'SBML_ALGEBRAIC_RULE', 'SBML_SPECIES_CONCENTRATION_RULE', ...
+ 'SBML_COMPARTMENT_VOLUME_RULE', 'SBML_PARAMETER_RULE'};
+nNumberTypecodesl1 = 4;
+
+typecodel2 = {'SBML_ALGEBRAIC_RULE', 'SBML_ASSIGNMENT_RULE', 'SBML_RATE_RULE'};
+nNumberTypecodesl2 = 3;
+
+bSBML = 0;
+
+% check that Rule is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+index = 1;
+nMatch = 0;
+if (bSBML == 1)
+type = SBMLStructure.typecode;
+ if (Level == 1)
+ while (index <= nNumberTypecodesl1)
+ k = strcmp(type, typecodel1(index));
+ if (k == 1)
+ nMatch = nMatch + 1;
+ end;
+ index = index + 1;
+ end;
+ if (nMatch == 0)
+ bSBML = 0;
+ end;
+ else
+ while (index <= nNumberTypecodesl2)
+ k = strcmp(type, typecodel2(index));
+ if (k == 1)
+ nMatch = nMatch + 1;
+ end;
+ index = index + 1;
+ end;
+ if (nMatch == 0)
+ bSBML = 0;
+ end;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Rule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Species(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation','name', 'compartment', 'initialAmount', ...
+ 'units', 'boundaryCondition', 'charge', 'isSetInitialAmount', 'isSetCharge'};
+ nNumberFields = 11;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'compartment', 'initialAmount', ...
+ 'initialConcentration', 'substanceUnits', 'spatialSizeUnits', 'hasOnlySubstanceUnits', ...
+ 'boundaryCondition', 'charge', 'constant', 'isSetInitialAmount', 'isSetInitialConcentration', ...
+ 'isSetCharge'};
+ nNumberFields = 18;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','name', 'id', 'speciesType', 'compartment', ...
+ 'initialAmount', 'initialConcentration', 'substanceUnits', 'spatialSizeUnits', ...
+ 'hasOnlySubstanceUnits', 'boundaryCondition', 'charge', 'constant', 'isSetInitialAmount', ...
+ 'isSetInitialConcentration','isSetCharge'};
+ nNumberFields = 19;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','sboTerm', 'name', 'id', 'speciesType', 'compartment', ...
+ 'initialAmount', 'initialConcentration', 'substanceUnits', ...
+ 'hasOnlySubstanceUnits', 'boundaryCondition', 'charge', 'constant', 'isSetInitialAmount', ...
+ 'isSetInitialConcentration','isSetCharge'};
+ nNumberFields = 19;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','sboTerm', 'name', 'id', 'speciesType', 'compartment', ...
+ 'initialAmount', 'initialConcentration', 'substanceUnits', ...
+ 'hasOnlySubstanceUnits', 'boundaryCondition', 'charge', 'constant', 'isSetInitialAmount', ...
+ 'isSetInitialConcentration','isSetCharge'};
+ nNumberFields = 19;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','sboTerm', 'name', 'id', 'compartment', ...
+ 'initialAmount', 'initialConcentration', 'substanceUnits', ...
+ 'hasOnlySubstanceUnits', 'boundaryCondition', 'constant', 'isSetInitialAmount', ...
+ 'isSetInitialConcentration','conversionFactor'};
+ nNumberFields = 17;
+ end;
+end;
+typecode = 'SBML_SPECIES';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid Species structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_SpeciesConcentrationRule(varargin)
+
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+typecode = 'SBML_SPECIES_CONCENTRATION_RULE';
+
+bSBML = isSBML_Rule(SBMLStructure, Level, Version);
+
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid SpeciesConcentrationRule structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_SpeciesReference(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ SBMLfieldnames = {'typecode', 'notes', 'annotation','species', 'stoichiometry', 'denominator'};
+ nNumberFields = 6;
+elseif (Level == 2)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','species', 'stoichiometry', ...
+ 'denominator', 'stoichiometryMath'};
+ nNumberFields = 8;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation','species', 'id', 'name', ...
+ 'sboTerm', 'stoichiometry', 'stoichiometryMath'};
+ nNumberFields = 10;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'species', 'id', 'name', ...
+ 'stoichiometry', 'stoichiometryMath'};
+ nNumberFields = 10;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'species', 'id', 'name', ...
+ 'stoichiometry', 'stoichiometryMath'};
+ nNumberFields = 10;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'species', 'id', 'name', ...
+ 'stoichiometry', 'constant', 'isSetStoichiometry'};
+ nNumberFields = 11;
+ end;
+end;
+typecode = 'SBML_SPECIES_REFERENCE';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that any nested structures are appropriate
+if (Level == 2 && Version > 2)
+ if (length(SBMLStructure.stoichiometryMath) > 1)
+ bSBML = 0;
+ end;
+
+ if(bSBML == 1 && ~isempty(SBMLStructure.stoichiometryMath))
+ [bSBML, message] = isSBML_StoichiometryMath(SBMLStructure.stoichiometryMath, Level, Version);
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ if (isempty(message))
+ message = 'Invalid SpeciesReference structure';
+ else
+ message = sprintf('%s\n%s', message, 'Invalid SpeciesReference structure');
+ end;
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_SpeciesType(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'name', 'id'};
+ nNumberFields = 6;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id'};
+ nNumberFields = 7;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'name', 'id'};
+ nNumberFields = 7;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ y = 0;
+ return;
+ end;
+end;
+
+ typecode = 'SBML_SPECIES_TYPE';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid SpeciesType structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_StoichiometryMath(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ y = 0;
+ return;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ y = 0;
+ return;
+ end;
+end;
+
+ typecode = 'SBML_STOICHIOMETRY_MATH';
+
+bSBML = 0;
+
+% check that argument is a structure
+bSBML = isstruct(SBMLStructure);
+
+% check it contains each of the fields listed
+index = 1;
+while (bSBML == 1 && index <= nNumberFields)
+ bSBML = isfield(SBMLStructure, char(SBMLfieldnames(index)));
+ index = index + 1;
+end;
+
+% check that it contains only the fields listed
+if (bSBML == 1)
+ names = fieldnames(SBMLStructure);
+ [m,n] = size(names);
+ if (m ~= nNumberFields)
+ bSBML = 0;
+ end;
+end;
+
+% check that the typecode is correct
+if (bSBML == 1)
+ type = SBMLStructure.typecode;
+ k = strcmp(type, typecode);
+ if (k ~= 1)
+ bSBML = 0;
+ end;
+end;
+
+if (bSBML == 0)
+ message = 'Invalid StoichiometryMath structure';
+end;
+
+y = bSBML;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function [y, message] = isSBML_Trigger(varargin)
+
+
+%input arguments
+if (nargin < 2 || nargin > 3)
+ error('wrong number of input arguments');
+end;
+
+message = '';
+
+SBMLStructure = varargin{1};
+Level = varargin{2};
+
+if (nargin == 3)
+ Version = varargin{3};
+else
+ Version = 1;
+end;
+
+if (Level == 1)
+ y = 0;
+ return;
+elseif (Level == 2)
+ if (Version == 1)
+ y = 0;
+ return;
+ elseif (Version == 2)
+ y = 0;
+ return;
+ elseif (Version == 3)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ elseif (Version == 4)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ nNumberFields = 6;
+ end;
+elseif (Level == 3)
+ if (Version == 1)
+ SBMLfieldnames = {'typecode', 'metaid', 'notes', 'annotation', 'sboTerm', 'math'};
+ ...
[truncated message content] |
|
From: <sar...@us...> - 2010-11-26 13:57:32
|
Revision: 12224
http://sbml.svn.sourceforge.net/sbml/?rev=12224&view=rev
Author: sarahkeating
Date: 2010-11-26 13:57:25 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
function name did not match file name
Modified Paths:
--------------
trunk/SBMLToolbox/src/Validate_MATLAB_SBML_Structures/isSBML_LocalParameter.m
Modified: trunk/SBMLToolbox/src/Validate_MATLAB_SBML_Structures/isSBML_LocalParameter.m
===================================================================
--- trunk/SBMLToolbox/src/Validate_MATLAB_SBML_Structures/isSBML_LocalParameter.m 2010-11-26 01:08:29 UTC (rev 12223)
+++ trunk/SBMLToolbox/src/Validate_MATLAB_SBML_Structures/isSBML_LocalParameter.m 2010-11-26 13:57:25 UTC (rev 12224)
@@ -1,4 +1,4 @@
-function [y, message] = isSBML_localParameter(varargin)
+function [y, message] = isSBML_LocalParameter(varargin)
% isSBML_LocalParameter(SBMLStructure, Level, Version(optional))
% checks that SBMLStructure represents a localParameter
% within an sbml model of the specified level
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-26 01:08:35
|
Revision: 12223
http://sbml.svn.sourceforge.net/sbml/?rev=12223&view=rev
Author: fbergmann
Date: 2010-11-26 01:08:29 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
- modified building of matlab file this seems to work better
Modified Paths:
--------------
branches/libsbml-5/src/bindings/matlab/CMakeLists.txt
Modified: branches/libsbml-5/src/bindings/matlab/CMakeLists.txt
===================================================================
--- branches/libsbml-5/src/bindings/matlab/CMakeLists.txt 2010-11-25 21:12:18 UTC (rev 12222)
+++ branches/libsbml-5/src/bindings/matlab/CMakeLists.txt 2010-11-26 01:08:29 UTC (rev 12223)
@@ -18,61 +18,68 @@
# break up the libsbml library dependencies into paths and libraries
set(MATLAB_EXTRA_LIBS)
foreach(lib ${LIBSBML_LIBS})
- if (UNIX)
- get_filename_component(name ${lib} NAME_WE)
- get_filename_component(path ${lib} PATH)
- string(REGEX REPLACE "lib" "" name "${name}")
- list(APPEND MATLAB_EXTRA_LIBS -l${name})
- #list(APPEND MATLAB_EXTRA_PATHS -L${path})
- else()
- list(APPEND MATLAB_EXTRA_LIBS ${lib})
+ get_filename_component(name ${lib} NAME_WE)
+ get_filename_component(path ${lib} PATH)
+ string(REGEX REPLACE "lib" "" name "${name}")
+ file(TO_NATIVE_PATH "${path}" native_path)
+ list(APPEND MATLAB_EXTRA_LIBS -l${name})
+ if (WIN32)
+ list(APPEND MATLAB_EXTRA_LIBS -L${native_path})
endif()
endforeach()
set(MATLAB_LIBSBML_LIB)
+set(MATLAB_OBJ_FILE)
set(MATLAB_MEX_EXTRA_ARGS)
if(UNIX)
-# if (APPLE)
-# set(MATLAB_LIBSBML_LIB "-l${CMAKE_BINARY_DIR}/src/lib${LIBSBML_LIBRARY}.a" )
-# else()
- set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY})
- set(MATLAB_MEX_EXTRA_ARGS -cxx)
-# endif()
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${CMAKE_BINARY_DIR}/src/)
+ set(MATLAB_MEX_EXTRA_ARGS -cxx)
+ set(MATLAB_OBJ_FILE ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.o)
else()
if(MSVC)
if (EXISTS "${CMAKE_BINARY_DIR}/src/${LIBSBML_LIBRARY}.lib")
- set(MATLAB_LIBSBML_LIB "${CMAKE_BINARY_DIR}/src/${LIBSBML_LIBRARY}.lib" )
+ file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src/ lib_path)
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${lib_path})
elseif(EXISTS "${CMAKE_BINARY_DIR}/src/Release/${LIBSBML_LIBRARY}.lib")
- set(MATLAB_LIBSBML_LIB "${CMAKE_BINARY_DIR}/src/Release/${LIBSBML_LIBRARY}.lib" )
+ file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/src/Release/ lib_path)
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${lib_path})
else()
set(MATLAB_LIBSBML_LIB ${LIBSBML_LIBRARY}.lib )
endif()
+ set(MATLAB_MEX_EXTRA_ARGS -DWIN32 -DLIBSBML_EXPORTS -DLIBLAX_EXPORTS )
+ set(MATLAB_OBJ_FILE ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.obj)
else()
- set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} )
+ set(MATLAB_LIBSBML_LIB -l${LIBSBML_LIBRARY} -L${CMAKE_BINARY_DIR}/src/)
+ set(MATLAB_OBJ_FILE ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.o)
endif()
endif()
# compile and link mex file
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.${MATLAB_MEX_EXT}
- COMMAND "${CMAKE_COMMAND}"
+
+ COMMAND "${CMAKE_COMMAND}"
ARGS -E remove ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.${MATLAB_MEX_EXT}
- COMMAND "${MATLAB_MEX_COMMAND}"
+
+ COMMAND "${MATLAB_MEX_COMMAND}"
ARGS
- -output "${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.${MATLAB_MEX_EXT}"
-I"${CMAKE_CURRENT_SOURCE_DIR}/../../"
-I"${CMAKE_SOURCE_DIR}/include"
+ -c
+ ${MATLAB_MEX_EXTRA_ARGS}
"${CMAKE_CURRENT_SOURCE_DIR}/TranslateSBML.c"
- "${MATLAB_LIBSBML_LIB}"
+
+ COMMAND "${MATLAB_MEX_COMMAND}"
+ ARGS
+ -output "${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.${MATLAB_MEX_EXT}"
+ ${MATLAB_OBJ_FILE}
+ ${MATLAB_LIBSBML_LIB}
${MATLAB_EXTRA_LIBS}
- ${MATLAB_MEX_EXTRA_ARGS}
- -L"${CMAKE_BINARY_DIR}/src"
- -L"${CMAKE_BINARY_DIR}/src/Release"
- -L"${CMAKE_BINARY_DIR}/src/Debug"
-
+
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/TranslateSBML.c
COMMENT "compile and link matlab mex file")
+
add_custom_target(TranslateSBML_matlab ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/TranslateSBML.${MATLAB_MEX_EXT} ${LIBSBML_LIBRARY})
add_dependencies(TranslateSBML_matlab ${LIBSBML_LIBRARY})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-25 21:12:25
|
Revision: 12222
http://sbml.svn.sourceforge.net/sbml/?rev=12222&view=rev
Author: fbergmann
Date: 2010-11-25 21:12:18 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
- add missing LIBSBML_EXTERN statements (needed for windows dynamic libraries)
- fix typos in package cmake files
Modified Paths:
--------------
branches/libsbml-5/src/groups-package.cmake
branches/libsbml-5/src/layout-package.cmake
branches/libsbml-5/src/math/ASTNode.h
branches/libsbml-5/src/sbml/SBase.h
branches/libsbml-5/src/xml/XMLTokenizer.h
Modified: branches/libsbml-5/src/groups-package.cmake
===================================================================
--- branches/libsbml-5/src/groups-package.cmake 2010-11-25 18:53:12 UTC (rev 12221)
+++ branches/libsbml-5/src/groups-package.cmake 2010-11-25 21:12:18 UTC (rev 12222)
@@ -12,8 +12,6 @@
#include common macro for copying files
include(${CMAKE_SOURCE_DIR}/common.cmake)
-include(${CMAKE_SOURCE_DIR}/groups-package.cmake)
-
#build up sources
set(GROUPS_SOURCES)
Modified: branches/libsbml-5/src/layout-package.cmake
===================================================================
--- branches/libsbml-5/src/layout-package.cmake 2010-11-25 18:53:12 UTC (rev 12221)
+++ branches/libsbml-5/src/layout-package.cmake 2010-11-25 21:12:18 UTC (rev 12222)
@@ -12,8 +12,6 @@
#include common macro for copying files
include(${CMAKE_SOURCE_DIR}/common.cmake)
-include(${CMAKE_SOURCE_DIR}/layout-package.cmake)
-
#build up sources
set(LAYOUT_SOURCES)
@@ -40,7 +38,7 @@
INSTALL(FILES ${layout_headers} DESTINATION include/sbml/layout)
# create source group for IDEs
-source_group(req_package FILES ${LAYOUT_SOURCES})
+source_group(layout_package FILES ${LAYOUT_SOURCES})
# add layout sources to SBML sources
SET(LIBSBML_SOURCES ${LIBSBML_SOURCES} ${LAYOUT_SOURCES})
Modified: branches/libsbml-5/src/math/ASTNode.h
===================================================================
--- branches/libsbml-5/src/math/ASTNode.h 2010-11-25 18:53:12 UTC (rev 12221)
+++ branches/libsbml-5/src/math/ASTNode.h 2010-11-25 21:12:18 UTC (rev 12222)
@@ -1596,6 +1596,7 @@
*
* @return @c true if this ASTNode is well-formed, @c false otherwise.
*/
+ LIBSBML_EXTERN
bool isWellFormedASTNode() const;
@@ -1614,6 +1615,7 @@
* @return @c true if this ASTNode is has appropriate number of children
* for it's type, @c false otherwise.
*/
+ LIBSBML_EXTERN
bool hasCorrectNumberArguments() const;
Modified: branches/libsbml-5/src/sbml/SBase.h
===================================================================
--- branches/libsbml-5/src/sbml/SBase.h 2010-11-25 18:53:12 UTC (rev 12221)
+++ branches/libsbml-5/src/sbml/SBase.h 2010-11-25 21:12:18 UTC (rev 12222)
@@ -156,7 +156,7 @@
class SBasePlugin;
/** @cond doxygen-libsbml-internal */
-class SBMLConstructorException : public std::invalid_argument
+class LIBSBML_EXTERN SBMLConstructorException : public std::invalid_argument
{
public:
Modified: branches/libsbml-5/src/xml/XMLTokenizer.h
===================================================================
--- branches/libsbml-5/src/xml/XMLTokenizer.h 2010-11-25 18:53:12 UTC (rev 12221)
+++ branches/libsbml-5/src/xml/XMLTokenizer.h 2010-11-25 21:12:18 UTC (rev 12222)
@@ -43,7 +43,7 @@
class LIBLAX_EXTERN XMLToken;
-class XMLTokenizer : public XMLHandler
+class LIBSBML_EXTERN XMLTokenizer : public XMLHandler
{
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-25 18:53:18
|
Revision: 12221
http://sbml.svn.sourceforge.net/sbml/?rev=12221&view=rev
Author: sarahkeating
Date: 2010-11-25 18:53:12 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
got the <cn> with a <sep/> working although not totally as I would like
Modified Paths:
--------------
trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng 2010-11-25 17:45:22 UTC (rev 12220)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng 2010-11-25 18:53:12 UTC (rev 12221)
@@ -42,9 +42,53 @@
<data type="string"/>
</define>
+<define name="cn_notype.datatype">
+ <ref name="mathml_attrib"/>
+ <data type="double"/>
+</define>
+
+ <define name="cn_integer.datatype">
+ <ref name="mathml_attrib"/>
+ <attribute name="type">
+ <value type="NMTOKEN">integer</value>
+ </attribute>
+ <data type="integer"/>
+ </define>
+
+ <define name="cn_real.datatype">
+ <ref name="mathml_attrib"/>
+ <attribute name="type">
+ <value type="NMTOKEN">real</value>
+ </attribute>
+ <data type="double"/>
+ </define>
+
+ <define name="double.datatype">
+ <data type="double"/>
+ </define>
+
+ <define name="cn_exponent.datatype">
+ <ref name="mathml_attrib"/>
+ <attribute name="type">
+ <choice>
+ <value type="NMTOKEN">e-notation</value>
+ <value type="NMTOKEN">rational</value>
+ </choice>
+ </attribute>
+<text/>
+ <element name="sep">
+ <empty/>
+ </element>
+<text/>
+ </define>
+
<define name="cn.datatype">
- <ref name="cn_attrib"/>
- <data type="double"></data>
+ <choice>
+ <ref name="cn_notype.datatype"/>
+ <ref name="cn_integer.datatype"/>
+ <ref name="cn_real.datatype"/>
+ <ref name="cn_exponent.datatype"/>
+ </choice>
</define>
<define name="true.datatype">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-25 17:45:29
|
Revision: 12220
http://sbml.svn.sourceforge.net/sbml/?rev=12220&view=rev
Author: fbergmann
Date: 2010-11-25 17:45:22 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
- fixed typo (caught by nico)
Modified Paths:
--------------
branches/libsbml-5/src/sbml/SBMLReader.h
Modified: branches/libsbml-5/src/sbml/SBMLReader.h
===================================================================
--- branches/libsbml-5/src/sbml/SBMLReader.h 2010-11-25 13:14:14 UTC (rev 12219)
+++ branches/libsbml-5/src/sbml/SBMLReader.h 2010-11-25 17:45:22 UTC (rev 12220)
@@ -135,7 +135,7 @@
* appear first. The error code @if clike (a value drawn from the enumeration
* #XMLErrorCode_t) @endif can provide a clue about what happened. For example,
* a file might be unreadable (either because it does not actually exist
- * or because the user does not have the necessary access priviledges to
+ * or because the user does not have the necessary access privileges to
* read it) or some sort of file operation error may have been reported
* by the underlying operating system. Callers can check for these
* situations using a program fragment such as the following:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-25 13:14:22
|
Revision: 12219
http://sbml.svn.sourceforge.net/sbml/?rev=12219&view=rev
Author: sarahkeating
Date: 2010-11-25 13:14:14 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
tidies up and added comments
Modified Paths:
--------------
trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-attributes.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-functions.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-hyperbolic.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-logical.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-node.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-operators.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-piecewise.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-relational.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-trig.rng
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -5,10 +5,16 @@
<!-- the apply element
this is all elements that can immediately follow an apply tag
- followed by at least one node -->
+ the element must then be followed by at least one node
- <define name="apply.datatype">
-
+ <apply>
+ <one of the elements listed below/>
+ <some node to which the function should be applied/>
+ </apply>
+
+-->
+
+ <define name="apply.datatype">
<choice>
<element name="ci">
<ref name="ci.datatype"/>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-attributes.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-attributes.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-attributes.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,17 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- attributes
+ these are the sets of attributes that apply to different elements
+
+ mathml_attrib: class, style, id which are optionally on all mathml elements
+
+ annotation_attrib: encoding required on annotation or annotation-xml
+
+ cn_attrib: type optionally on a cn element but restricted to
+ integer; rational; real; exponential
+ -->
+
<define name="mathml_attrib" combine="interleave">
<optional>
<attribute name="class">
@@ -42,5 +53,4 @@
</optional>
</define>
-
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,17 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<!-- basic types
+ these are elements that can occur alone within a math element
+
+ <math>
+ <one of the elements listed below/>
+ </math>
+
+ These elements are: csymbol, cn, ci, true, false
+ notanumber, pi, infinity, exponentiale
+-->
+
<define name="csymbolURI.datatype">
<choice>
<value type="string">http://www.sbml.org/sbml/symbols/time</value>
@@ -59,5 +70,37 @@
<define name="exponentiale.datatype">
<ref name="mathml_attrib"/>
</define>
+
+<define name="basetypes.datatype" combine="choice">
+ <choice>
+ <element name="csymbol">
+ <ref name="csymbol.datatype"></ref>
+ </element>
+ <element name="ci">
+ <ref name="ci.datatype"></ref>
+ </element>
+ <element name="cn">
+ <ref name="cn.datatype"/>
+ </element>
+ <element name="true">
+ <ref name="true.datatype"></ref>
+ </element>
+ <element name="false">
+ <ref name="false.datatype"></ref>
+ </element>
+ <element name="notanumber">
+ <ref name="notanumber.datatype"></ref>
+ </element>
+ <element name="pi">
+ <ref name="pi.datatype"></ref>
+ </element>
+ <element name="infinity">
+ <ref name="infinity.datatype"></ref>
+ </element>
+ <element name="exponentiale">
+ <ref name="exponentiale.datatype"></ref>
+ </element>
+ </choice>
+</define>
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-functions.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-functions.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-functions.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,12 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<!-- functions
+ These are other mathematical functions that may follow an apply tag.
+
+ Currently these are: abs, ceiling, exp, factorial, floor, ln, log, root
+-->
+
<define name="abs.datatype">
<ref name="mathml_attrib"/>
</define>
@@ -39,12 +45,11 @@
<element name="root">
<ref name="rootbase.datatype"/>
</element>
- <choice>
+ <optional>
<element name="degree">
<ref name="degree.datatype"/>
</element>
- <empty/>
- </choice>
+ </optional>
</define>
<define name="log_base.datatype">
@@ -59,12 +64,11 @@
<element name="log">
<ref name="log_base.datatype"/>
</element>
- <choice>
+ <optional>
<element name="logbase">
<ref name="logbase_base.datatype"/>
</element>
- <empty/>
- </choice>
+ </optional>
</define>
<define name="functions" combine="choice">
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-hyperbolic.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-hyperbolic.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-hyperbolic.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,10 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- hyperbolic
+ these are hyperbolic functions that may follow an apply element
+ -->
+
<define name="sinh.datatype">
<ref name="mathml_attrib"/>
</define>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -2,12 +2,28 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+<!-- lambda
+ This is the lambda function that is only allowed in the
+ functionDefinition math element of sbml.
+
+ The lambda element contains 0 or more bvar elements and a node
+ representing the function.
+
+ <lambda>
+ <bvar> <ci> x </ci> </bvar>
+ <apply> - node with the function
+
+ The math element of a functionDefinition must contain either a
+ lambda element or a semantics element containing a lambda.
+ Here these options have been called a 'lambda' datatype.
+-->
<define name="bvar.datatype">
<ref name="mathml_attrib"/>
<element name="ci">
- <ref name="ci.datatype"/>
- </element>
+ <ref name="ci.datatype"/>
+ </element>
</define>
<define name="lambda_base.datatype">
@@ -32,4 +48,5 @@
</element>
</choice>
</define>
+
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-logical.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-logical.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-logical.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,12 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<!-- logical
+ These are logical functions that may follow an apply
+
+ Currently these are: and, not, or, xor
+-->
+
<define name="and.datatype">
<ref name="mathml_attrib"/>
</define>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Root Element (math) -->
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<!-- math element
+ This is the root element
+
+ In sbml a math element can contain either a node or a lambda
+ element.
+-->
+
<start combine="interleave">
<element name="math">
<choice>
@@ -14,5 +19,4 @@
</element>
</start>
-
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-node.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-node.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-node.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,44 +3,32 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<!-- node
+ This defines the element that occurs inside the math element
+ with the exception of the lambda element that is treated
+ separately.
+
+ It includes an apply element, those elements that can occur
+ alone within a math element (see mml-basetypes), semantics & piecewise
+
+ NOTE: the node.datatype does not have any attributes attached as these are on
+ the individual elements. We also define a nodeContainer.datatype; which is
+ essentially a node with attributes to facilitate the use of subfunctions
+ degree and logbase for the root and log functions.
+-->
+
<define name="node.datatype" combine="choice">
<choice>
<element name="apply">
- <ref name="apply.datatype"></ref>
+ <ref name="apply.datatype"/>
</element>
- <element name="csymbol">
- <ref name="csymbol.datatype"></ref>
- </element>
- <element name="ci">
- <ref name="ci.datatype"></ref>
- </element>
- <element name="cn">
- <ref name="cn.datatype"/>
- </element>
- <element name="true">
- <ref name="true.datatype"></ref>
- </element>
- <element name="false">
- <ref name="false.datatype"></ref>
- </element>
- <element name="notanumber">
- <ref name="notanumber.datatype"></ref>
- </element>
- <element name="pi">
- <ref name="pi.datatype"></ref>
- </element>
- <element name="infinity">
- <ref name="infinity.datatype"></ref>
- </element>
- <element name="exponentiale">
- <ref name="exponentiale.datatype"></ref>
- </element>
<element name="semantics">
- <ref name="semantics.datatype"></ref>
+ <ref name="semantics.datatype"/>
</element>
<element name="piecewise">
- <ref name="piecewise.datatype"></ref>
+ <ref name="piecewise.datatype"/>
</element>
+ <ref name="basetypes.datatype"/>
</choice>
</define>
@@ -48,4 +36,5 @@
<ref name="node.datatype"/>
<ref name="mathml_attrib"/>
</define>
+
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-operators.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-operators.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-operators.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,12 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- operators
+ These are mathematical operator functions that may follow an apply tag.
+
+ Currently these are: plus, minus, times, divide, power
+ -->
+
<define name="plus.datatype">
<ref name="mathml_attrib"/>
</define>
@@ -26,19 +32,19 @@
<define name="operators" combine="choice">
<choice>
<element name="plus">
- <ref name="plus.datatype"></ref>
+ <ref name="plus.datatype"/>
</element>
<element name="minus">
- <ref name="minus.datatype"></ref>
+ <ref name="minus.datatype"/>
</element>
<element name="times">
- <ref name="times.datatype"></ref>
+ <ref name="times.datatype"/>
</element>
<element name="divide">
- <ref name="divide.datatype"></ref>
+ <ref name="divide.datatype"/>
</element>
<element name="power">
- <ref name="power.datatype"></ref>
+ <ref name="power.datatype"/>
</element>
</choice>
</define>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-piecewise.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-piecewise.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-piecewise.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -2,6 +2,19 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+ <!-- piecewise
+ These are the elements that make up a piecewise function.
+
+ <piecewise>
+ <piece - 0 or more>
+ <must contain two nodes/>
+ </piece>
+ <otherwise - optional>
+ <node>
+ </otherwise>
+ </piecewise>
+ -->
<define name="piece.datatype">
<ref name="mathml_attrib"/>
@@ -21,11 +34,11 @@
<ref name="piece.datatype"/>
</element>
</zeroOrMore>
- <choice>
+ <optional>
<element name="otherwise">
<ref name="otherwise.datatype"/>
</element>
- <empty/>
- </choice>
+ </optional>
</define>
+
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-relational.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-relational.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-relational.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,12 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- relational
+ These are relational mathematical functions that may follow an apply tag.
+
+ Currently these are: eq, geq, gt, leq, lt, neq,
+ -->
+
<define name="eq.datatype">
<ref name="mathml_attrib"/>
</define>
@@ -30,22 +36,22 @@
<define name="relational" combine="choice">
<choice>
<element name="eq">
- <ref name="eq.datatype"></ref>
+ <ref name="eq.datatype"/>
</element>
<element name="neq">
- <ref name="neq.datatype"></ref>
+ <ref name="neq.datatype"/>
</element>
<element name="gt">
- <ref name="gt.datatype"></ref>
+ <ref name="gt.datatype"/>
</element>
<element name="lt">
- <ref name="lt.datatype"></ref>
+ <ref name="lt.datatype"/>
</element>
<element name="geq">
- <ref name="geq.datatype"></ref>
+ <ref name="geq.datatype"/>
</element>
<element name="leq">
- <ref name="leq.datatype"></ref>
+ <ref name="leq.datatype"/>
</element>
</choice>
</define>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,21 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- semantics
+ These are the elements that make up a semantics function.
+
+ <semantics>
+ <node - containing the math/>
+ 1 or more of either/both (can be mutiple elements)
+ <annotation/>
+ <annotation-xml/>
+ </semantics>
+
+NOTE: Since the sbml functionDefinition can use a semantics
+ element containing a lambda element this type is also defined
+ here as lambda is not considered a node.
+ -->
+
<define name="annotation.datatype">
<ref name="annotation_attrib"/>
<data type="string"/>
@@ -50,8 +65,8 @@
</attribute>
</optional>
<element name="lambda">
- <ref name="lambda_base.datatype"/>
- </element>
+ <ref name="lambda_base.datatype"/>
+ </element>
<oneOrMore>
<choice>
<element name="annotation">
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-trig.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-trig.rng 2010-11-25 09:21:54 UTC (rev 12218)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-trig.rng 2010-11-25 13:14:14 UTC (rev 12219)
@@ -3,6 +3,10 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- trigonometric
+ these are trigonometric functions that may follow an apply element
+ -->
+
<define name="sin.datatype">
<ref name="mathml_attrib"/>
</define>
@@ -54,40 +58,40 @@
<define name="trig" combine="choice">
<choice>
<element name="sin">
- <ref name="sin.datatype"></ref>
+ <ref name="sin.datatype"/>
</element>
<element name="cos">
- <ref name="cos.datatype"></ref>
+ <ref name="cos.datatype"/>
</element>
<element name="tan">
- <ref name="tan.datatype"></ref>
+ <ref name="tan.datatype"/>
</element>
<element name="sec">
- <ref name="sec.datatype"></ref>
+ <ref name="sec.datatype"/>
</element>
<element name="csc">
- <ref name="csc.datatype"></ref>
+ <ref name="csc.datatype"/>
</element>
<element name="cot">
- <ref name="cot.datatype"></ref>
+ <ref name="cot.datatype"/>
</element>
<element name="arcsin">
- <ref name="arcsin.datatype"></ref>
+ <ref name="arcsin.datatype"/>
</element>
<element name="arccos">
- <ref name="arccos.datatype"></ref>
+ <ref name="arccos.datatype"/>
</element>
<element name="arctan">
- <ref name="arctan.datatype"></ref>
+ <ref name="arctan.datatype"/>
</element>
<element name="arcsec">
- <ref name="arcsec.datatype"></ref>
+ <ref name="arcsec.datatype"/>
</element>
<element name="arccsc">
- <ref name="arccsc.datatype"></ref>
+ <ref name="arccsc.datatype"/>
</element>
<element name="arccot">
- <ref name="arccot.datatype"></ref>
+ <ref name="arccot.datatype"/>
</element>
</choice>
</define>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2010-11-25 09:22:01
|
Revision: 12218
http://sbml.svn.sourceforge.net/sbml/?rev=12218&view=rev
Author: sarahkeating
Date: 2010-11-25 09:21:54 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
added lambda element
Modified Paths:
--------------
trunk/specifications/RelaxNG/sbml-mathml/mathml2.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng
trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng
Added Paths:
-----------
trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng
Modified: trunk/specifications/RelaxNG/sbml-mathml/mathml2.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mathml2.rng 2010-11-25 08:06:56 UTC (rev 12217)
+++ trunk/specifications/RelaxNG/sbml-mathml/mathml2.rng 2010-11-25 09:21:54 UTC (rev 12218)
@@ -3,33 +3,9 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.w3.org/1998/Math/MathML">
-<!--
-<include href="mml-content-all.rng"/>
-<include href="mml-content-attrib.rng"/>
-<include href="mml-content-construct.rng"/>
-<include href="mml-content-leaf.rng"/>
-<include href="mml-content-operators.rng"/>
-<include href="mml-content-others.rng"/>
-<include href="mml-content-quantifiers.rng"/>
-<include href="mml-content-relations.rng"/>
-<include href="mml-content-semantics.rng"/>
-<include href="mml-content-specials.rng"/>
-<include href="mml-content-symbols.rng"/>
-<include href="mml-datatypes.rng"/>
-<include href="mml-framework.rng"/>
-<include href="mml-math.rng"/>
-<include href="mml-pres-action.rng"/>
-<include href="mml-pres-all.rng"/>
-<include href="mml-pres-attrib.rng"/>
-<include href="mml-pres-content.rng"/>
-<include href="mml-pres-empty.rng"/>
-<include href="mml-pres-layout-empty.rng"/>
-<include href="mml-pres-layout.rng"/>
-<include href="mml-pres-scripts-empty.rng"/>
-<include href="mml-pres-scripts.rng"/>
-<include href="mml-pres-tables.rng"/>
--->
+<!-- files included in the sbml-mathml schema -->
+
<include href="mml-math.rng"/>
<include href="mml-attributes.rng"/>
<include href="mml-basetypes.rng"/>
@@ -43,6 +19,6 @@
<include href="mml-functions.rng"/>
<include href="mml-semantics.rng"/>
<include href="mml-piecewise.rng"/>
-
-
+ <include href="mml-lambda.rng"/>
+
</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng 2010-11-25 08:06:56 UTC (rev 12217)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-apply.rng 2010-11-25 09:21:54 UTC (rev 12218)
@@ -3,6 +3,10 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+<!-- the apply element
+ this is all elements that can immediately follow an apply tag
+ followed by at least one node -->
+
<define name="apply.datatype">
<choice>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng 2010-11-25 08:06:56 UTC (rev 12217)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-basetypes.rng 2010-11-25 09:21:54 UTC (rev 12218)
@@ -23,6 +23,11 @@
<define name="ci.datatype">
<ref name="mathml_attrib"/>
+ <optional>
+ <attribute name="definitionURL">
+ <data type="anyURI"/>
+ </attribute>
+ </optional>
<data type="string"/>
</define>
Added: trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng (rev 0)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-lambda.rng 2010-11-25 09:21:54 UTC (rev 12218)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+<define name="bvar.datatype">
+ <ref name="mathml_attrib"/>
+ <element name="ci">
+ <ref name="ci.datatype"/>
+ </element>
+</define>
+
+ <define name="lambda_base.datatype">
+ <ref name="mathml_attrib"/>
+ <zeroOrMore>
+ <element name="bvar">
+ <ref name="bvar.datatype"/>
+ </element>
+ </zeroOrMore>
+ <ref name="node.datatype"/>
+ </define>
+
+ <!-- lambda is either just a lambda or a semantics element
+ containing a lambda -->
+ <define name="lambda.datatype">
+ <choice>
+ <element name="lambda">
+ <ref name="lambda_base.datatype"/>
+ </element>
+ <element name="semantics">
+ <ref name="semantics_lambda.datatype"/>
+ </element>
+ </choice>
+ </define>
+</grammar>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng 2010-11-25 08:06:56 UTC (rev 12217)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-math.rng 2010-11-25 09:21:54 UTC (rev 12218)
@@ -7,7 +7,10 @@
<start combine="interleave">
<element name="math">
- <ref name="node.datatype"/>
+ <choice>
+ <ref name="node.datatype"/>
+ <ref name="lambda.datatype"/>
+ </choice>
</element>
</start>
Modified: trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng
===================================================================
--- trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng 2010-11-25 08:06:56 UTC (rev 12217)
+++ trunk/specifications/RelaxNG/sbml-mathml/mml-semantics.rng 2010-11-25 09:21:54 UTC (rev 12218)
@@ -40,7 +40,28 @@
</element>
</choice>
</oneOrMore>
-
-
+ </define>
+
+ <define name="semantics_lambda.datatype">
+ <ref name="mathml_attrib"/>
+ <optional>
+ <attribute name="definitionURL">
+ <data type="anyURI"/>
+ </attribute>
+ </optional>
+ <element name="lambda">
+ <ref name="lambda_base.datatype"/>
+ </element>
+ <oneOrMore>
+ <choice>
+ <element name="annotation">
+ <ref name="annotation.datatype"/>
+ </element>
+ <element name="annotation-xml">
+ <ref name="annotation-xml.datatype"/>
+ </element>
+ </choice>
+ </oneOrMore>
</define>
+
</grammar>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-25 08:07:06
|
Revision: 12217
http://sbml.svn.sourceforge.net/sbml/?rev=12217&view=rev
Author: fbergmann
Date: 2010-11-25 08:06:56 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
- added first version of CMake build system. Tested on: OS X, Ubuntu, Win32, Win64, Cygwin and MingW.
Added Paths:
-----------
branches/libsbml-5/CMakeLists.txt
branches/libsbml-5/common.cmake
branches/libsbml-5/docs/CMakeLists.txt
branches/libsbml-5/docs/FindDoxygen.cmake
branches/libsbml-5/docs/src/doxygen-config-c.txt.cmake
branches/libsbml-5/docs/src/doxygen-config-common.txt.cmake
branches/libsbml-5/docs/src/doxygen-config-cpp.txt.cmake
branches/libsbml-5/docs/src/doxygen-config-perl.txt.cmake
branches/libsbml-5/docs/src/doxygen-config-python.txt.cmake
branches/libsbml-5/examples/CMakeLists.txt
branches/libsbml-5/examples/c/CMakeLists.txt
branches/libsbml-5/examples/c++/CMakeLists.txt
branches/libsbml-5/examples/csharp/CMakeLists.txt
branches/libsbml-5/examples/java/CMakeLists.txt
branches/libsbml-5/groups-package.cmake
branches/libsbml-5/layout-package.cmake
branches/libsbml-5/src/CMakeLists.txt
branches/libsbml-5/src/annotation/test/CMakeLists.txt
branches/libsbml-5/src/bindings/CMakeLists.txt
branches/libsbml-5/src/bindings/csharp/CMakeLists.txt
branches/libsbml-5/src/bindings/java/CMakeLists.txt
branches/libsbml-5/src/bindings/matlab/CMakeLists.txt
branches/libsbml-5/src/bindings/matlab/FindMatlab.cmake
branches/libsbml-5/src/bindings/octave/CMakeLists.txt
branches/libsbml-5/src/bindings/octave/FindOctave.cmake
branches/libsbml-5/src/bindings/perl/CMakeLists.txt
branches/libsbml-5/src/bindings/python/CMakeLists.txt
branches/libsbml-5/src/bindings/ruby/CMakeLists.txt
branches/libsbml-5/src/common/libsbml-config-unix.h.cmake
branches/libsbml-5/src/common/libsbml-version.h.cmake
branches/libsbml-5/src/groups-package.cmake
branches/libsbml-5/src/layout-package.cmake
branches/libsbml-5/src/math/test/CMakeLists.txt
branches/libsbml-5/src/packages/groups/extension/test/CMakeLists.txt
branches/libsbml-5/src/packages/layout/sbml/test/CMakeLists.txt
branches/libsbml-5/src/sbml/test/CMakeLists.txt
branches/libsbml-5/src/units/test/CMakeLists.txt
branches/libsbml-5/src/util/test/CMakeLists.txt
branches/libsbml-5/src/validator/test/CMakeLists.txt
branches/libsbml-5/src/xml/test/CMakeLists.txt
Added: branches/libsbml-5/CMakeLists.txt
===================================================================
--- branches/libsbml-5/CMakeLists.txt (rev 0)
+++ branches/libsbml-5/CMakeLists.txt 2010-11-25 08:06:56 UTC (rev 12217)
@@ -0,0 +1,599 @@
+####################################################################
+#
+# CMake Build Script for libsbml
+#
+# $Author$
+# $Id$
+# $HeadURL$
+#
+
+
+cmake_minimum_required(VERSION 2.8)
+project(libsbml)
+
+include (CMakeTestCCompiler)
+include (CheckCSourceCompiles)
+include (CheckCXXSourceCompiles)
+include (CheckStructHasMember)
+include (CheckLibraryExists)
+include (CheckFunctionExists)
+include (CheckCCompilerFlag)
+include (CheckCSourceRuns)
+include (CheckSymbolExists)
+include (CheckTypeSize)
+
+
+####################################################################
+#
+# Set up version information, it might be better to just write it here
+# rather than parsing VERSION.txt
+#
+SET(LIBSBML_VERSION_MAJOR 5)
+SET(LIBSBML_VERSION_MINOR 0)
+SET(LIBSBML_VERSION_PATCH 0)
+SET(LIBSBML_VERSION_RELEASE "-a1")
+
+SET(LIBSBML_VERSION_NUMERIC 50000)
+SET(PACKAGE_VERSION "${LIBSBML_VERSION_MAJOR}.${LIBSBML_VERSION_MINOR}.${LIBSBML_VERSION_PATCH}${LIBSBML_VERSION_RELEASE}")
+
+
+####################################################################
+#
+# the next lines configure the parameters for packaging the binaries
+# they can be invoked with: make package / nmake package or by using
+# cpack -G zip|deb|rpm|dmg|nsis
+#
+
+INCLUDE(InstallRequiredSystemLibraries)
+
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An API library for reading/writing/manipulating SBML")
+SET(CPACK_PACKAGE_NAME "libSBML")
+SET(CPACK_PACKAGE_VENDOR "The SBML Team")
+SET(CPACK_PACKAGE_CONTACT "LibSBML Team <lib...@ca...>")
+SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${LIBSBML_VERSION_MAJOR}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${LIBSBML_VERSION_MINOR}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${LIBSBML_VERSION_PATCH}")
+INCLUDE(CPack)
+
+
+
+
+####################################################################
+#
+# Here we have the main configuration options for libsbml
+#
+
+# build static / shared library
+option(BUILD_SHARED_LIBS "Build shared library (Set to OFF to build static libraries)" OFF)
+
+
+# should we compile examples
+option(WITH_EXAMPLES "Compile Examples" OFF )
+
+# which language bindings should be build
+option(WITH_CSHARP "Generate C# bindings" OFF )
+option(WITH_JAVA "Generate Java bindings" OFF )
+option(WITH_PYTHON "Generate python bindings" OFF )
+option(WITH_PERL "Generate perl bindings" OFF )
+option(WITH_RUBY "Generate ruby bindings" OFF )
+option(WITH_OCTAVE "Generate octave bindings" OFF )
+option(WITH_MATLAB "Generate matlab bindings" OFF )
+
+# use compression
+option(WITH_BZIP2 "Enable Bzip2 compression" ON )
+option(WITH_ZLIB "Enable zip compression" ON )
+
+# enable the generation of unit tests. If enabled all test runners
+# will be created and can be run with make test, or ctest
+option(WITH_CHECK "Unit tests" OFF )
+
+# choose the xml parsing library to be used
+option(WITH_EXPAT "Use Expat XML parser" OFF )
+option(WITH_LIBXML "Use libxml XML parser" ON )
+option(WITH_XERCES "Use xerces XML parser" OFF )
+
+# use C++ namespace
+option(WITH_CPP_NAMESPACE "Use C++ namespace for libsbml" OFF)
+
+# generate documentation
+option(WITH_DOXYGEN "Generate Documentation" OFF )
+
+# re-generate the swig bindings? This really should be on by default
+# otherwise one might have the wrong wrapper code without support for
+# the libsbml packages one wants.
+option(WITH_SWIG "Regenerate SWIG bindings" ON )
+
+# set build type default
+set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS are used), Debug, Release, RelWithDebInfo, MinSizeRel" FORCE )
+
+####################################################################
+#
+# If with SWIG is selected we need to find swig
+#
+
+if(WITH_CPP_NAMESPACE)
+ add_definitions(-DLIBSBML_USE_CPP_NAMESPACE)
+endif()
+
+if(WITH_SWIG)
+
+ find_program(SWIG_EXECUTABLE
+ NAMES swig
+ PATHS c:/swigwin-2.0.1 c:/swigwin-2.0.0 c:/swigwin-1.3.40 /usr/bin /usr/local/bin
+ )
+ set(SWIG_EXTRA_ARGS)
+
+endif(WITH_SWIG)
+
+
+####################################################################
+#
+# Locate expat if needed
+#
+set(LIBSBML_XML_LIBRARY)
+set(LIBSBML_XML_LIBRARY_INCLUDE)
+set(LIBSBML_XML_LIBRARY_LIBS)
+if(WITH_EXPAT)
+
+ find_library(LIBEXPAT_LIBRARY
+ NAMES libexpat.lib expat
+ PATHS /usr/lib /usr/local/lib
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dependencies/lib
+ )
+
+ find_path(LIBEXPAT_INCLUDE_DIR
+ NAMES expat.h
+ PATHS /usr/include /usr/local/include
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/dependencies/include
+ )
+
+ add_definitions( -DUSE_EXPAT )
+
+ set(LIBSBML_XML_LIBRARY "expat")
+ set(LIBSBML_XML_LIBRARY_INCLUDE ${LIBEXPAT_INCLUDE_DIR})
+ set(LIBSBML_XML_LIBRARY_LIBS ${LIBEXPAT_LIBRARY})
+
+endif(WITH_EXPAT)
+
+####################################################################
+#
+# Locate Libxml2 if needed
+#
+
+if(WITH_LIBXML)
+
+ find_library(LIBXML_LIBRARY
+ NAMES libxml2.lib xml2
+ PATHS /usr/lib /usr/local/lib
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dependencies/lib
+ )
+
+ find_path(LIBXML_INCLUDE_DIR
+ NAMES libxml/parser.h
+ PATHS /usr/include /usr/local/include
+ /usr/include/libxml2
+ /usr/local/include/libxml2
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/dependencies/include
+ )
+
+ add_definitions( -DUSE_LIBXML )
+
+ set(LIBSBML_XML_LIBRARY "libxml2")
+ set(LIBSBML_XML_LIBRARY_INCLUDE ${LIBXML_INCLUDE_DIR})
+ set(LIBSBML_XML_LIBRARY_LIBS ${LIBXML_LIBRARY})
+
+endif(WITH_LIBXML)
+
+
+####################################################################
+#
+# Locate xerces
+
+if(WITH_XERCES)
+ add_definitions( -DUSE_XERCES )
+ find_library(XERCES_LIBRARY
+ NAMES xerces-c_3.lib xerces-c
+ PATHS /usr/lib /usr/local/lib
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dependencies/lib
+ )
+
+ find_path(XERCES_INCLUDE_DIR
+ NAMES xercesc/parsers/XercesDOMParser.hpp
+ PATHS /usr/include /usr/local/include
+ /usr/include/xercesc
+ /usr/local/include/xercesc
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/dependencies/include
+ )
+
+ set(LIBSBML_XML_LIBRARY "xerces-c")
+ set(LIBSBML_XML_LIBRARY_INCLUDE ${XERCES_INCLUDE_DIR})
+ set(LIBSBML_XML_LIBRARY_LIBS ${XERCES_LIBRARY})
+
+
+endif(WITH_XERCES)
+
+####################################################################
+#
+# Locate bz2
+#
+
+if(WITH_BZIP2)
+
+ find_library(LIBBZ_LIBRARY
+ NAMES bzip2.lib bz2
+ PATHS /usr/lib /usr/local/lib
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dependencies/lib
+ )
+
+ find_path(LIBBZ_INCLUDE_DIR
+ NAMES bzlib.h bzip2/bzlib.h
+ PATHS /usr/include /usr/local/include
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/dependencies/include
+ )
+
+ add_definitions( -DUSE_BZ2 )
+
+endif(WITH_BZIP2)
+
+####################################################################
+#
+# Locate zlib
+#
+
+if(WITH_ZLIB)
+
+ find_library(LIBZ_LIBRARY
+ NAMES zdll.lib z zlib.lib
+ PATHS /usr/lib /usr/local/lib
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dependencies/lib
+ )
+
+ find_path(LIBZ_INCLUDE_DIR
+ NAMES zlib.h zlib/zlib.h
+ PATHS /usr/include /usr/local/include
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/dependencies/include
+ )
+
+ add_definitions( -DUSE_ZLIB )
+
+endif(WITH_ZLIB)
+
+####################################################################
+#
+# Find the C# compiler to use and set name for resulting library
+#
+
+if(WITH_CSHARP)
+ find_program(CSHARP_COMPILER
+ NAMES gmcs csc
+ PATHS C:/Windows/Microsoft.NET/Framework/v2.0.50727/ /usr/bin /usr/local/bin
+ )
+ if(UNIX)
+ set(LIBSBML_CS_LIBRARY sbmlcs)
+ else()
+ set(LIBSBML_CS_LIBRARY libsbmlcs)
+ if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
+ # mark libsbml library as x86
+ set(CSHARP_EXTRA_ARGS -platform:x86 )
+ elseif(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+ # mark libsbml library as x64
+ set(CSHARP_EXTRA_ARGS -platform:x64 )
+ endif()
+ endif()
+
+endif(WITH_CSHARP)
+
+####################################################################
+#
+# Enable support for testing ... can be invoked by running ctest
+# or make test
+#
+
+if(WITH_CHECK)
+
+ ENABLE_TESTING()
+
+ find_library(LIBCHECK_LIBRARY
+ NAMES check libcheck
+ PATHS /usr/lib /usr/local/lib ${CMAKE_SOURCE_DIR}/dependencies/lib
+ )
+
+ find_path(LIBCHECK_INCLUDE_DIR
+ NAMES check.h
+ PATHS /usr/include /usr/local/include ${CMAKE_SOURCE_DIR}/dependencies/include
+ )
+
+endif(WITH_CHECK)
+
+
+####################################################################
+#
+# Need some variables set up, such as the name for the libSBML
+# library and the Path and file separator characters
+#
+
+if(UNIX)
+ set(PATH_SEP "/")
+ set(FILE_SEP ":")
+ set(LIBSBML_LIBRARY sbml)
+else()
+ set(PATH_SEP "\\")
+ set(FILE_SEP ";")
+ if (MINGW)
+ set(LIBSBML_LIBRARY sbml)
+ else()
+ set(LIBSBML_LIBRARY libsbml)
+ endif()
+endif()
+
+####################################################################
+#
+# Set up remaining variables, add option for universal binaries
+#
+set(BUILD_DEFINITIONS)
+if(UNIX)
+ if(APPLE)
+ add_definitions(-DMACOSX)
+ set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DMACOSX")
+ #create universal binaries
+ option(ENABLE_UNIVERSAL "Create Universal Binaries" ON)
+ if(ENABLE_UNIVERSAL)
+ set(CMAKE_OSX_ARCHITECTURES "ppc" "i386" "x86_64")
+ endif(ENABLE_UNIVERSAL)
+ else(APPLE)
+ add_definitions(-DLINUX)
+ set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DLINUX")
+ endif(APPLE)
+ add_definitions( -DPACKAGE_VERSION=\"${PACKAGE_VERSION}\" -DPACKAGE_NAME=\"${PROJECT_NAME}\")
+ set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DPACKAGE_VERSION=\"${PACKAGE_VERSION}\" -DPACKAGE_NAME=\"${PROJECT_NAME}\"")
+
+else(UNIX)
+ add_definitions(-DWIN32 -DLIBSBML_EXPORTS -DLIBLAX_EXPORTS)
+ set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DWIN32 -DLIBSBML_EXPORTS -DLIBLAX_EXPORTS")
+ if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS")
+ option(WITH_STATIC_RUNTIME "Compile using the static MSVC Runtime" OFF)
+ if (WITH_STATIC_RUNTIME)
+ foreach(flag_var
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+
+ if(${flag_var} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif(${flag_var} MATCHES "/MD")
+ endforeach(flag_var)
+ add_definitions( -D_MT)
+ endif(WITH_STATIC_RUNTIME)
+
+ file(GLOB WIN32_BINARIES ${CMAKE_SOURCE_DIR}/dependencies/bin/*.dll)
+ INSTALL(FILES ${WIN32_BINARIES} DESTINATION bin)
+
+ elseif(CYGWIN)
+ add_definitions(-DCYGWIN)
+ set(BUILD_DEFINITIONS "${BUILD_DEFINITIONS} -DCYGWIN")
+ elseif(MINGW)
+ if(WITH_LIBXML)
+ # this is necessary to build with libxml2 on mingw
+ add_definitions(-DLIBXML_STATIC)
+ endif(WITH_LIBXML)
+ endif(MSVC)
+
+endif(UNIX)
+
+
+####################################################################
+#
+# Build the actual libSBML library
+#
+add_subdirectory(src)
+
+
+####################################################################
+#
+# Build examples if specified
+#
+if(WITH_EXAMPLES)
+
+ # code that builds the examples
+ add_subdirectory(examples)
+
+endif(WITH_EXAMPLES)
+
+
+####################################################################
+#
+# Include options for all libSBML packages
+#
+file(GLOB PACKAGE_OPTIONS "*package.cmake")
+foreach(package ${PACKAGE_OPTIONS})
+ include(${package})
+endforeach()
+
+if (WITH_DOXYGEN)
+ add_subdirectory(docs)
+endif()
+
+
+####################################################################
+#
+# Install documentation
+#
+if(NOT UNIX)
+
+set(DOCUMENTATION_FILES
+ COPYING.txt
+ FUNDING.txt
+ LICENSE.txt
+ NEWS.txt
+ README.txt
+ VERSION.txt
+)
+
+install(FILES ${DOCUMENTATION_FILES} DESTINATION .)
+endif()
+
+####################################################################
+#
+# Print Summary
+#
+
+message(STATUS "
+----------------------------------------------------------------------
+libSBML version ${PACKAGE_VERSION}
+----------------------------------------------------------------------
+
+More information and the latest version are available online at
+http://sbml.org/Software/libSBML
+
+Please report problems using the issue tracker at
+http://sbml.org/software/libsbml/issue-tracker
+
+To contact the developers directly, email lib...@ca...
+
+Configured on host "$ENV{COMPUTERNAME}" ${HOSTNAME}
+ host type = ${CMAKE_SYSTEM_NAME}
+ host operating system = ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}
+ host CPU architecture = ${CMAKE_SYSTEM_PROCESSOR}
+
+General build flags:
+ CC = ${CMAKE_C_COMPILER}
+ CXX = ${CMAKE_CXX_COMPILER}
+ CPPFLAGS = ${BUILD_DEFINITIONS}
+ CFLAGS = ${CMAKE_C_FLAGS}
+ CFLAGS_ARCH =
+ CXXFLAGS = ${CMAKE_CXX_FLAGS}
+ CXXFLAGS_ARCH =
+ LDFLAGS =
+ LDFLAGS_ARCH =
+ LIBS =
+
+XML parser library configuration:
+ XML library = ${LIBSBML_XML_LIBRARY}
+ CPPFLAGS for XML = -I${LIBSBML_XML_LIBRARY_INCLUDE}
+ LDFLAGS for XML =
+ LIBS for XML = ${LIBSBML_XML_LIBRARY_LIBS}
+
+Other libSBML configuration settings:
+ Installation $prefix = ${CMAKE_INSTALL_PREFIX}")
+
+
+
+if (UNIX)
+ if (APPLE)
+ message(STATUS " Value of $DYLD_LIBRARY_PATH = $ENV{DYLD_LIBRARY_PATH}")
+ else()
+ message(STATUS " Value of $LD_LIBRARY_PATH = $ENV{LD_LIBRARY_PATH}")
+ endif()
+endif()
+
+if (WITH_SWIG)
+ message(STATUS " Using SWIG = ${SWIG_EXECUTABLE}")
+endif()
+
+
+if (WITH_CSHARP)
+ message(STATUS " Using C# = ${CSHARP_COMPILER}")
+endif()
+
+if (WITH_JAVA)
+ message(STATUS " Using Java = ${Java_JAVA_EXECUTABLE}")
+endif()
+
+if (WITH_PYTHON)
+ message(STATUS " Using Python = ${PYTHON_EXECUTABLE}")
+endif()
+
+if (WITH_PERL)
+ message(STATUS " Using Perl = ${PERL_EXECUTABLE}")
+endif()
+
+if (WITH_RUBY)
+ message(STATUS " Using Ruby = ${RUBY_EXECUTABLE}")
+endif()
+
+if (WITH_OCTAVE)
+ message(STATUS " Using Octave = ${MKOCTFILE_EXECUTABLE}")
+endif()
+
+if (WITH_MATLAB)
+ message(STATUS " Using Matlab = ${MATLAB_ROOT_PATH}")
+endif()
+
+if (WITH_CHECK)
+ message(STATUS " Using LibCheck = ${LIBCHECK_LIBRARY}")
+endif()
+message(STATUS "
+")
+
+if (WITH_CPP_NAMESPACE)
+ message(STATUS " Using C++ namespace for libSBML (libsbml) = yes")
+else()
+ message(STATUS " Using C++ namespace for libSBML (libsbml) = no")
+endif()
+
+
+# print selected packages
+file(STRINGS ${CMAKE_BINARY_DIR}/CMakeCache.txt cache)
+
+set(last_line)
+foreach(line ${cache})
+
+ string(LENGTH "${line}" length)
+ if (${length} GREATER 7)
+ string(SUBSTRING "${line}" 0 7 start)
+ if ("${start}" STREQUAL "ENABLE_")
+ if ("${line}" MATCHES "^.*ON")
+ message(STATUS " ${last_line} = yes")
+ else()
+ message(STATUS " ${last_line} = no")
+ endif()
+ endif()
+
+ math(EXPR new_length "${length} - 2")
+ if (${new_length} GREATER 3)
+ string(SUBSTRING "${line}" 2 ${new_length} last_line)
+ endif()
+ else()
+ set(last_line "")
+ message(${line})
+ endif()
+endforeach()
+
+message(STATUS "
+")
+message(STATUS "Other potentially important settings:")
+if(WITH_ZLIB)
+ message(STATUS " Compression support is enabled for .zip and .gz files")
+else()
+ message(STATUS "
+Warning: reading/writing compressed SBML in .zip or .gz format in
+this copy of libSBML is not supported or has been disabled.
+If this was not your intention, please check the WITH_ZLIB
+option.")
+endif()
+
+if(WITH_BZIP2)
+ message(STATUS " Compression support is enabled for .bz2 files")
+else()
+ message(STATUS "
+Warning: reading/writing compressed SBML in .bz2 format in
+this copy of libSBML is not supported or has been disabled.
+If this was not your intention, please check the WITH_BZIP2
+option.")
+endif()
+
+message(STATUS "
+----------------------------------------------------------------------")
Added: branches/libsbml-5/common.cmake
===================================================================
--- branches/libsbml-5/common.cmake (rev 0)
+++ branches/libsbml-5/common.cmake 2010-11-25 08:06:56 UTC (rev 12217)
@@ -0,0 +1,81 @@
+####################################################################
+#
+# File of common macros for building libsbml
+#
+# $Author$
+# $Id$
+# $HeadURL$
+#
+
+####################################################################
+#
+# utility macro for copying files
+#
+macro(copy_files srcDir destDir pattern)
+ message(STATUS "Copying files from ${srcDir}")
+ make_directory(${destDir})
+
+ file(GLOB templateFiles RELATIVE ${srcDir} ${srcDir}/${pattern})
+ foreach(templateFile ${templateFiles})
+ set(srcTemplatePath ${srcDir}/${templateFile})
+ if(NOT IS_DIRECTORY ${srcTemplatePath})
+ #message(STATUS "Copying file ${templateFile}")
+ configure_file(
+ ${srcTemplatePath}
+ ${destDir}/${templateFile}
+ COPYONLY)
+ endif(NOT IS_DIRECTORY ${srcTemplatePath})
+ endforeach(templateFile)
+
+endmacro(copy_files)
+
+macro(copy_file srcFile destDir)
+ message(STATUS "Copying ${srcFile}")
+ make_directory(${destDir})
+ get_filename_component(name ${srcFile} NAME)
+
+ if(NOT IS_DIRECTORY ${srcFile})
+ configure_file(
+ ${srcFile}
+ ${destDir}/${name}
+ COPYONLY)
+ endif(NOT IS_DIRECTORY ${srcFile})
+
+endmacro(copy_file)
+
+macro(copy_file_to_subdir srcFile destDir)
+ get_filename_component(subdir ${srcFile} PATH)
+ get_filename_component(name ${srcFile} NAME)
+
+ make_directory(${destDir}/${subdir})
+ message(STATUS "Copying ${srcFile}")
+
+ if(NOT IS_DIRECTORY ${srcFile})
+ configure_file(
+ ${srcFile}
+ ${destDir}/${subdir}/${name}
+ COPYONLY)
+ endif(NOT IS_DIRECTORY ${srcFile})
+
+endmacro(copy_file_to_subdir)
+
+
+macro(remove_file srcFile)
+ if(EXISTS ${srcFile})
+ message(STATUS "Remove ${srcFile}")
+ file(REMOVE ${srcFile})
+ else()
+ message(STATUS "Cannot remove ${srcFile} it does not exist.")
+ endif()
+endmacro(remove_file)
+
+macro(remove_file_in_subdir srcFile baseDir)
+ get_filename_component(subdir ${srcFile} PATH)
+ get_filename_component(name ${srcFile} NAME)
+ if(EXISTS ${baseDir}/${subdir}/${name})
+ message(STATUS "Remove ${srcFile}")
+ file(REMOVE ${baseDir}/${subdir}/${name})
+ endif()
+endmacro(remove_file_in_subdir)
+
+
Added: branches/libsbml-5/docs/CMakeLists.txt
===================================================================
--- branches/libsbml-5/docs/CMakeLists.txt (rev 0)
+++ branches/libsbml-5/docs/CMakeLists.txt 2010-11-25 08:06:56 UTC (rev 12217)
@@ -0,0 +1,192 @@
+if (WITH_DOXYGEN)
+find_package(Doxygen)
+
+if (NOT EXISTS "${DOXYGEN_EXECUTABLE}")
+ message(FATAL_ERROR "Cannot generate documentation, please install doxygen / specify the DOXYGEN_EXECUTABLE.")
+endif()
+
+# disable dot if we don't have it
+set(HAVE_DOT)
+set(DOT_PATH)
+if (EXISTS "${DOXYGEN_DOT_PATH}")
+ set(HAVE_DOT "YES")
+ file(TO_NATIVE_PATH ${DOXYGEN_DOT_PATH} DOT_PATH)
+else()
+ set(HAVE_DOT "NO")
+ set(DOT_PATH "")
+endif()
+
+set(PACKAGE_NAME "libSBML")
+
+# replace variables as needed
+foreach( lang "common" "c" "cpp" "perl" "python")
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/doxygen-config-${lang}.txt.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/doxygen-config-${lang}.txt
+)
+endforeach()
+
+
+# create C-api manuals
+macro(createManual lang)
+ make_directory(${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api)
+
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api output_path)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api/search search_path)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/graphics/official-sbml-supported-40.jpg logo_file)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/graphics/right-arrow.gif right_arrow)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/sbml.js sbml_js)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/doxygen-tabs.css tabs_css)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/search.png search_png)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/search.css search_css)
+
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/doxygen-config-${lang}.txt api_doc)
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api/index.html
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E remove_directory ${output_path}
+ COMMAND ${DOXYGEN_EXECUTABLE}
+ ARGS ${api_doc}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${logo_file}
+ ${output_path}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${right_arrow}
+ ${output_path}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${sbml_js}
+ ${output_path}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${tabs_css}
+ ${output_path}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${search_png}
+ ${search_path}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${search_css}
+ ${search_path}
+ COMMENT "Generate ${lang}-API Documentation"
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
+ )
+ add_custom_target(api_docs_${lang} ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/formatted/${lang}-api/index.html ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
+
+
+ install(DIRECTORY ${output_path} DESTINATION docs )
+
+endmacro()
+
+createManual(c)
+createManual(cpp)
+
+# create python-api manuals
+if (WITH_PYTHON)
+ createManual(python)
+endif()
+
+# create perl-api manuals
+if (WITH_PERL)
+ createManual(perl)
+endif()
+
+# create java-api manuals
+if (WITH_JAVA)
+ # find java doc jar
+ if (NOT EXISTS "${Java_JAVADOC_JAR}")
+ get_filename_component(JDK_PATH ${Java_JAVA_EXECUTABLE} PATH )
+ file(TO_NATIVE_PATH "${JDK_PATH}/../lib/tools.jar" Java_JAVADOC_JAR)
+ if (NOT EXISTS "${Java_JAVADOC_JAR}")
+ if (UNIX)
+ if (APPLE)
+ set(Java_JAVADOC_JAR "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar")
+ else()
+ set(Java_JAVADOC_JAR ${JAVA_INCLUDE_PATH}/../lib/tools.jar)
+ endif()
+ endif()
+ endif()
+ endif()
+ set(Java_JAVADOC_JAR ${Java_JAVADOC_JAR} CACHE FILEPATH "Location of javadoc jar")
+
+ if (NOT EXISTS "${Java_JAVADOC_JAR}")
+ message(FATAL_ERROR "Cannot generate java documentation, please specify the Java_JAVADOC_JAR.")
+ endif()
+
+ set(LIBSBML_JAVA_DIR "${CMAKE_CURRENT_BINARY_DIR}/../src/bindings/java/java-files")
+ set(LIBSBML_JAVADOC_DOCTITLE "${PACKAGE_NAME} ${PACKAGE_VERSION} Java API Reference")
+ set(LIBSBML_JAVADOC_HEADER "<B>${PACKAGE_NAME}<BR>${PACKAGE_VERSION}</B>")
+ set(LIBSBML_JAVADOC_WINDOWTITLE "LibSBML Java API")
+ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/libsbml-java-footer.html" LIBSBML_JAVADOC_FOOTER)
+ string(STRIP ${LIBSBML_JAVADOC_FOOTER} LIBSBML_JAVADOC_FOOTER)
+ string(REGEX REPLACE "\n" "" LIBSBML_JAVADOC_FOOTER "${LIBSBML_JAVADOC_FOOTER}")
+
+
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/doxygen-config-perl.txt api_doc)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} current_dir)
+ file(TO_NATIVE_PATH ${LIBSBML_JAVA_DIR} java_dir)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api output_dir)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api/org/sbml/libsbml/ java_output_dir)
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/graphics/* graphics_files)
+
+ file(GLOB graphics_files ${CMAKE_CURRENT_SOURCE_DIR}/src/graphics/*.jpg)
+ foreach(graphic ${graphics_files})
+ file(COPY ${graphic} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api/org/sbml/libsbml/)
+ endforeach()
+
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api/index.html
+ COMMAND ${Java_JAVAC_EXECUTABLE}
+ ARGS -nowarn
+ -cp "${Java_JAVADOC_JAR}"
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/ExcludeDoclet.java
+ -d "${current_dir}"
+ COMMAND ${Java_JAVA_EXECUTABLE}
+ ARGS -cp "${Java_JAVADOC_JAR}${FILE_SEP}${current_dir}"
+ ExcludeDoclet
+ -excludefile java-skip.txt
+ -use -public -version -author -sourcetab 4 -keywords
+ -link http://java.sun.com/j2se/1.5.0/docs/api
+ -nodeprecated
+ -header "${LIBSBML_JAVADOC_HEADER}"
+ -bottom "${LIBSBML_JAVADOC_FOOTER}"
+ -windowtitle ${LIBSBML_JAVADOC_WINDOWTITLE}
+ -doctitle ${LIBSBML_JAVADOC_DOCTITLE}
+ -overview libsbml-java-fake-overview.html
+ -stylesheetfile doxygen-base.css
+ -d ${output_dir}
+ -tag note:a:"Note:"
+ -tag warning:a:"Warning:"
+ -tag docnote:a:"Documentation note:"
+ -sourcepath ${java_dir} org.sbml.libsbml
+ COMMENT "Generate Java-API Documentation"
+ VERBATIM
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${logo_file}
+ ${output_dir}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${sbml_js}
+ ${output_dir}
+ COMMAND "${CMAKE_COMMAND}"
+ ARGS -E copy
+ ${tabs_css}
+ ${output_dir}
+ )
+
+ add_custom_target(api_docs_java ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/formatted/java-api/index.html)
+
+ install(DIRECTORY ${output_dir} DESTINATION docs )
+
+endif()
+
+
+endif()
\ No newline at end of file
Added: branches/libsbml-5/docs/FindDoxygen.cmake
===================================================================
--- branches/libsbml-5/docs/FindDoxygen.cmake (rev 0)
+++ branches/libsbml-5/docs/FindDoxygen.cmake 2010-11-25 08:06:56 UTC (rev 12217)
@@ -0,0 +1,141 @@
+# - This module looks for Doxygen and the path to Graphviz's dot
+# Doxygen is a documentation generation tool. Please see
+# http://www.doxygen.org
+#
+# This module accepts the following optional variables:
+#
+# DOXYGEN_SKIP_DOT = If true this module will skip trying to find Dot
+# (an optional component often used by Doxygen)
+#
+# This modules defines the following variables:
+#
+# DOXYGEN_EXECUTABLE = The path to the doxygen command.
+# DOXYGEN_FOUND = Was Doxygen found or not?
+#
+# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
+# DOXYGEN_DOT_FOUND = Was Dot found or not?
+# DOXYGEN_DOT_PATH = The path to dot not including the executable
+#
+#
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# For backwards compatibility support
+IF(Doxygen_FIND_QUIETLY)
+ SET(DOXYGEN_FIND_QUIETLY TRUE)
+ENDIF(Doxygen_FIND_QUIETLY)
+
+# ===== Rationale for OS X AppBundle mods below =====
+# With the OS X GUI version, Doxygen likes to be installed to /Applications and
+# it contains the doxygen executable in the bundle. In the versions I've
+# seen, it is located in Resources, but in general, more often binaries are
+# located in MacOS.
+#
+# NOTE: The official Doxygen.app that is distributed for OS X uses non-standard
+# conventions. Instead of the command-line "doxygen" tool being placed in
+# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
+# "doxygen" is placed in Contents/Resources. This is most likely done
+# so that something happens when people double-click on the Doxygen.app
+# package. Unfortunately, CMake gets confused by this as when it sees the
+# bundle it uses "Doxywizard" as the executable to use instead of
+# "doxygen". Therefore to work-around this issue we temporarily disable
+# the app-bundle feature, just for this CMake module:
+if(APPLE)
+ # Save the old setting
+ SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
+ # Disable the App-bundle detection feature
+ SET(CMAKE_FIND_APPBUNDLE "NEVER")
+endif()
+# FYI:
+# In the older versions of OS X Doxygen, dot was included with the
+# Doxygen bundle. But the new versions require you to download
+# Graphviz.app which contains "dot" in it's bundle.
+# ============== End OSX stuff ================
+
+#
+# Find Doxygen...
+#
+
+FIND_PROGRAM(DOXYGEN_EXECUTABLE
+ NAMES doxygen
+ PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
+ /Applications/Doxygen.app/Contents/Resources
+ /Applications/Doxygen.app/Contents/MacOS
+ DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
+)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE)
+
+#
+# Find Dot...
+#
+
+IF(NOT DOXYGEN_SKIP_DOT)
+ if(NOT DOXYGEN_DOT_EXECUTABLE)
+ FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
+ NAMES dot
+ PATHS
+ "$ENV{ProgramFiles}/Graphviz 2.21/bin"
+ "C:/Program Files/Graphviz 2.21/bin"
+ "C:/Program Files/Graphviz 2.63.3/bin"
+ "$ENV{ProgramFiles}/ATT/Graphviz/bin"
+ "C:/Program Files/ATT/Graphviz/bin"
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
+ /Applications/Graphviz.app/Contents/MacOS
+ /Applications/Doxygen.app/Contents/Resources
+ /Applications/Doxygen.app/Contents/MacOS
+ DOC "Graphviz Dot tool for using Doxygen"
+ )
+ endif()
+ if(DOXYGEN_DOT_EXECUTABLE)
+ set(DOXYGEN_DOT_FOUND TRUE)
+ # The Doxyfile wants the path to Dot, not the entire path and executable
+ get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
+ endif()
+
+endif(NOT DOXYGEN_SKIP_DOT)
+
+#
+# Backwards compatibility...
+#
+
+if(APPLE)
+ # Restore the old app-bundle setting setting
+ SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
+endif()
+
+# Maintain the _FOUND variables as "YES" or "NO" for backwards compatibility
+# (allows people to stuff them directly into Doxyfile with configure_file())
+if(DOXYGEN_FOUND)
+ set(DOXYGEN_FOUND "YES")
+else()
+ set(DOXYGEN_FOUND "NO")
+endif()
+if(DOXYGEN_DOT_FOUND)
+ set(DOXYGEN_DOT_FOUND "YES")
+else()
+ set(DOXYGEN_DOT_FOUND "NO")
+endif()
+
+# For backwards compatibility support
+SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
+SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
+
+MARK_AS_ADVANCED(
+ DOXYGEN_EXECUTABLE
+ DOXYGEN_DOT_EXECUTABLE
+ DOXYGEN_DOT_PATH
+ )
Added: branches/libsbml-5/docs/src/doxygen-config-c.txt.cmake
===================================================================
--- branches/libsbml-5/docs/src/doxygen-config-c.txt.cmake (rev 0)
+++ branches/libsbml-5/docs/src/doxygen-config-c.txt.cmake 2010-11-25 08:06:56 UTC (rev 12217)
@@ -0,0 +1,70 @@
+# -----------------------------------------------------------------------------
+# File name : doxyfile-cpp.txt
+# Description : Doxygen config for C libSBML API manual
+# Original author(s): Michael Hucka <mh...@ca...>
+# Organization : California Institute of Technology
+# $Id: doxygen-config-c.txt.in 11938 2010-09-20 02:04:23Z mhucka $
+# $HeadURL: http://sbml.svn.sourceforge.net/svnroot/sbml/branches/libsbml-5/docs/src/doxygen-config-c.txt.in $
+# -----------------------------------------------------------------------------
+
+# Include libSBML's common Doxygen settings:
+
+@INCLUDE = doxygen-config-common.txt
+
+# -----------------------------------------------------------------------------
+# Beginning of C++ specific configuration settings
+# -----------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "@PACKAGE_NAME@ C Public API"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = "@PACKAGE_NAME@ @PACKAGE_VERSION@ C Public API"
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = ../formatted/c-api
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS = doxygen-c-only doxygen-clike-only notcpp
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a
+# file, namespace, or class. And the struct will be named TypeS. This can
+# typically be useful for C code in case the coding convention dictates that
+# all compound types are typedef'ed and only the typedef is referenced, never
+# the tag name.
+
+TYPEDEF_HIDES_STRUCT = YES
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED = LIBSBML_EXTERN:="" \
+ BEGIN_C_DECLS:="" \
+ END_C_DECLS:="" \
+ LIBSBML_CPP_NAMESPACE_BEGIN:="" \
+ LIBSBML_CPP_NAMESPACE_END:=""
+
+# __cplusplus
Added: branches/libsbml-5/docs/src/doxygen-config-common.txt.cmake
===================================================================
--- branches/libsbml-5/docs/src/doxygen-config-common.txt.cmake (rev 0)
+++ branches/libsbml-5/docs/src/doxygen-config-common.txt.cmake 2010-11-25 08:06:56 UTC (rev 12217)
@@ -0,0 +1,1074 @@
+# -----------------------------------------------------------------------------
+# File name : doxyfile-config-common.txt
+# Description : Common elements of doxygen configuration
+# Original author(s): Michael Hucka <mh...@ca...>
+# Organization : California Institute of Technology
+# $Id: doxygen-config-common.txt 11938 2010-09-20 02:04:23Z mhucka $
+# $HeadURL: http://sbml.svn.sourceforge.net/svnroot/sbml/branches/libsbml-5/docs/src/doxygen-config-common.txt $
+# -----------------------------------------------------------------------------
+#
+# Originally based on the sample config file from Doxygen 1.3.4.
+#
+# This file is included by other doxygen configuration files used to
+# generate language-specific API documentation in libSBML.
+#
+# Notes about Doxygen:
+# - The Doxygen file format is:
+# TAG = value [value, ...]
+# You can append to items like this:
+# TAG += value [value, ...]
+# - Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = .
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
+# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese,
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+SORT_BRIEF_DOCS = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# reimplements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES += docnote="@par Documentation note:\n "
+ALIASES += startred="<em style='color: #b32222'>"
+ALIASES += stopred="</em>"
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = YES
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = NO
+
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = $file:$line: $text
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = \
+ libsbml-accessing.txt \
+ libsbml-coding.txt \
+ libsbml-blurb.txt \
+ libsbml-communications.txt \
+ libsbml-example.txt \
+ libsbml-features.txt \
+ libsbml-installation.txt \
+ libsbml-issues.txt \
+ libsbml-license.txt \
+ libsbml-mainpage.txt \
+ libsbml-math.txt \
+ libsbml-news.txt \
+ libsbml-papers.txt \
+ libsbml-reading-files.txt \
+ libsbml-uninstallation.txt \
+ libsbml-extension-support-classes.txt \
+ libsbml-howto-implement-extension.txt \
+ ../../src/common \
+ ../../src/annotation \
+ ../../src/math \
+ ../../src/sbml \
+ ../../src/util \
+ ../../src/validator \
+ ../../src/xml \
+ ../../src/extension
+# ../../src/sbml/layout \
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE = \
+ force-serif-font-on.html \
+ force-serif-font-off.html \
+ ../../src/sbml/SBMLTransforms.h \
+ ../../src/sbml/SBMLTransforms.cpp \
+ ../../src/math/FormulaTokenizer.c \
+ ../../src/math/FormulaTokenizer.h \
+ ../../src/util/memory.c \
+ ../../src/util/memory.h \
+ ../../src/util/Stack.c \
+ ../../src/util/Stack.h \
+ ../../src/util/StringBuffer.c \
+ ../../src/util/StringBuffer.h \
+ ../../src/xml/XercesHandler.h \
+ ../../src/xml/XercesHandler.cpp \
+ ../../src/xml/ExpatHandler.h \
+ ../../src/xml/ExpatHandler.cpp \
+ ../../src/xml/LibXMLHandler.h \
+ ../../src/xml/LibXMLHandler.cpp \
+ ../../src/xml/XercesAttributes.h \
+ ../../src/xml/XercesAttributes.cpp \
+ ../../src/xml/ExpatAttributes.h \
+ ../../src/xml/ExpatAttributes.cpp \
+ ../../src/xml/LibXMLAttributes.h \
+ ../../src/xml/LibXMLAttributes.cpp \
+ ../../src/xml/XercesNamespaces.h \
+ ../../src/xml/XercesNamespaces.cpp \
+ ../../src/xml/ExpatNamespaces.h \
+ ../../src/xml/ExpatNamespaces.cpp \
+ ../../src/xml/LibXMLNamespaces.h \
+ ../../src/xml/LibXMLNamespaces.cpp \
+ ../../src/xml/XercesParser.h \
+ ../../src/xml/XercesParser.cpp \
+ ../../src/xml/ExpatParser.h \
+ ../../src/xml/ExpatParser.cpp \
+ ../../src/xml/LibXMLParser.h \
+ ../../src/xml/LibXMLParser.cpp \
+ ../../src/xml/XercesTranscode.h \
+ ../../src/xml/XercesTranscode.cpp \
+ ../../src/xml/LibXMLTranscode.h \
+ ../../src/xml/LibXMLTranscode.cpp \
+ ../../src/xml/XMLInputStream.cpp \
+ ../../src/xml/XMLInputStream.h \
+ ../../src/xml/XMLOutputStream.cpp \
+ ../../src/xml/XMLOutputStream.h \
+ ../../src/xml/XMLBuffer.cpp \
+ ../../src/xml/XMLBuffer.h \
+ ../../src/xml/XMLHandler.cpp \
+ ../../src/xml/XMLHandler.h \
+ ../../src/xml/XMLFileBuffer.cpp \
+ ../../src/xml/XMLFileBuffer.h \
+ ../../src/xml/XMLMemoryBuffer.cpp \
+ ../../src/xml/XMLMemoryBuffer.h \
+ ../../src/xml/XMLParser.cpp \
+ ../../src/xml/XMLParser.h \
+ ../../src/xml/XMLTokenizer.cpp \
+ ../../src/xml/XMLTokenizer.h \
+ ../../src/extension/SBMLExtensionRegister.h \
+ ../../src/extension/SBasePluginCreatorBase.h \
+ ../../src/extension/SBasePluginCreator.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS = */test/*
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
+
+FILE_PATTERNS = *.c *.cpp *.hpp *.h *.java *.py
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH = common-text examples . ../.. ../../examples/c++
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH = graphics
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e., when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an al...
[truncated message content] |
|
From: <fbe...@us...> - 2010-11-24 18:16:07
|
Revision: 12216
http://sbml.svn.sourceforge.net/sbml/?rev=12216&view=rev
Author: fbergmann
Date: 2010-11-24 18:16:01 +0000 (Wed, 24 Nov 2010)
Log Message:
-----------
- apply fix to find javadoc jar for libsbml-5
Modified Paths:
--------------
branches/libsbml-5/config/java.m4
Modified: branches/libsbml-5/config/java.m4
===================================================================
--- branches/libsbml-5/config/java.m4 2010-11-23 22:23:55 UTC (rev 12215)
+++ branches/libsbml-5/config/java.m4 2010-11-24 18:16:01 UTC (rev 12216)
@@ -203,8 +203,12 @@
if test -e "$headers/jni.h"; then
JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I\"$headers\""
parent=`dirname "$headers"`
- JAVADOC_JAR="$parent/Classes/classes.jar"
- else
+ if test -e "$parent/Classes/classes.jar"; then
+ JAVADOC_JAR="$parent/Classes/classes.jar"
+ else
+ JAVADOC_JAR="${parent}JDK/Classes/classes.jar"
+ fi
+ else
AC_MSG_ERROR([Cannot find Java include files.])
fi
;;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2010-11-23 22:24:02
|
Revision: 12215
http://sbml.svn.sourceforge.net/sbml/?rev=12215&view=rev
Author: fbergmann
Date: 2010-11-23 22:23:55 +0000 (Tue, 23 Nov 2010)
Log Message:
-----------
- classes.jar is now in a different directory
Modified Paths:
--------------
trunk/libsbml/config/java.m4
Modified: trunk/libsbml/config/java.m4
===================================================================
--- trunk/libsbml/config/java.m4 2010-11-23 21:21:26 UTC (rev 12214)
+++ trunk/libsbml/config/java.m4 2010-11-23 22:23:55 UTC (rev 12215)
@@ -204,7 +204,11 @@
if test -e "$headers/jni.h"; then
JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I\"$headers\""
parent=`dirname "$headers"`
- JAVADOC_JAR="$parent/Classes/classes.jar"
+ if test -e "$parent/Classes/classes.jar"; then
+ JAVADOC_JAR="$parent/Classes/classes.jar"
+ else
+ JAVADOC_JAR="${parent}JDK/Classes/classes.jar"
+ fi
else
AC_MSG_ERROR([Cannot find Java include files.])
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|